2#ifndef RestCore_TRestThread
3#define RestCore_TRestThread
6#include <TFileMerger.h>
17#include "TRestAnalysisTree.h"
18#include "TRestEvent.h"
19#include "TRestEventProcess.h"
20#include "TRestMetadata.h"
21#include "TRestProcessRunner.h"
29 std::vector<TRestEventProcess*> fProcessChain;
38 Bool_t fProcessNullReturned;
39 Int_t fCompressionLevel;
57 void SetThreadId(Int_t
id);
60 inline void SetCompressionLevel(Int_t comp) { fCompressionLevel = comp; }
63 inline Int_t GetThreadId()
const {
return fThreadId; }
64 inline TRestEvent* GetInputEvent() {
return fInputEvent; }
65 inline TFile* GetOutputFile() {
return fOutputFile; };
66 inline TRestEvent* GetOutputEvent() {
return fProcessNullReturned ? 0 : fOutputEvent; }
67 inline Int_t GetProcessnum()
const {
return fProcessChain.size(); }
70 inline TTree* GetEventTree() {
return fEventTree; }
71 inline Bool_t Finished()
const {
return isFinished; }
REST core data-saving helper based on TTree.
A base class for any REST event process.
A base class for any REST event.
Running the processes efficiently with fantastic display.
REST_Verbose_Level
Enumerate of verbose level, containing five levels.
Threaded worker of a process chain.
void AddProcess(TRestEventProcess *process)
Add a process.
bool TestRun()
Make a test run of our process chain.
void Initialize()
Set variables by default during initialization.
void StartProcess()
The main function of this class. Thread will run this function until the end.
void EndProcess()
Write and close the output file.
void ProcessEvent()
Process a single event.
void PrepareToProcess(bool *outputConfig=nullptr)
Prepare some thing before we can start process.
Int_t ValidateChain(TRestEvent *input)
Check if the input/output of each process in the process chain matches.
void StartThread()
Create a thread with the method StartProcess().