PandaRoot
BSEmcPlotTask.h
Go to the documentation of this file.
1 //****************************************************************************
2 //* This file is part of PandaRoot. *
3 //* *
4 //* PandaRoot is distributed under the terms of the *
5 //* GNU General Public License (GPL) version 3, *
6 //* copied verbatim in the file "LICENSE". *
7 //* *
8 //* Copyright (C) 2006 - 2024 FAIR GmbH and copyright holders of PandaRoot *
9 //* The copyright holders are listed in the file "COPYRIGHTHOLDERS". *
10 //* The authors are listed in the file "AUTHORS". *
11 //****************************************************************************
12 
13 #ifndef BSEMCPLOTTASK_HH
14 #define BSEMCPLOTTASK_HH
15 
16 #include <stdexcept>
17 #include <string>
18 #include <vector>
19 
20 #include "FairLogger.h"
21 
22 #include "PndConstContainer.h"
23 #include "PndContainerI.h"
24 #include "PndProcess.h"
25 #include "PndProcessTask.h"
26 
27 #include "BSEmcCluster.h"
28 #include "BSEmcDigi.h"
29 #include "BSEmcMCDeposit.h"
30 #include "BSEmcMCPoint.h"
31 #include "BSEmcMultiWaveform.h"
32 #include "BSEmcPrecluster.h"
33 #include "BSEmcRecoHit.h"
34 #include "BSEmcSubCluster.h"
35 #include "PndMCTrack.h"
36 
37 #include "BSEmcPlotProcess.h"
38 
47 class BSEmcPlotTask : public PndProcessTask {
48  public:
49  // Constructors
50  BSEmcPlotTask(const std::string &t_detectorname, BSEmcHistogrammer *t_histogrammer);
51  // Destructor
52  virtual ~BSEmcPlotTask();
53 
54  void SetMCPointBranchName(const std::string &t_branchname) { fMCPointBranchname = t_branchname; }
55  void SetMCDepositBranchName(const std::string &t_branchname) { fMCDepositBranchname = t_branchname; }
56  void SetWaveformBranchName(const std::string &t_branchname) { fWaveformBranchname = t_branchname; }
57  void SetDigiBranchName(const std::string &t_branchname) { fDigiBranchname = t_branchname; }
58  void SetPreclusterBranchName(const std::string &t_branchname) { fPreclusterBranchname = t_branchname; }
59  void SetClusterBranchName(const std::string &t_branchname) { fClusterBranchname = t_branchname; }
60  void SetSubClusterBranchName(const std::string &t_branchname) { fSubClusterBranchname = t_branchname; }
61  void SetRecoHitBranchName(const std::string &t_branchname) { fRecoHitBranchname = t_branchname; }
62 
63  void SetFolderPrefix(const std::string &t_folderPrefix) { fFolderPrefix = t_folderPrefix; }
64 
65  protected:
66  virtual void SetupDataArrays() /*override*/;
67  virtual void PreProcessing(Option_t * /*unused*/) /*override*/;
68  virtual void PostProcessing(Option_t * /*unused*/) /*override*/;
69  virtual void ExecuteTasks(Option_t *t_option) /*override*/;
70 
71  virtual void SetupProcess(PndProcess *t_process) /*override*/;
72 
73  private:
74  BSEmcHistogrammer *fHistogrammer{nullptr};
75 
76  std::string fMCPointBranchname{""};
77  std::string fMCDepositBranchname{""};
78  std::string fWaveformBranchname{""};
79  std::string fDigiBranchname{""};
80  std::string fPreclusterBranchname{""};
81  std::string fClusterBranchname{""};
82  std::string fSubClusterBranchname{""};
83  std::string fRecoHitBranchname{""};
84 
85  std::string fFolderPrefix{""};
86 
87  ClassDef(BSEmcPlotTask, 1)
88 };
89 
90 #endif /*BSEMCPLOTTASK_HH*/
Base Process class.
Definition: PndProcess.h:36
Task based version of a PndProcessHandler.
void SetDigiBranchName(const std::string &t_branchname)
Definition: BSEmcPlotTask.h:57
void SetPreclusterBranchName(const std::string &t_branchname)
Definition: BSEmcPlotTask.h:58
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:61
void SetClusterBranchName(const std::string &t_branchname)
Definition: BSEmcPlotTask.h:59
virtual void SetupProcess(PndProcess *t_process)
Task to handle PlotProcesses.
Definition: BSEmcPlotTask.h:47
void SetMCDepositBranchName(const std::string &t_branchname)
Definition: BSEmcPlotTask.h:55
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:54
void SetSubClusterBranchName(const std::string &t_branchname)
Definition: BSEmcPlotTask.h:60
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.
Container to wrap PndTCA/STDConstContainer (not needed anymore)
void SetWaveformBranchName(const std::string &t_branchname)
Definition: BSEmcPlotTask.h:56
void SetFolderPrefix(const std::string &t_folderPrefix)
Definition: BSEmcPlotTask.h:63
BSEmcPlotTask(const std::string &t_detectorname, BSEmcHistogrammer *t_histogrammer)
virtual void ExecuteTasks(Option_t *t_option)
virtual ~BSEmcPlotTask()