44 std::cout << std::endl;
45 LOG(info) <<
"==========================================================";
46 LOG(info) << GetName() <<
": Initialisation";
49 FairRootManager* ioman = FairRootManager::Instance();
55 LOG(error) << GetName() <<
": No BmonDigi array!";
58 LOG(info) <<
"--- Found branch BmonDigi";
61 fEvents =
dynamic_cast<TClonesArray*
>(ioman->GetObject(
"Event"));
63 LOG(info) <<
"--- Found branch Event";
66 fEvents =
dynamic_cast<TClonesArray*
>(ioman->GetObject(
"CbmEvent"));
68 LOG(error) << GetName() <<
": No Event nor CbmEvent branch! Task will be inactive.";
71 LOG(info) <<
"--- Found branch CbmEvent";
74 LOG(info) << GetName() <<
": Initialisation successful";
75 LOG(info) <<
"==========================================================";
76 std::cout << std::endl;
92 Int_t nEvents =
fEvents->GetEntriesFast();
93 for (Int_t iEvent = 0; iEvent < nEvents; iEvent++) {
97 double tzero = -999999.;
103 tsMonitor.fNumEvtsBmon0++;
111 tsMonitor.fNumEvtsBmon1++;
118 tsMonitor.fNumEvtsBmonn++;
123 event->SetTzero(tzero);
124 tsMonitor.fNumEvents++;
130 tsMonitor.
fExecTime = 1000. * timer.RealTime();
131 tsMonitor.fNumTs = 1;
132 std::stringstream logOut;
133 logOut << setw(20) << left << GetName() <<
" [";
134 logOut << fixed << setw(8) << setprecision(1) << right << timer.RealTime() * 1000. <<
" ms] ";
135 logOut <<
"TS " <<
fMonitor.
fNumTs <<
", events " << tsMonitor.fNumEvents;
136 logOut <<
" (1 BMON: " << tsMonitor.fNumEvtsBmon1;
137 logOut <<
" , 0 BMON: " << tsMonitor.fNumEvtsBmon0;
138 logOut <<
" , n BMON: " << tsMonitor.fNumEvtsBmonn <<
")";
139 LOG(info) << logOut.str();
155 std::cout << std::endl;
156 LOG(info) <<
"=====================================";
157 LOG(info) << GetName() <<
": Run summary";
159 LOG(info) <<
"Exec time / TS : " << fixed << setprecision(2) << tExec <<
" ms";
160 LOG(info) <<
"Events / TS : " << fixed << setprecision(2) << evtsPerTs;
161 LOG(info) <<
"Fraction with 1 BMON : " << fixed << setprecision(2) << fracBmon1 <<
" %";
162 LOG(info) <<
"Fraction with 0 BMON : " << fixed << setprecision(2) << fracBmon0 <<
" %";
163 LOG(info) <<
"Fraction with n BMON : " << fixed << setprecision(2) << fracBmonn <<
" %";
164 LOG(info) <<
"=====================================";