diff --git a/src/THcAerogel.cxx b/src/THcAerogel.cxx index 475873c51711564b9edd357903a0b28da804a9c2..9f9e4217ab3b2f3fc90d6540e68f7d68f5cdce80 100644 --- a/src/THcAerogel.cxx +++ b/src/THcAerogel.cxx @@ -1023,6 +1023,11 @@ void THcAerogel::Print(const Option_t* opt) const cout << " fMinPeds = " << fMinPeds << endl; cout << endl; } - +//_____________________________________________________________________________ +Int_t THcAerogel::End(THaRunBase* run) +{ + MissReport(Form("%s.%s", GetApparatus()->GetName(), GetName())); + return 0; +} ClassImp(THcAerogel) //////////////////////////////////////////////////////////////////////////////// diff --git a/src/THcAerogel.h b/src/THcAerogel.h index b084123101a0579cf55db6b13f47b16147fb12d3..34be99ef9e878892e9366235ffe292ee5b30e427 100644 --- a/src/THcAerogel.h +++ b/src/THcAerogel.h @@ -30,6 +30,7 @@ class THcAerogel : public THaNonTrackingDetector, public THcHitList { virtual Int_t FineProcess(TClonesArray& tracks); virtual Int_t ApplyCorrections(void); virtual EStatus Init(const TDatime& run_time); + Int_t End(THaRunBase* run=0); void InitArrays(); void DeleteArrays(); diff --git a/src/THcCherenkov.cxx b/src/THcCherenkov.cxx index a8e4dc644925d90451d916606de8d7d7ac070083..1e44e79660bbcc449e9b357e1cee557eae5603a7 100644 --- a/src/THcCherenkov.cxx +++ b/src/THcCherenkov.cxx @@ -620,6 +620,11 @@ Double_t THcCherenkov::GetCerNPE() { return fNpeSum; } - +//_____________________________________________________________________________ +Int_t THcCherenkov::End(THaRunBase* run) +{ + MissReport(Form("%s.%s", GetApparatus()->GetName(), GetName())); + return 0; +} ClassImp(THcCherenkov) //////////////////////////////////////////////////////////////////////////////// diff --git a/src/THcCherenkov.h b/src/THcCherenkov.h index 3ea8c93565bc582d165cb431d3e7aa7768656d70..5c9e0cc770ffd86328242fc07e936e624af5f4af 100644 --- a/src/THcCherenkov.h +++ b/src/THcCherenkov.h @@ -30,6 +30,8 @@ class THcCherenkov : public THaNonTrackingDetector, public THcHitList { virtual Int_t FineProcess(TClonesArray& tracks); virtual Int_t ApplyCorrections( void ); virtual EStatus Init(const TDatime& run_time); + Int_t End(THaRunBase* run); + void InitArrays(); void DeleteArrays(); diff --git a/src/THcDC.cxx b/src/THcDC.cxx index 9a7b91a3ca7becfc88e53686481be01afb3908b6..44ab6bc6ec7384f2dfd52801931a8cecc595fece 100644 --- a/src/THcDC.cxx +++ b/src/THcDC.cxx @@ -1173,6 +1173,7 @@ Double_t THcDC::DpsiFun(Double_t ray[4], Int_t plane) Int_t THcDC::End(THaRunBase* run) { // EffCalc(); + MissReport(Form("%s.%s", GetApparatus()->GetName(), GetName())); return 0; } diff --git a/src/THcDC.h b/src/THcDC.h index 867306d199c1a4dd637b8644f88f9f6da3f6fd7c..7d1c6ae85694192dec4f45af00e98e38227ece7d 100644 --- a/src/THcDC.h +++ b/src/THcDC.h @@ -29,6 +29,7 @@ public: virtual Int_t Decode( const THaEvData& ); virtual EStatus Init( const TDatime& run_time ); + virtual Int_t End(THaRunBase* run=0); virtual Int_t CoarseTrack( TClonesArray& tracks ); virtual Int_t FineTrack( TClonesArray& tracks ); @@ -197,7 +198,6 @@ protected: void LinkStubs(); void TrackFit(); Double_t DpsiFun(Double_t ray[4], Int_t plane); - Int_t End(THaRunBase* run); void EffInit(); void Eff(); diff --git a/src/THcHitList.cxx b/src/THcHitList.cxx index 69f40791530158ba78b3e8e6a2bf4217ca11846c..e934490b9312fab2f11b9544dd7239b2586210f6 100644 --- a/src/THcHitList.cxx +++ b/src/THcHitList.cxx @@ -133,6 +133,9 @@ void THcHitList::InitHitList(THaDetMap* detmap, fPSE125 = 0; } fHaveFADCInfo = kFALSE; + + fNTDCRef_miss = 0; + fNADCRef_miss = 0; } /** @@ -151,6 +154,8 @@ Int_t THcHitList::DecodeToHitList( const THaEvData& evdata, Bool_t suppresswarni // cout << " Clearing TClonesArray " << endl; fRawHitList->Clear( ); fNRawHits = 0; + Bool_t tdcref_miss = kFALSE; + Bool_t adcref_miss = kFALSE; // Get the indexed reference times for this event for(Int_t i=0;i<fNRefIndex;i++) { @@ -250,6 +255,7 @@ Int_t THcHitList::DecodeToHitList( const THaEvData& evdata, Bool_t suppresswarni cout << "HitList(event=" << evdata.GetEvNum() << "): refchan " << d->refchan << " missing for (" << d->crate << ", " << d->slot << ", " << chan << ")" << endl; + tdcref_miss = kTRUE; } } } else { @@ -264,6 +270,7 @@ Int_t THcHitList::DecodeToHitList( const THaEvData& evdata, Bool_t suppresswarni ", " << fRefIndexMaps[d->refindex].channel << ")" << " missing for (" << d->crate << ", " << d->slot << ", " << chan << ")" << endl; + tdcref_miss = kTRUE; } } } @@ -310,6 +317,7 @@ Int_t THcHitList::DecodeToHitList( const THaEvData& evdata, Bool_t suppresswarni cout << "HitList(event=" << evdata.GetEvNum() << "): refchan " << d->refchan << " missing for (" << d->crate << ", " << d->slot << ", " << chan << ")" << endl; + adcref_miss = kTRUE; } } } else { @@ -324,6 +332,7 @@ Int_t THcHitList::DecodeToHitList( const THaEvData& evdata, Bool_t suppresswarni ", " << fRefIndexMaps[d->refindex].channel << ")" << " missing for (" << d->crate << ", " << d->slot << ", " << chan << ")" << endl; + adcref_miss = kTRUE; } } } @@ -333,7 +342,14 @@ Int_t THcHitList::DecodeToHitList( const THaEvData& evdata, Bool_t suppresswarni } fRawHitList->Sort(fNRawHits); + fNTDCRef_miss += (tdcref_miss ? 1 : 0); + fNADCRef_miss += (adcref_miss ? 1 : 0); + return fNRawHits; // Does anything care what is returned } +void THcHitList::MissReport(const char *name) +{ + cout << "Missing Ref times:" << setw(20) << name << setw(10) << fNTDCRef_miss << setw(10) << fNADCRef_miss << endl; +} ClassImp(THcHitList) diff --git a/src/THcHitList.h b/src/THcHitList.h index eb576f28a0f4798097e07250f48e7c6b44a7cdd1..eb2ec85b1ebaee0428c33d37ed963c0533ae075c 100644 --- a/src/THcHitList.h +++ b/src/THcHitList.h @@ -8,6 +8,7 @@ #include "TObject.h" #include "Decoder.h" +#include <iomanip> using namespace std; @@ -33,6 +34,7 @@ public: const char *hitclass, Int_t maxhits); TClonesArray* GetHitList() const {return fRawHitList; } + void MissReport(const char *name); UInt_t fNRawHits; Int_t fNMaxRawHits; @@ -65,6 +67,9 @@ protected: Int_t fNSB; Int_t fNPED; + Int_t fNTDCRef_miss; + Int_t fNADCRef_miss; + ClassDef(THcHitList,0); // List of raw hits sorted by plane, counter }; #endif diff --git a/src/THcHodoscope.cxx b/src/THcHodoscope.cxx index a27f0bee6fd2c47181277ee106c7582470d7602d..fc382e4d7519ec1837b7dc51621aa38cf995fb96 100644 --- a/src/THcHodoscope.cxx +++ b/src/THcHodoscope.cxx @@ -1586,5 +1586,11 @@ Int_t THcHodoscope::GetScinIndex( Int_t nSide, Int_t nPlane, Int_t nPaddle ) { Double_t THcHodoscope::GetPathLengthCentral() { return fPathLengthCentral; } +//_____________________________________________________________________________ +Int_t THcHodoscope::End(THaRunBase* run) +{ + MissReport(Form("%s.%s", GetApparatus()->GetName(), GetName())); + return 0; +} ClassImp(THcHodoscope) //////////////////////////////////////////////////////////////////////////////// diff --git a/src/THcHodoscope.h b/src/THcHodoscope.h index e61901c04a841419b272eb89b3d60b13811177c9..fb9ee76979b6efc1ace33b07ddc78a499eceaad0 100644 --- a/src/THcHodoscope.h +++ b/src/THcHodoscope.h @@ -46,6 +46,7 @@ public: virtual Int_t CoarseProcess( TClonesArray& tracks ); virtual Int_t FineProcess( TClonesArray& tracks ); + virtual Int_t End(THaRunBase* run=0); void EstimateFocalPlaneTime(void); virtual Int_t ApplyCorrections( void ); diff --git a/src/THcShower.cxx b/src/THcShower.cxx index c3c6564461a33b08ff2e70267abb5fb44b8c3d59..aefa5fa9d5ec5db316837471312cc3bfe1c3bf50 100644 --- a/src/THcShower.cxx +++ b/src/THcShower.cxx @@ -1230,6 +1230,12 @@ Int_t THcShower::FineProcess( TClonesArray& tracks ) Double_t THcShower::GetNormETot( ){ return fEtotNorm; } +//_____________________________________________________________________________ +Int_t THcShower::End(THaRunBase* run) +{ + MissReport(Form("%s.%s", GetApparatus()->GetName(), GetName())); + return 0; +} ClassImp(THcShower) //////////////////////////////////////////////////////////////////////////////// diff --git a/src/THcShower.h b/src/THcShower.h index 3a0adea9b26207656d6562818fb25841c19dc231..e69556be451bf4009eaa1ac77a3040d98d26e07f 100644 --- a/src/THcShower.h +++ b/src/THcShower.h @@ -252,6 +252,8 @@ protected: void ClusterHits(THcShowerHitSet& HitSet, THcShowerClusterList* ClusterList); + virtual Int_t End(THaRunBase *r = 0); + friend class THcShowerPlane; //to access debug flags. friend class THcShowerArray; //to access debug flags. diff --git a/src/THcTrigDet.cxx b/src/THcTrigDet.cxx index a6e5291e146f5e70432f93cc922b73a5b4a43319..507afccb6ecfb7a74431e7011777599d0567f9bc 100644 --- a/src/THcTrigDet.cxx +++ b/src/THcTrigDet.cxx @@ -470,5 +470,11 @@ Bool_t THcTrigDet::HaveIgnoreList() const { return( (eventtypes.size()>0) ? kTRUE : kFALSE); } +//_____________________________________________________________________________ +Int_t THcTrigDet::End(THaRunBase* run) +{ + MissReport(Form("%s.%s", GetApparatus()->GetName(), GetName())); + return 0; +} ClassImp(THcTrigDet) diff --git a/src/THcTrigDet.h b/src/THcTrigDet.h index 8ecb233c84f65435395303f1c6018e576e1064a9..bce03b4bbc67bab5fe13e04e049638d5f2c68064 100644 --- a/src/THcTrigDet.h +++ b/src/THcTrigDet.h @@ -31,6 +31,7 @@ class THcTrigDet : public THaDetector, public THcHitList { virtual void SetEvtType(int evtype); virtual Bool_t IsIgnoreType(Int_t evtype) const; virtual Bool_t HaveIgnoreList() const; + Int_t End(THaRunBase* run); protected: void Setup(const char* name, const char* description);