8 #include <FairLogger.h>
9 #include <FairRootManager.h>
10 #include <TClonesArray.h>
11 #include <TStopwatch.h>
40 std::map<Int_t, CbmEvent*> eventMap;
43 UInt_t nDigisNoise = 0;
53 LOG(info) << GetName() <<
": System "
57 for (Int_t iDigi = 0; iDigi < nDigis; iDigi++) {
74 if (eventMap.find(mcEventNr) == eventMap.end()) {
75 event =
new ((*fEvents)[nEvents])
CbmEvent(nEvents);
76 eventMap[mcEventNr] = event;
79 event = eventMap.at(mcEventNr);
108 LOG(debug) << GetName() <<
": Detector "
110 << nDigis <<
", noise " << nNoise;
112 nDigisNoise += nNoise;
118 assert(nEvents ==
fEvents->GetEntriesFast());
121 std::cout << std::endl;
122 LOG(info) <<
"+ " << setw(15) << GetName() <<
": Time-slice " << setw(3)
123 << right <<
fNofEntries <<
", events: " << setw(6) << nEvents
124 <<
", digis: " << nDigisTot <<
", noise: " << nDigisNoise
125 <<
". Exec time " << fixed << setprecision(6) << timer.RealTime()
129 if (gLogger->IsLogNeeded(fair::Severity::debug)) {
130 for (Int_t iEvent = 0; iEvent <
fEvents->GetEntriesFast(); iEvent++) {
132 LOG(info) <<
event->ToString();
145 FairRootManager* ioman = FairRootManager::Instance();
152 std::cout << std::endl;
153 LOG(info) <<
"==================================================";
154 LOG(info) << GetName() <<
": Initialising...";
162 LOG(info) << GetName() <<
": Found match branch for "
168 LOG(fatal) << GetName() <<
": No match branch found!";
173 if (ioman->GetObject(
"Event")) {
174 LOG(fatal) << GetName() <<
": Branch Event already exists!";
177 fEvents =
new TClonesArray(
"CbmEvent", 100);
179 "Event",
"CbmEvent",
fEvents, IsOutputBranchPersistent(
"Event"));
181 LOG(fatal) << GetName() <<
": Output branch could not be created!";
185 LOG(info) <<
"==================================================";
186 std::cout << std::endl;