PandaRoot
ProcessTaskTestClasses.h
Go to the documentation of this file.
1 #ifndef PROCESSTASKTESTCLASSES_HH
2 #define PROCESSTASKTESTCLASSES_HH
3 #include <string>
4 
5 #include "TBuffer.h"
6 #include "TString.h"
7 
8 #include "PndParameterRegister.h"
9 #include "PndProcess.h"
10 #include "PndProcessTask.h"
11 
12 struct Data {
13 };
14 
15 class TestPndProcessTask : public PndProcessTask<Data> {
16 
17  public:
18  TestPndProcessTask(const std::string &t_detectorName) : PndProcessTask(t_detectorName) {}
20 
21  private:
22  virtual void SetupDataArrays(){};
23  ClassDef(TestPndProcessTask, 1);
24 };
25 
26 class TestPndProcess : public PndProcess<Data> {
27  public:
30  virtual void SetData(Data * /*t_data*/) { fDataSet = kTRUE; }
31  virtual void SetupParameters(const PndParameterRegister * /*t_parameter*/) { fParametersSet = kTRUE; }
32  virtual void PreProcess() { fPreProcessSet = kTRUE; }
33  virtual void Process() { fProcessSet = kTRUE; }
34  virtual void PostProcess() { fPostProcessSet = kTRUE; }
35  virtual void TearDown() { fTearDownSet = kTRUE; }
36  TString GetDetectorName() const { return this->fDetectorName; }
37  Bool_t fDataSet{kFALSE};
38  Bool_t fParametersSet{kFALSE};
39  Bool_t fPreProcessSet{kFALSE};
40  Bool_t fProcessSet{kFALSE};
41  Bool_t fPostProcessSet{kFALSE};
42  Bool_t fTearDownSet{kFALSE};
43 
44  private:
45  ClassDef(TestPndProcess, 1);
46 };
47 
48 #endif /*PROCESSTASKTESTCLASSES_HH*/
Base Process class.
Definition: PndProcess.h:24
Task based version of a PndProcessHandler.
virtual void TearDown()
Last actions at the end of the run.
virtual void SetupParameters(const PndParameterRegister *)
Fetch all parameters from the PndParameterRegister.
virtual void PreProcess()
PreProcess() is called before the actual Process() call in each event.
virtual void SetData(Data *)
Pass the data container ptrs to the process, and store pointers in class members. ...
TestPndProcessTask(const std::string &t_detectorName)
TString GetDetectorName() const
Helper class to indirect the Parameter fetching via the FairRuntimeDb.
virtual void Process()
The actual data transformation (digitizing, clustering, etc.) should be defined here.
virtual void PostProcess()
Immediately after calling Process() PostProcess() is called for cleanup of internal process data...