PandaRoot
BSEmcDigitizerTask.h
Go to the documentation of this file.
1 #ifndef BSEMCDIGITIZERTASK_HH
2 #define BSEMCDIGITIZERTASK_HH
3 
4 #include <string>
5 
6 #include "FairLogger.h"
7 #include "FairRootManager.h"
8 
9 #include "PndContainerI.h"
10 #include "PndInputContainer.h"
11 #include "PndOutputContainer.h"
12 #include "PndProcess.h"
13 #include "PndProcessTask.h"
14 
15 #include "BSEmcDigi.h"
16 #include "BSEmcDigitizationData.h"
17 #include "BSEmcMCHit.h"
18 #include "BSEmcMultiWaveform.h"
19 
28 class BSEmcDigitizerTask : public PndProcessTask<BSEmcDigitizationData> {
29  public:
30  BSEmcDigitizerTask(const std::string &t_detectorname = "Barrel", Bool_t t_storedigis = kTRUE);
31  virtual ~BSEmcDigitizerTask();
32 
33  void SetHitBranchName(const std::string &t_hitbranchname) { fHitBranchname = t_hitbranchname; }
34  void SetDigiBranchName(const std::string &t_digibranchname) { fDigiBranchname = t_digibranchname; }
35  void SetWaveformBranchName(const std::string &t_waveformbranchname) { fWaveformBranchname = t_waveformbranchname; }
36 
37  protected:
38  virtual void PreProcessing(Option_t * /*unused*/) /*override*/;
39  virtual void PostProcessing(Option_t * /*unused*/) /*override*/;
40  virtual void SetupDataArrays() /*override*/;
41 
42  private:
43  PndInputContainer<BSEmcMCHit> *fMCHitInput{nullptr};
44  PndOutputContainer<BSEmcMultiWaveform> *fWaveformOutput{nullptr};
45  PndOutputContainer<BSEmcDigi> *fDigiOutput{nullptr};
46 
47  std::string fHitBranchname{""};
48  std::string fDigiBranchname{""};
49  std::string fWaveformBranchname{""};
50  ClassDef(BSEmcDigitizerTask, 1);
51 };
52 
53 #endif /*BSEMCDIGITIZERTASK_HH*/
Task based version of a PndProcessHandler.
virtual void SetupDataArrays()
Define which data containers need to be fetched from the FairRootManager, pass the data container add...
"Smart" container that figures out for you what underlying container needs to be fetched from FairRoo...
void SetDigiBranchName(const std::string &t_digibranchname)
"Smart" container that figures out for you what underlying container needs to be fetched from FairRoo...
Task managing all processes required to create BSEmcDigis from BSEmcMCHits.
virtual ~BSEmcDigitizerTask()
virtual void PreProcessing(Option_t *)
Do some task preparation before PndProcesses are run once per event.
BSEmcDigitizerTask(const std::string &t_detectorname="Barrel", Bool_t t_storedigis=kTRUE)
virtual void PostProcessing(Option_t *)
Do some task post clean up after PndProcesses are run once per event.
void SetHitBranchName(const std::string &t_hitbranchname)
Interface to a datacontainer to be used in PandaROOT.
void SetWaveformBranchName(const std::string &t_waveformbranchname)