From 3846f8936b7bdf45add00d20ce70f55f6d3a3426 Mon Sep 17 00:00:00 2001 From: "Stephen A. Wood" <saw@jlab.org> Date: Mon, 13 Apr 2015 14:41:15 -0400 Subject: [PATCH] Remove unused "Define" methods These are left over from early development when there wasn't a table drive way to retrieve parameters. (Now we use gHcParms->LoadParmValues()) --- src/THcHodoscope.cxx | 119 ------------------------------------------- src/THcHodoscope.h | 5 -- 2 files changed, 124 deletions(-) diff --git a/src/THcHodoscope.cxx b/src/THcHodoscope.cxx index 68b5009..a3a28ef 100644 --- a/src/THcHodoscope.cxx +++ b/src/THcHodoscope.cxx @@ -231,125 +231,6 @@ THaAnalysisObject::EStatus THcHodoscope::Init( const TDatime& date ) return fStatus = kOK; } -//_____________________________________________________________________________ -Double_t THcHodoscope::DefineDoubleVariable(const char* fName) -{ - // Define a variale of type double by looking it up in the THcParmList - char prefix[2]; - char parname[100]; - Double_t tmpvar=-1e6; - prefix[0]=tolower(GetApparatus()->GetName()[0]); - prefix[1]='\0'; - strcpy(parname,prefix); - strcat(parname,fName); - if (gHcParms->Find(parname)) { - tmpvar=*(Double_t *)gHcParms->Find(parname)->GetValuePointer(); - if (fDebug>=1) cout << parname << " "<< tmpvar << endl; - } else { - cout << "*** ERROR!!! Could not find " << parname << " in the list of variables! ***" << endl; - } - return tmpvar; -} - -//_____________________________________________________________________________ -Int_t THcHodoscope::DefineIntVariable(const char* fName) -{ - // Define a variale of type int by looking it up in the THcParmList - char prefix[2]; - char parname[100]; - Int_t tmpvar=-100000; - prefix[0]=tolower(GetApparatus()->GetName()[0]); - prefix[1]='\0'; - strcpy(parname,prefix); - strcat(parname,fName); - if (gHcParms->Find(parname)) { - tmpvar=*(Int_t *)gHcParms->Find(parname)->GetValuePointer(); - if (fDebug>=1) cout << parname << " "<< tmpvar << endl; - } else { - cout << "*** ERROR!!! Could not find " << parname << " in the list of variables! ***" << endl; - } - return tmpvar; -} - -//_____________________________________________________________________________ -void THcHodoscope::DefineArray(const char* fName, const Int_t index, Double_t *myArray) -{ - char prefix[2]; - char parname[100]; - // Int_t tmpvar=-100000; - prefix[0]=tolower(GetApparatus()->GetName()[0]); - prefix[1]='\0'; - strcpy(parname,prefix); - strcat(parname,fName); - if (gHcParms->Find(parname)) { - if (fDebug >=1) cout <<parname; - Double_t* p = (Double_t *)gHcParms->Find(parname)->GetValuePointer(); - for(Int_t i=0;i<index;i++) { - myArray[i] = p[i]; - if (fDebug>=1) cout << " " << myArray[i]; - } - if (fDebug>=1) cout << endl; - - } - else { - cout <<" Could not find "<<parname<<" in the DataBase!!!\n"; - } -} - -//_____________________________________________________________________________ -void THcHodoscope::DefineArray(const char* fName, char** Suffix, const Int_t index, Double_t *myArray) -{ - // Try to read an array made up of what used to be (in the f77 days) a number of variables - // example: hscin_1x_center, hscin_1y_center, hscin_2x_center, hscin_2y_center will become scin_center - // - char prefix[2]; - char parname[100],parname2[100]; - // - prefix[0]=tolower(GetApparatus()->GetName()[0]); - prefix[1]='\0'; - strcpy(parname,prefix); - strcat(parname,fName); - for(Int_t i=0;i<index;i++) { - strcpy(parname2,Form(parname,Suffix[i])); - if (gHcParms->Find(parname2)) { - if (fDebug >=1) cout <<parname2; - myArray[i] = *(Double_t *)gHcParms->Find(parname2)->GetValuePointer(); - if (fDebug>=1) cout << " " << myArray[i]; - } - if (fDebug>=1) cout << endl; - else { - cout <<" Could not find "<<parname2<<" in the DataBase!!!\n"; - } - } -} - -//_____________________________________________________________________________ -void THcHodoscope::DefineArray(const char* fName, char** Suffix, const Int_t index, Int_t *myArray) -{ - // Try to read an array made up of what used to be (in the f77 days) a number of variables - // example: hscin_1x_center, hscin_1y_center, hscin_2x_center, hscin_2y_center will become scin_center - // - char prefix[2]; - char parname[100],parname2[100]; - // - prefix[0]=tolower(GetApparatus()->GetName()[0]); - prefix[1]='\0'; - strcpy(parname,prefix); - strcat(parname,fName); - for(Int_t i=0;i<index;i++) { - strcpy(parname2,Form(parname,Suffix[i])); - if (gHcParms->Find(parname2)) { - if (fDebug >=1) cout <<parname2; - myArray[i] = *(Int_t *)gHcParms->Find(parname2)->GetValuePointer(); - if (fDebug>=1) cout << " " << myArray[i]; - } - if (fDebug>=1) cout << endl; - else { - cout <<" Could not find "<<parname2<<" in the DataBase!!!\n"; - } - } -} - //_____________________________________________________________________________ Int_t THcHodoscope::ReadDatabase( const TDatime& date ) { diff --git a/src/THcHodoscope.h b/src/THcHodoscope.h index 8ce1b92..efc502b 100644 --- a/src/THcHodoscope.h +++ b/src/THcHodoscope.h @@ -272,11 +272,6 @@ protected: void DeleteArrays(); virtual Int_t ReadDatabase( const TDatime& date ); virtual Int_t DefineVariables( EMode mode = kDefine ); - Double_t DefineDoubleVariable(const char* fName); - Int_t DefineIntVariable(const char* fName); - void DefineArray(const char* fName, const Int_t index, Double_t *myArray); - void DefineArray(const char* fName, char** Suffix, const Int_t index, Double_t *myArray); - void DefineArray(const char* fName, char** Suffix, const Int_t index, Int_t *myArray); enum ESide { kLeft = 0, kRight = 1 }; virtual Double_t TimeWalkCorrection(const Int_t& paddle, -- GitLab