diff --git a/src/THcAerogel.cxx b/src/THcAerogel.cxx index d43d30b207ed0214a20c41a8ea5c3b01ef079f82..a9501a63ad199167446bcd79a47818048c11921d 100644 --- a/src/THcAerogel.cxx +++ b/src/THcAerogel.cxx @@ -221,6 +221,8 @@ Int_t THcAerogel::ReadDatabase( const TDatime& date ) prefix[0]=tolower(GetApparatus()->GetName()[0]); prefix[1]='\0'; + CreateMissReportParms(Form("%saero",prefix)); + fNRegions = 1; // Default if not set in parameter file DBRequest listextra[]={ diff --git a/src/THcCherenkov.cxx b/src/THcCherenkov.cxx index 82eed2667cb3ab1b2fa6508c6d741cd9cd3c2694..8486c0895d003db90ac76c96533175534e0b93c2 100644 --- a/src/THcCherenkov.cxx +++ b/src/THcCherenkov.cxx @@ -183,6 +183,8 @@ Int_t THcCherenkov::ReadDatabase( const TDatime& date ) string prefix = string(GetApparatus()->GetName()).substr(0, 1) + GetName(); std::transform(prefix.begin(), prefix.end(), prefix.begin(), ::tolower); + CreateMissReportParms(prefix.c_str()); + fNRegions = 4; // Defualt if not set in paramter file DBRequest list_1[] = { diff --git a/src/THcDC.cxx b/src/THcDC.cxx index b4b7d918ad2524bb1e686669db38dd08eb1ac392..624475a984bceaaea80248c6fae037de191fbce4 100644 --- a/src/THcDC.cxx +++ b/src/THcDC.cxx @@ -212,6 +212,8 @@ THaAnalysisObject::EStatus THcDC::Init( const TDatime& date ) InitHitList(fDetMap, "THcRawDCHit", fDetMap->GetTotNumChan()+1, fTDC_RefTimeCut, 0); + CreateMissReportParms(Form("%sdc",fPrefix)); + EStatus status; // This triggers call of ReadDatabase and DefineVariables if( (status = THaTrackingDetector::Init( date )) ) diff --git a/src/THcHitList.cxx b/src/THcHitList.cxx index 3489065b81dcc5ece6ef17bf573347fff0af34ea..55d645f0010751a7f14c10fc8309becb9dc5f81f 100644 --- a/src/THcHitList.cxx +++ b/src/THcHitList.cxx @@ -13,6 +13,8 @@ #include "THcConfigEvtHandler.h" #include "THaGlobals.h" +#include "THcGlobals.h" +#include "THcParmList.h" #include "TList.h" using namespace std; @@ -395,6 +397,19 @@ Int_t THcHitList::DecodeToHitList( const THaEvData& evdata, Bool_t suppresswarni fNADCRef_miss += (adcref_miss ? 1 : 0); return fNRawHits; // Does anything care what is returned } +void THcHitList::CreateMissReportParms(const char *prefix) +{ + /** + +\brief Create parameters to hold missing reference time statistics + +Parameters created are ${prefix}_tdcref_miss and ${prefix}_adcref_miss + + */ + cout << "Defining " << Form("%s_tdcref_miss", prefix) << " and " << Form("%s_adcref_miss", prefix) << endl; + gHcParms->Define(Form("%s_tdcref_miss", prefix), "Missing TDC reference times", fNTDCRef_miss); + gHcParms->Define(Form("%s_adcref_miss", prefix), "Missing ADC reference times", fNADCRef_miss); +} void THcHitList::MissReport(const char *name) { cout << "Missing Ref times:" << setw(20) << name << setw(10) << fNTDCRef_miss << setw(10) << fNADCRef_miss << endl; diff --git a/src/THcHitList.h b/src/THcHitList.h index 4b378ceb4786bcd88c0f672a3129f0ac975dc15d..ba907c55afba1be21cbaa15d91b7485c5853e4d0 100644 --- a/src/THcHitList.h +++ b/src/THcHitList.h @@ -35,6 +35,7 @@ public: Int_t tdcref_cut=0, Int_t adcref_cut=0); TClonesArray* GetHitList() const {return fRawHitList; } + void CreateMissReportParms(const char *prefix); void MissReport(const char *name); UInt_t fNRawHits; diff --git a/src/THcHodoscope.cxx b/src/THcHodoscope.cxx index 3f5e9f97aff5c58955b3c17558696f7c8d70d745..18ec9f6b5ff3e7d638d84a4512b254d157da6038 100644 --- a/src/THcHodoscope.cxx +++ b/src/THcHodoscope.cxx @@ -238,6 +238,8 @@ Int_t THcHodoscope::ReadDatabase( const TDatime& date ) // Int_t plen=strlen(parname); // cout << " readdatabse hodo fnplanes = " << fNPlanes << endl; + CreateMissReportParms(Form("%sscin",prefix)); + fBetaNoTrk = 0.; fBetaNoTrkChiSq = 0.; diff --git a/src/THcShower.cxx b/src/THcShower.cxx index a0ebc2e2739285666028410d8d74c5d716a301c4..00c5f92a4f7d6bd42fe9de34ae8bdddc81fbc8b8 100644 --- a/src/THcShower.cxx +++ b/src/THcShower.cxx @@ -212,6 +212,8 @@ Int_t THcShower::ReadDatabase( const TDatime& date ) prefix[0]=tolower(GetApparatus()->GetName()[0]); prefix[1]='\0'; + CreateMissReportParms(Form("%scal",prefix)); + fNegCols = fNLayers; // If not defined assume tube on each end // for every layer { diff --git a/src/THcTrigDet.cxx b/src/THcTrigDet.cxx index 507afccb6ecfb7a74431e7011777599d0567f9bc..f00f6a295dae44dd05f300e2441840b2d2f93ae4 100644 --- a/src/THcTrigDet.cxx +++ b/src/THcTrigDet.cxx @@ -181,6 +181,7 @@ THaAnalysisObject::EStatus THcTrigDet::Init(const TDatime& date) { // Initialize hitlist part of the class. // printf(" Init trig det hitlist\n"); InitHitList(fDetMap, "THcTrigRawHit", 100); + CreateMissReportParms(fKwPrefix.c_str()); fPresentP = 0; THaVar* vpresent = gHaVars->Find(Form("%s.present",fSpectName.Data()));