From 9409a6a3e3edc18b32d3e2127b73d3ad45e01c29 Mon Sep 17 00:00:00 2001 From: "Stephen A. Wood" <saw@jlab.org> Date: Mon, 7 Oct 2013 13:36:20 -0400 Subject: [PATCH] Fix compiler warning messages. Closes #3 for now. --- src/THcDC.cxx | 3 --- src/THcDCLookupTTDConv.h | 2 +- src/THcDriftChamberPlane.cxx | 4 +--- src/THcHodoscope.cxx | 8 ++++---- src/THcParmList.cxx | 1 - src/THcScintillatorPlane.cxx | 1 - src/THcShower.cxx | 6 +++--- src/THcShowerPlane.cxx | 3 +-- 8 files changed, 10 insertions(+), 18 deletions(-) diff --git a/src/THcDC.cxx b/src/THcDC.cxx index e24162d..b963890 100644 --- a/src/THcDC.cxx +++ b/src/THcDC.cxx @@ -81,7 +81,6 @@ void THcDC::Setup(const char* name, const char* description) static const char* const here = "Setup"; char prefix[2]; - char parname[100]; THaApparatus *app = GetApparatus(); if(app) { @@ -233,7 +232,6 @@ Int_t THcDC::ReadDatabase( const TDatime& date ) // static const char* const here = "ReadDatabase()"; char prefix[2]; - char parname[100]; // Read data from database // Pull values from the THcParmList instead of reading a database @@ -494,7 +492,6 @@ Int_t THcDC::CoarseTrack( TClonesArray& tracks ) THcDCTrack *tr = static_cast<THcDCTrack*>( fDCTracks->At(itrack)); theTrack->Set(tr->GetX(), tr->GetY(), tr->GetXP(), tr->GetYP()); theTrack->SetFlag((UInt_t) 0); - Int_t nhits=tr->GetNHits(); // Need to look at how engine does chi2 and track selection. Reduced? theTrack->SetChi2(tr->GetChisq(),tr->GetNFree()); // CalcFocalPlaneCoords. Aren't our tracks already in focal plane coords diff --git a/src/THcDCLookupTTDConv.h b/src/THcDCLookupTTDConv.h index 95623b1..e1bbea1 100644 --- a/src/THcDCLookupTTDConv.h +++ b/src/THcDCLookupTTDConv.h @@ -24,9 +24,9 @@ public: protected: Double_t fT0; + Double_t fMaxDriftDistance; Double_t fBinSize; Int_t fNumBins; - Double_t fMaxDriftDistance; Double_t* fTable; ClassDef(THcDCLookupTTDConv,0) // VDC Analytic TTD Conv class diff --git a/src/THcDriftChamberPlane.cxx b/src/THcDriftChamberPlane.cxx index 7294648..fb97cc9 100644 --- a/src/THcDriftChamberPlane.cxx +++ b/src/THcDriftChamberPlane.cxx @@ -85,7 +85,6 @@ Int_t THcDriftChamberPlane::ReadDatabase( const TDatime& date ) static const char* const here = "ReadDatabase()"; char prefix[2]; - char parname[100]; Int_t NumDriftMapBins; Double_t DriftMapFirstBin; Double_t DriftMapBinSize; @@ -203,8 +202,7 @@ Int_t THcDriftChamberPlane::ReadDatabase( const TDatime& date ) for (int i=0; i<nWires; i++) { Double_t pos = fPitch*( (fWireOrder==0?(i+1):fNWires-i) - fCentralWire) - fCenter; - THcDCWire* wire = new((*fWires)[i]) - THcDCWire( i+1, pos , 0.0, fTTDConv); + new((*fWires)[i]) THcDCWire( i+1, pos , 0.0, fTTDConv); //if( something < 0 ) wire->SetFlag(1); } diff --git a/src/THcHodoscope.cxx b/src/THcHodoscope.cxx index 4a7f365..7b75dbe 100644 --- a/src/THcHodoscope.cxx +++ b/src/THcHodoscope.cxx @@ -58,9 +58,9 @@ THcHodoscope::THcHodoscope( ) : void THcHodoscope::Setup(const char* name, const char* description) { - static const char* const here = "Setup()"; - static const char* const message = - "Must construct %s detector with valid name! Object construction failed."; + // static const char* const here = "Setup()"; + // static const char* const message = + // "Must construct %s detector with valid name! Object construction failed."; cout << "In THcHodoscope::Setup()" << endl; // Base class constructor failed? @@ -316,7 +316,7 @@ Int_t THcHodoscope::ReadDatabase( const TDatime& date ) prefix[1]='\0'; strcpy(parname,prefix); strcat(parname,"scin_"); - Int_t plen=strlen(parname); + // Int_t plen=strlen(parname); cout << " readdatabse hodo fnplanes = " << fNPlanes << endl; fNPaddle = new Int_t [fNPlanes]; // fSpacing = new Double_t [fNPlanes]; diff --git a/src/THcParmList.cxx b/src/THcParmList.cxx index 4edf5e2..dd41698 100644 --- a/src/THcParmList.cxx +++ b/src/THcParmList.cxx @@ -61,7 +61,6 @@ void THcParmList::Load( const char* fname, Int_t RunNumber ) } string line; - Int_t nlines_read = 0, nparameters_read = 0; char varname[100]; Int_t InRunRange; Int_t currentindex = 0; diff --git a/src/THcScintillatorPlane.cxx b/src/THcScintillatorPlane.cxx index 6595540..c326fe0 100644 --- a/src/THcScintillatorPlane.cxx +++ b/src/THcScintillatorPlane.cxx @@ -147,7 +147,6 @@ Int_t THcScintillatorPlane::ReadDatabase( const TDatime& date ) strcpy(parname,prefix); strcat(parname,"scin_"); strcat(parname,GetName()); - Int_t plen=strlen(parname); strcat(parname,"_nr"); fNelem = *(Int_t *)gHcParms->Find(parname)->GetValuePointer(); // diff --git a/src/THcShower.cxx b/src/THcShower.cxx index f57f2e4..5dec187 100644 --- a/src/THcShower.cxx +++ b/src/THcShower.cxx @@ -643,7 +643,7 @@ Int_t THcShower::CoarseProcess( TClonesArray& tracks) if (fdbg_clusters_cal) { cout << "Total hits: " << fNhits << endl; - for (UInt_t i=0; i!=fNhits; i++) { + for (Int_t i=0; i!=fNhits; i++) { cout << "unclustered hit " << i << ": "; (*(HitList.begin()+i))->show(); } @@ -659,7 +659,7 @@ Int_t THcShower::CoarseProcess( TClonesArray& tracks) fNclust = (*ClusterList).NbClusters(); if (fdbg_clusters_cal) cout << "Cluster_list size: " << fNclust << endl; - for (UInt_t i=0; i!=fNclust; i++) { + for (Int_t i=0; i!=fNclust; i++) { THcShowerCluster* cluster = (*ClusterList).ListedCluster(i); @@ -687,7 +687,7 @@ Int_t THcShower::CoarseProcess( TClonesArray& tracks) THcShowerCluster* MaxCluster = (*ClusterList).ListedCluster(0); fE = (*MaxCluster).clE(); - for (UInt_t i=1; i<fNclust; i++) { + for (Int_t i=1; i<fNclust; i++) { THcShowerCluster* cluster = (*ClusterList).ListedCluster(i); diff --git a/src/THcShowerPlane.cxx b/src/THcShowerPlane.cxx index 509ff3a..edafce1 100644 --- a/src/THcShowerPlane.cxx +++ b/src/THcShowerPlane.cxx @@ -92,7 +92,7 @@ Int_t THcShowerPlane::ReadDatabase( const TDatime& date ) // See what file it looks for - static const char* const here = "ReadDatabase()"; + // static const char* const here = "ReadDatabase()"; char prefix[2]; char parname[100]; @@ -102,7 +102,6 @@ Int_t THcShowerPlane::ReadDatabase( const TDatime& date ) strcpy(parname,prefix); strcat(parname,"cal_"); strcat(parname,GetName()); - Int_t plen=strlen(parname); strcat(parname,"_nr"); cout << " Getting value of SHOWER!!!" << parname << endl; -- GitLab