From beae6df721fc0188fd63b0d220494f8b2c7aae51 Mon Sep 17 00:00:00 2001 From: "Stephen A. Wood" <saw@jlab.org> Date: Sat, 14 Dec 2019 23:19:51 -0500 Subject: [PATCH] THcHelicityReader: More robust failover to HMS for helicty info --- src/THcHelicityReader.cxx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/THcHelicityReader.cxx b/src/THcHelicityReader.cxx index 2f7cfe6..5d38099 100644 --- a/src/THcHelicityReader.cxx +++ b/src/THcHelicityReader.cxx @@ -120,6 +120,7 @@ Int_t THcHelicityReader::ReadData( const THaEvData& evdata ) } // Check if ROC info is correct + if(!evdata.GetModule(fROCinfo[kTime].roc, fROCinfo[kTime].slot)) { cout << "THcHelicityReader: ROC 2 not found" << endl; cout << "Changing to ROC 1 (HMS)" << endl; @@ -136,6 +137,19 @@ Int_t THcHelicityReader::ReadData( const THaEvData& evdata ) UInt_t titime = (UInt_t) evdata.GetData(fROCinfo[kTime].roc, fROCinfo[kTime].slot, fROCinfo[kTime].index, 0); + // Check again if ROC info is correct + if(titime == 0 && fTITime_last==0) { + cout << "THcHelicityReader: ROC 2 not found" << endl; + cout << "Changing to ROC 1 (HMS)" << endl; + SetROCinfo(kHel,1,18,9); + SetROCinfo(kHelm,1,18,8); + SetROCinfo(kMPS,1,18,10); + SetROCinfo(kQrt,1,18,7); + SetROCinfo(kTime,1,21,2); + titime = (UInt_t) evdata.GetData(fROCinfo[kTime].roc, + fROCinfo[kTime].slot, + fROCinfo[kTime].index, 0); + } //cout << fTITime_last << " " << titime << endl; if(titime < fTITime_last) { fTITime_rollovers++; -- GitLab