Skip to content
Snippets Groups Projects
Commit 8c0f9e53 authored by Stephen A. Wood's avatar Stephen A. Wood Committed by Stephen Wood
Browse files

Add a method to opt out of time slippage correction

parent 8a26c04d
No related branches found
No related tags found
No related merge requests found
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
using namespace std; using namespace std;
#define SUPPRESSMISSINGADCREFTIMEMESSAGES 1 #define SUPPRESSMISSINGADCREFTIMEMESSAGES 1
THcHitList::THcHitList() : fMap(0), fTISlot(0) THcHitList::THcHitList() : fMap(0), fTISlot(0), fDisableSlipCorrection(kFALSE)
{ {
/// Normal constructor. /// Normal constructor.
...@@ -167,6 +167,8 @@ void THcHitList::InitHitList(THaDetMap* detmap, ...@@ -167,6 +167,8 @@ void THcHitList::InitHitList(THaDetMap* detmap,
fNTDCRef_miss = 0; fNTDCRef_miss = 0;
fNADCRef_miss = 0; fNADCRef_miss = 0;
// DisableSlipCorrection();
} }
/** /**
...@@ -213,9 +215,10 @@ Int_t THcHitList::DecodeToHitList( const THaEvData& evdata, Bool_t suppresswarni ...@@ -213,9 +215,10 @@ Int_t THcHitList::DecodeToHitList( const THaEvData& evdata, Bool_t suppresswarni
} }
} }
} }
if(fDisableSlipCorrection) fTISlot = -1;
Int_t titime = 0; Int_t titime = 0;
if(fTISlot!=0) { if(fTISlot>0) {
#define FUDGE 7 #define FUDGE 7
titime = evdata.GetData(fTICrate, fTISlot, 2, 0)-FUDGE; titime = evdata.GetData(fTICrate, fTISlot, 2, 0)-FUDGE;
// Need to get the FADC time for all modules in this crate // Need to get the FADC time for all modules in this crate
...@@ -487,7 +490,7 @@ Int_t THcHitList::DecodeToHitList( const THaEvData& evdata, Bool_t suppresswarni ...@@ -487,7 +490,7 @@ Int_t THcHitList::DecodeToHitList( const THaEvData& evdata, Bool_t suppresswarni
} }
} }
#if 1 #if 1
if(fTISlot) { if(fTISlot>0) {
// cout << "TI ROC: " << fTICrate << " TI Time: " << titime << endl; // cout << "TI ROC: " << fTICrate << " TI Time: " << titime << endl;
map<Int_t, Int_t>::iterator it; map<Int_t, Int_t>::iterator it;
for(it=fTrigTimeShiftMap.begin(); it!=fTrigTimeShiftMap.end(); it++) { for(it=fTrigTimeShiftMap.begin(); it!=fTrigTimeShiftMap.end(); it++) {
......
...@@ -40,6 +40,7 @@ public: ...@@ -40,6 +40,7 @@ public:
TClonesArray* GetHitList() const {return fRawHitList; } TClonesArray* GetHitList() const {return fRawHitList; }
void CreateMissReportParms(const char *prefix); void CreateMissReportParms(const char *prefix);
void MissReport(const char *name); void MissReport(const char *name);
void DisableSlipCorrection() {fDisableSlipCorrection = kTRUE;}
UInt_t fNRawHits; UInt_t fNRawHits;
Int_t fNMaxRawHits; Int_t fNMaxRawHits;
...@@ -82,6 +83,7 @@ protected: ...@@ -82,6 +83,7 @@ protected:
Decoder::THaCrateMap* fMap; /* The Crate map */ Decoder::THaCrateMap* fMap; /* The Crate map */
Int_t fTISlot; Int_t fTISlot;
Int_t fTICrate; Int_t fTICrate;
Double_t fDisableSlipCorrection;
std::map<Int_t, Int_t> fTrigTimeShiftMap; std::map<Int_t, Int_t> fTrigTimeShiftMap;
std::map<Int_t, Decoder::Fadc250Module*> fFADCSlotMap; std::map<Int_t, Decoder::Fadc250Module*> fFADCSlotMap;
......
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