Go to the documentation of this file.
8 #include <FairLogger.h>
9 #include <FairRootManager.h>
10 #include <TClonesArray.h>
11 #include <TStopwatch.h>
36 : FairTask(
"BuildEventsIdealNew") {}
51 std::map<Int_t, CbmEventStore*> eventMap;
54 UInt_t nDigisNoise = 0;
62 for (Int_t iDigi = 0; iDigi < nDigis; iDigi++) {
78 auto mapIt = eventMap.find(mcEventNr);
79 if (mapIt == eventMap.end()) {
81 mapIt = eventMap.find(mcEventNr);
83 assert(mapIt != eventMap.end());
129 nDigisNoise += nNoise;
133 for (
auto& entry : eventMap) {
135 UInt_t nEntry =
fEvents->GetEntriesFast();
140 LOG(debug) <<
event->ToString();
142 LOG(debug) <<
"Created " <<
fEvents->GetEntriesFast() <<
" events";
147 std::cout << std::endl;
148 LOG(info) <<
"+ " << setw(15) << GetName() <<
": Time-slice " << setw(3)
149 << right <<
fNofEntries <<
", events: " << setw(6) << nEvents
150 <<
", digis: " << nDigisTot <<
", noise: " << nDigisNoise
151 <<
". Exec time " << fixed << setprecision(6) << timer.RealTime()
163 FairRootManager* ioman = FairRootManager::Instance();
170 std::cout << std::endl;
171 LOG(info) <<
"==================================================";
172 LOG(info) << GetName() <<
": Initialising...";
180 LOG(info) << GetName() <<
": Found match branch for "
186 LOG(fatal) << GetName() <<
": No match branch found!";
191 if (ioman->GetObject(
"Event")) {
192 LOG(fatal) << GetName() <<
": Branch Event already exists!";
203 fEvents =
new TClonesArray(
"CbmEventStore", 100);
204 ioman->Register(
"CbmEventStore",
"Events",
fEvents, kTRUE);
207 LOG(info) <<
"==================================================";
208 std::cout << std::endl;
const CbmLink & GetMatchedLink() const
virtual ~CbmBuildEventsIdealNew()
Storable event class for CBM.
std::vector< ECbmModuleId > fSystems
InitStatus Init()
Initialisation.
@ kMvd
Micro-Vertex Detector.
static Int_t GetNofDigis(ECbmModuleId systemId)
@ kTof
Time-of-flight Detector.
static Bool_t IsPresent(ECbmModuleId systemId)
Presence of a digi branch.
Int_t fNofEntries
Event array.
static CbmDigiManager * Instance()
Static instance.
static Bool_t IsMatchPresent(ECbmModuleId systemId)
Presence of a digi match branch.
CbmDigiManager * fDigiMan
static TString GetModuleNameCaps(ECbmModuleId moduleId)
const Digi * Get(Int_t index) const
Get a digi object.
virtual InitStatus Init()
const CbmMatch * GetMatch(ECbmModuleId systemId, UInt_t index) const
Get a match object.
@ kNofSystems
For loops over active systems.
@ kRich
Ring-Imaging Cherenkov Detector.
ClassImp(CbmConverterManager) InitStatus CbmConverterManager
Data class for a single-channel message in the STS.
Data class for expanded digital TOF information.
@ kTrd
Transition Radiation Detector.
virtual void Exec(Option_t *opt)
@ kMuch
Muon detection system.
@ kPsd
Projectile spectator detector.
Data class for PSD digital information.
@ kSts
Silicon Tracking System.