CbmRoot
CbmMCDataManager.h
Go to the documentation of this file.
1 
6 #ifndef CBMMCDATAMANAGER_H
7 #define CBMMCDATAMANAGER_H 1
8 
9 #include <Rtypes.h> // for THashConsistencyHolder, ClassDef
10 #include <RtypesCore.h> // for Int_t, Option_t
11 #include <TString.h> // for TString
12 
13 #include <FairTask.h> // for FairTask, InitStatus
14 
15 #include <list> // for list
16 #include <map> // for map
17 #include <vector> // for vector
18 
19 class CbmMCDataArray;
20 class CbmMCDataObject;
21 
27 class CbmMCDataManager : public FairTask {
28 
29 public:
32 
33 
38  CbmMCDataManager(const char* name, Int_t legacy = 0);
39 
40 
43 
44 
51  Int_t AddFile(const char* fileName);
52 
58  Int_t AddFileToChain(const char* fileName, Int_t chainNumber);
59 
64  void AddFriend(Int_t chainNum1, Int_t chainNum2) {
65  fFriends[chainNum1] = chainNum2;
66  }
67 
69  virtual void Exec(Option_t* /*option*/) {};
70 
71 
73  virtual void FinishEvent();
74 
75 
77  virtual InitStatus Init();
78 
79 
84  CbmMCDataArray* InitBranch(const char* name);
85 
90  CbmMCDataObject* GetObject(const char* name);
91 
92 private:
93  Int_t fLegacy;
94 
96  std::vector<std::list<TString>> fFileList;
97 
99  std::map<TString, CbmMCDataArray*> fActive;
100 
101  std::map<TString, CbmMCDataObject*> fActiveObj;
102 
103  std::map<Int_t, Int_t> fFriends;
104 
106 };
107 
108 #endif
CbmMCDataManager::fFriends
std::map< Int_t, Int_t > fFriends
Definition: CbmMCDataManager.h:103
CbmMCDataManager::GetObject
CbmMCDataObject * GetObject(const char *name)
Definition: CbmMCDataManager.cxx:137
CbmMCDataManager::ClassDef
ClassDef(CbmMCDataManager, 1)
CbmMCDataManager::CbmMCDataManager
CbmMCDataManager()
Definition: CbmMCDataManager.cxx:15
CbmMCDataManager::fActiveObj
std::map< TString, CbmMCDataObject * > fActiveObj
Definition: CbmMCDataManager.h:101
CbmMCDataManager::InitBranch
CbmMCDataArray * InitBranch(const char *name)
Definition: CbmMCDataManager.cxx:106
CbmMCDataArray
Access to a MC data branch for time-based analysis.
Definition: CbmMCDataArray.h:35
CbmMCDataManager::AddFriend
void AddFriend(Int_t chainNum1, Int_t chainNum2)
Definition: CbmMCDataManager.h:64
CbmMCDataManager::Init
virtual InitStatus Init()
Definition: CbmMCDataManager.cxx:95
CbmMCDataManager::AddFileToChain
Int_t AddFileToChain(const char *fileName, Int_t chainNumber)
Definition: CbmMCDataManager.cxx:66
CbmMCDataManager
Task class creating and managing CbmMCDataArray objects.
Definition: CbmMCDataManager.h:27
CbmMCDataManager::fActive
std::map< TString, CbmMCDataArray * > fActive
Array of filename chains.
Definition: CbmMCDataManager.h:99
CbmMCDataManager::~CbmMCDataManager
~CbmMCDataManager()
Definition: CbmMCDataManager.cxx:42
CbmMCDataObject
Access to a MC data branch for time-based analysis.
Definition: CbmMCDataObject.h:34
CbmMCDataManager::fLegacy
Int_t fLegacy
If true, use FairRootManager in event-by-event mode.
Definition: CbmMCDataManager.h:93
CbmMCDataManager::FinishEvent
virtual void FinishEvent()
Definition: CbmMCDataManager.cxx:83
CbmMCDataManager::fFileList
std::vector< std::list< TString > > fFileList
Definition: CbmMCDataManager.h:96
CbmMCDataManager::AddFile
Int_t AddFile(const char *fileName)
Definition: CbmMCDataManager.cxx:56
CbmMCDataManager::Exec
virtual void Exec(Option_t *)
Definition: CbmMCDataManager.h:69