11#include <FairRootManager.h>
14#include <TClonesArray.h>
15#include <TStopwatch.h>
93 logOut << setw(20) << left << GetName() <<
" [";
94 logOut << fixed << setw(8) << setprecision(1) << right << timer.RealTime() * 1000. <<
" ms] ";
98 LOG(info) << logOut.str();
112 LOG(info) <<
"=====================================";
113 LOG(info) << GetName() <<
": Run summary";
114 LOG(info) <<
"Timeslices : " <<
fNumTs;
116 LOG(info) <<
"Time / TS : " << fixed << setprecision(2) << 1000. *
fTimeTot / double(
fNumTs) <<
" ms";
117 LOG(info) <<
"=====================================";
126 LOG(info) <<
"==================================================";
127 LOG(info) << GetName() <<
": Initialising ";
130 FairRootManager* frm = FairRootManager::Instance();
134 fDigiEvents = frm->InitObjectAs<
const std::vector<CbmDigiEvent>*>(
"DigiEvent");
138 LOG(info) << GetName() <<
": Found branch DigiEvent";
141 if (frm->GetObject(
"CbmEvent")) {
142 LOG(error) << GetName() <<
": Found branch CbmEvent! Aborting...";
146 frm->Register(
"CbmEvent",
"Reco events",
fRecoEvents, IsOutputBranchPersistent(
"CbmEvent"));
147 if (frm->GetObject(
"StsDigi")) {
148 LOG(error) << GetName() <<
": Found branch StsDigi! Aborting...";
154 frm->RegisterAny(
"BmonDigi",
fBmonDigis, kFALSE);
158 frm->RegisterAny(
"StsDigi",
fStsDigis, kFALSE);
162 frm->RegisterAny(
"RichDigi",
fRichDigis, kFALSE);
166 frm->RegisterAny(
"MuchDigi",
fMuchDigis, kFALSE);
170 frm->RegisterAny(
"TrdDigi",
fTrdDigis, kFALSE);
174 frm->RegisterAny(
"TofDigi",
fTofDigis, kFALSE);
178 frm->RegisterAny(
"PsdDigi",
fPsdDigis, kFALSE);
183 fRecoEvents =
dynamic_cast<TClonesArray*
>(frm->GetObject(
"CbmEvent"));
185 LOG(error) << GetName() <<
": Neither DigiEvent nor CbmEvent branch found! Aborting...";
190 LOG(info) <<
"==================================================";
ClassImp(CbmConverterManager)
Class characterising one event by a collection of links (indices) to data objects,...
Task class for interfacing storable raw events in the CbmDigiEvent format to the current offline reco...
std::vector< CbmTrdDigi > * fTrdDigis
std::vector< CbmBmonDigi > * fBmonDigis
size_t fNumTs
Number of processed timeslices.
size_t fNumEvents
Number of events.
virtual void Exec(Option_t *opt)
Task execution.
std::vector< CbmRichDigi > * fRichDigis
std::vector< CbmPsdDigi > * fPsdDigis
const std::vector< CbmDigiEvent > * fDigiEvents
virtual ~CbmTaskMakeRecoEvents()
Destructor.
double fTimeTot
Execution time.
std::vector< CbmTofDigi > * fTofDigis
std::vector< CbmMuchDigi > * fMuchDigis
void FillTree(gsl::span< const Digi > inVec, std::vector< Digi > *outVec, CbmEvent *event, ECbmDataType digiType)
Fill the tree structure with digis from CbmDigiEvent.
CbmTaskMakeRecoEvents()
Constructor.
virtual void Finish()
Finish timeslice.
virtual InitStatus Init()
Task initialisation.
std::vector< CbmStsDigi > * fStsDigis
TClonesArray * fRecoEvents