14 #include "FairModule.h"
15 #include "FairRootManager.h"
19 #include "TClonesArray.h"
20 #include "TGeoManager.h"
26 #include "TStopwatch.h"
40 using std::setprecision;
46 : FairTask(
"CbmMvdDigiToHit")
48 , fShowDebugHistos(kFALSE)
59 : FairTask(name, iVerbose)
61 , fShowDebugHistos(kFALSE)
66 , fBranchName(
"MvdDigi")
88 if (fVerbose) cout <<
"//----------------------------------------//";
89 if (fVerbose) cout << endl <<
"Send Input" << endl;
91 if (fVerbose) cout <<
"Execute HitPlugin Nr. " <<
fHitPluginNr << endl;
93 if (fVerbose) cout <<
"End Chain" << endl;
94 if (fVerbose) cout <<
"Start writing Hit" << endl;
99 cout <<
"Total of " <<
fHit->GetEntriesFast() <<
" Hit in this Event"
102 cout <<
"//----------------------------------------//" << endl;
103 LOG(info) <<
"+ " << setw(20) << GetName()
104 <<
": Created: " <<
fHit->GetEntriesFast() <<
" Hit in " << fixed
105 << setprecision(6) <<
fTimer.RealTime() <<
" s";
114 cout <<
"-I- " << GetName() <<
": Initialisation..." << endl;
116 cout <<
"---------------------------------------------" << endl;
117 cout <<
"-I- Initialising " << GetName() <<
" ...." << endl;
120 FairRootManager* ioman = FairRootManager::Instance();
122 cout <<
"-E- " << GetName() <<
"::Init: No FairRootManager!" << endl;
127 fInputDigis = (TClonesArray*) ioman->GetObject(
"MvdDigi");
130 LOG(error) <<
"No MvdDigi branch found. There was no MVD in the "
131 "simulation. Switch this task off";
136 fHit =
new TClonesArray(
"CbmMvdHit", 10000);
138 "MvdHit",
"Mvd Hit",
fHit, IsOutputBranchPersistent(
"MvdHit"));
144 cout << endl <<
"-I- succesfully loaded Geometry from file -I-" << endl;
147 <<
"Geometry couldn't be loaded from file. No MVD digitizer available.";
159 cout << GetName() <<
" initialised with parameters: " << endl;
161 cout <<
"---------------------------------------------" << endl;
192 cout <<
"============================================================"
194 cout <<
"============== Parameters DigiToHit ====================" << endl;
195 cout <<
"============================================================"
197 cout <<
"=============== End Task ==================================="