PandaRoot
BSEmcPlotTask.h
Go to the documentation of this file.
1 #ifndef BSEMCPLOTTASK_HH
2 #define BSEMCPLOTTASK_HH
3 
4 #include <stdexcept>
5 #include <string>
6 #include <vector>
7 
8 #include "FairLogger.h"
9 
10 #include "PndContainerI.h"
11 #include "PndInputContainer.h"
12 #include "PndProcess.h"
13 #include "PndProcessTask.h"
14 
15 #include "BSEmcCluster.h"
16 #include "BSEmcDigi.h"
17 #include "BSEmcMCHit.h"
18 #include "BSEmcMCPoint.h"
19 #include "BSEmcMultiWaveform.h"
20 #include "BSEmcPlotData.h"
21 #include "BSEmcPlotProcess.h"
22 #include "BSEmcPrecluster.h"
23 #include "BSEmcRecoHit.h"
24 #include "BSEmcSubCluster.h"
25 
34 class BSEmcPlotTask : public PndProcessTask<BSEmcPlotData> {
35  public:
36  // Constructors
37  BSEmcPlotTask(const std::string &t_detectorname, BSEmcHistogrammer *t_histogrammer);
38  // Destructor
39  virtual ~BSEmcPlotTask();
40 
41  void SetMCPointBranchName(const std::string &t_branchname) { fMCPointBranchname = t_branchname; }
42  void SetMCHitBranchName(const std::string &t_branchname) { fMCHitBranchname = t_branchname; }
43  void SetWaveformBranchName(const std::string &t_branchname) { fWaveformBranchname = t_branchname; }
44  void SetDigiBranchName(const std::string &t_branchname) { fDigiBranchname = t_branchname; }
45  void SetPreclusterBranchName(const std::string &t_branchname) { fPreclusterBranchname = t_branchname; }
46  void SetClusterBranchName(const std::string &t_branchname) { fClusterBranchname = t_branchname; }
47  void SetSubClusterBranchName(const std::string &t_branchname) { fSubClusterBranchname = t_branchname; }
48  void SetRecoHitBranchName(const std::string &t_branchname) { fRecoHitBranchname = t_branchname; }
49 
50  protected:
51  virtual void SetupDataArrays() /*override*/;
52  virtual void PreProcessing(Option_t * /*unused*/) /*override*/;
53  virtual void PostProcessing(Option_t * /*unused*/) /*override*/;
54  virtual void ExecuteTasks(Option_t *t_option) /*override*/;
55 
56  virtual void SetupProcess(PndProcess<BSEmcPlotData> *t_process) /*override*/;
57 
58  private:
59  BSEmcHistogrammer *fHistogrammer{nullptr};
60 
70 
71  std::string fMCPointBranchname{""};
72  std::string fMCHitBranchname{""};
73  std::string fWaveformBranchname{""};
74  std::string fDigiBranchname{""};
75  std::string fPreclusterBranchname{""};
76  std::string fClusterBranchname{""};
77  std::string fSubClusterBranchname{""};
78  std::string fRecoHitBranchname{""};
79 
80  ClassDef(BSEmcPlotTask, 1)
81 };
82 
83 #endif /*BSEMCPLOTTASK_HH*/
Task based version of a PndProcessHandler.
"Smart" container that figures out for you what underlying container needs to be fetched from FairRoo...
void SetDigiBranchName(const std::string &t_branchname)
Definition: BSEmcPlotTask.h:44
void SetPreclusterBranchName(const std::string &t_branchname)
Definition: BSEmcPlotTask.h:45
virtual void SetupDataArrays()
Define which data containers need to be fetched from the FairRootManager, pass the data container add...
void SetRecoHitBranchName(const std::string &t_branchname)
Definition: BSEmcPlotTask.h:48
void SetClusterBranchName(const std::string &t_branchname)
Definition: BSEmcPlotTask.h:46
Task to handle PlotProcesses.
Definition: BSEmcPlotTask.h:34
virtual void SetupProcess(PndProcess< BSEmcPlotData > *t_process)
Simple wrapper around std::map<TString (histname), TH1*> to help with histogram creation and writting...
void SetMCPointBranchName(const std::string &t_branchname)
Definition: BSEmcPlotTask.h:41
void SetSubClusterBranchName(const std::string &t_branchname)
Definition: BSEmcPlotTask.h:47
void SetMCHitBranchName(const std::string &t_branchname)
Definition: BSEmcPlotTask.h:42
virtual void PreProcessing(Option_t *)
Do some task preparation before PndProcesses are run once per event.
Interface to a datacontainer to be used in PandaROOT.
virtual void PostProcessing(Option_t *)
Do some task post clean up after PndProcesses are run once per event.
void SetWaveformBranchName(const std::string &t_branchname)
Definition: BSEmcPlotTask.h:43
BSEmcPlotTask(const std::string &t_detectorname, BSEmcHistogrammer *t_histogrammer)
virtual void ExecuteTasks(Option_t *t_option)
virtual ~BSEmcPlotTask()