Skip to content
Snippets Groups Projects
Commit 0b835416 authored by Volker Friese's avatar Volker Friese
Browse files

Fix event loop in RecoTzero. Refs #2689.

parent 86e02370
No related branches found
No related tags found
1 merge request!1055Fix event loop in RecoTzero. Refs #2689.
Pipeline #20490 passed
...@@ -90,7 +90,7 @@ void CbmRecoTzero::Exec(Option_t*) ...@@ -90,7 +90,7 @@ void CbmRecoTzero::Exec(Option_t*)
for (Int_t iEvent = 0; iEvent < nEvents; iEvent++) { for (Int_t iEvent = 0; iEvent < nEvents; iEvent++) {
CbmEvent* event = dynamic_cast<CbmEvent*>(fEvents->At(iEvent)); CbmEvent* event = dynamic_cast<CbmEvent*>(fEvents->At(iEvent));
assert(event); assert(event);
Int_t nDigis = fTzdDigis->size(); Int_t nDigis = event->GetNofData(ECbmDataType::kT0Digi);
double tzero = -999999.; double tzero = -999999.;
switch (nDigis) { switch (nDigis) {
...@@ -103,7 +103,8 @@ void CbmRecoTzero::Exec(Option_t*) ...@@ -103,7 +103,8 @@ void CbmRecoTzero::Exec(Option_t*)
// If there is exactly one TZD digi, take the event time from there // If there is exactly one TZD digi, take the event time from there
case 1: { case 1: {
tzero = fTzdDigis->at(0).GetTime(); uint32_t digiIndex = event->GetIndex(ECbmDataType::kT0Digi, 0);
tzero = fTzdDigis->at(digiIndex).GetTime();
tsMonitor.fNumEvtsTzd1++; tsMonitor.fNumEvtsTzd1++;
break; break;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment