From 6bbdc11a31348f6dbcd8c18d4dee0ffaf52dec54 Mon Sep 17 00:00:00 2001 From: cblume Date: Thu, 20 Aug 2009 07:48:28 +0000 Subject: [PATCH] Coding rules --- TRD/AliTRDCalibPadStatus.cxx | 11 +++++------ TRD/AliTRDCalibPadStatus.h | 3 +-- TRD/AliTRDCalibraFillHisto.cxx | 21 ++++++++++----------- TRD/AliTRDCalibraFillHisto.h | 26 ++++++++++---------------- TRD/AliTRDCalibraFit.cxx | 2 +- TRD/AliTRDCalibraFit.h | 7 ++++--- TRD/AliTRDCalibraVdriftLinearFit.cxx | 3 +-- TRD/AliTRDCalibraVdriftLinearFit.h | 3 +-- TRD/AliTRDCalibraVector.cxx | 27 ++++++++++++++++++++++++--- TRD/AliTRDCalibraVector.h | 1 - TRD/TRDPEDESTALda.cxx | 8 ++++---- TRD/TRDVDRIFTda.cxx | 14 +++++++------- 12 files changed, 68 insertions(+), 58 deletions(-) diff --git a/TRD/AliTRDCalibPadStatus.cxx b/TRD/AliTRDCalibPadStatus.cxx index 5c1545b1917..56813150338 100644 --- a/TRD/AliTRDCalibPadStatus.cxx +++ b/TRD/AliTRDCalibPadStatus.cxx @@ -57,12 +57,15 @@ // // //////////////////////////////////////////////////////////////////////////// + //Root includes #include #include #include #include #include + +//#include #include #include @@ -234,9 +237,6 @@ Int_t AliTRDCalibPadStatus::ProcessEvent(AliTRDrawStreamBase *rawStream, Bool_t // 0 time bin problem or zero suppression // 1 no input // 2 input - // - - // // Raw version number: // [3,31] non zero suppressed // 2,4 and [32,63] zero suppressed @@ -363,10 +363,10 @@ Int_t AliTRDCalibPadStatus::ProcessEvent(AliRawReader *rawReader, Bool_t nocheck //_________________________________________________________________________ Int_t AliTRDCalibPadStatus::ProcessEvent( #ifdef ALI_DATE - eventHeaderStruct *event, + const eventHeaderStruct *event, Bool_t nocheck #else - eventHeaderStruct* /*event*/, + const eventHeaderStruct* /*event*/, Bool_t /*nocheck*/ #endif @@ -898,4 +898,3 @@ Int_t AliTRDCalibPadStatus::GetSector(Int_t d) const } - diff --git a/TRD/AliTRDCalibPadStatus.h b/TRD/AliTRDCalibPadStatus.h index e97bd3417d4..7375b64df00 100644 --- a/TRD/AliTRDCalibPadStatus.h +++ b/TRD/AliTRDCalibPadStatus.h @@ -37,7 +37,7 @@ public: Int_t ProcessEvent(AliTRDrawStreamBase *rawStream, Bool_t nocheck = kFALSE); Int_t ProcessEvent(AliRawReader *rawReader, Bool_t nocheck = kFALSE); - Int_t ProcessEvent(eventHeaderStruct *event, Bool_t nocheck = kFALSE); + Int_t ProcessEvent(const eventHeaderStruct *event, Bool_t nocheck = kFALSE); void Destroy(); Int_t UpdateHisto(const Int_t idet, const Int_t iRow, const Int_t iCol, @@ -107,4 +107,3 @@ public: }; #endif - diff --git a/TRD/AliTRDCalibraFillHisto.cxx b/TRD/AliTRDCalibraFillHisto.cxx index f41194fdb32..4e0b3c68468 100644 --- a/TRD/AliTRDCalibraFillHisto.cxx +++ b/TRD/AliTRDCalibraFillHisto.cxx @@ -48,6 +48,7 @@ #include #include #include +#include #include "AliLog.h" @@ -476,7 +477,7 @@ Bool_t AliTRDCalibraFillHisto::Init2Dhistos() } //____________Offline tracking in the AliTRDtracker____________________________ -Bool_t AliTRDCalibraFillHisto::UpdateHistograms(AliTRDtrack *t) +Bool_t AliTRDCalibraFillHisto::UpdateHistograms(const AliTRDtrack *t) { // // Use AliTRDtrack for the calibration @@ -613,7 +614,7 @@ Bool_t AliTRDCalibraFillHisto::UpdateHistograms(AliTRDtrack *t) } //____________Offline tracking in the AliTRDtracker____________________________ -Bool_t AliTRDCalibraFillHisto::UpdateHistogramsV1(AliTRDtrackV1 *t) +Bool_t AliTRDCalibraFillHisto::UpdateHistogramsV1(const AliTRDtrackV1 *t) { // // Use AliTRDtrackV1 for the calibration @@ -722,7 +723,7 @@ Bool_t AliTRDCalibraFillHisto::UpdateHistogramsV1(AliTRDtrackV1 *t) // Routine inside the update with AliTRDtrack /////////////////////////////////////////////////////////////////////////////////// //____________Offine tracking in the AliTRDtracker_____________________________ -Bool_t AliTRDCalibraFillHisto::FindP1TrackPHtracklet(AliTRDtrack *t, Int_t index0, Int_t index1) +Bool_t AliTRDCalibraFillHisto::FindP1TrackPHtracklet(const AliTRDtrack *t, Int_t index0, Int_t index1) { // // Drift velocity calibration: @@ -1016,7 +1017,7 @@ Bool_t AliTRDCalibraFillHisto::FindP1TrackPHtrackletV1(const AliTRDseedV1 *track return kTRUE; } //____________Offine tracking in the AliTRDtracker_____________________________ -Bool_t AliTRDCalibraFillHisto::HandlePRFtracklet(AliTRDtrack *t, Int_t index0, Int_t index1) +Bool_t AliTRDCalibraFillHisto::HandlePRFtracklet(const AliTRDtrack *t, Int_t index0, Int_t index1) { // // PRF width calibration @@ -1665,7 +1666,7 @@ Bool_t AliTRDCalibraFillHisto::HandlePRFtrackletV1(const AliTRDseedV1 *tracklet, // Pad row col stuff: see if masked or not /////////////////////////////////////////////////////////////////////////////////////// //_____________________________________________________________________________ -void AliTRDCalibraFillHisto::CheckGoodTrackletV1(AliTRDcluster *cl) +void AliTRDCalibraFillHisto::CheckGoodTrackletV1(const AliTRDcluster *cl) { // // See if we are not near a masked pad @@ -1676,7 +1677,7 @@ void AliTRDCalibraFillHisto::CheckGoodTrackletV1(AliTRDcluster *cl) } //_____________________________________________________________________________ -void AliTRDCalibraFillHisto::CheckGoodTrackletV0(Int_t detector, Int_t row, Int_t col) +void AliTRDCalibraFillHisto::CheckGoodTrackletV0(const Int_t detector,const Int_t row,const Int_t col) { // // See if we are not near a masked pad @@ -1897,7 +1898,7 @@ void AliTRDCalibraFillHisto::SetNumberGroupsPRF(Short_t numberGroupsPRF) // Per tracklet: store or reset the info, fill the histos with the info ////////////////////////////////////////////////////////////////////////////////////////// //_____________________________________________________________________________ -void AliTRDCalibraFillHisto::StoreInfoCHPHtrack(AliTRDcluster *cl, Double_t dqdl, Int_t *group, Int_t row, Int_t col) +void AliTRDCalibraFillHisto::StoreInfoCHPHtrack(const AliTRDcluster *cl,const Double_t dqdl,const Int_t *group,const Int_t row,const Int_t col) { // // Store the infos in fAmpTotal, fPHPlace and fPHValue @@ -2298,7 +2299,6 @@ Int_t AliTRDCalibraFillHisto::ProcessEventDAQ(AliTRDrawStreamBase *rawStream, Bo // 0 timebin problem // 1 no input // 2 input - // // Same algorithm as TestBeam but different reader // @@ -2476,10 +2476,10 @@ Int_t AliTRDCalibraFillHisto::ProcessEventDAQ(AliRawReader *rawReader, Bool_t no //_________________________________________________________________________ Int_t AliTRDCalibraFillHisto::ProcessEventDAQ( #ifdef ALI_DATE - eventHeaderStruct *event, + const eventHeaderStruct *event, Bool_t nocheck #else - eventHeaderStruct* /*event*/, + const eventHeaderStruct* /*event*/, Bool_t /*nocheck*/ #endif @@ -3186,4 +3186,3 @@ void AliTRDCalibraFillHisto::AnalyseLinearFitter() } } } - diff --git a/TRD/AliTRDCalibraFillHisto.h b/TRD/AliTRDCalibraFillHisto.h index 6560b361d7a..5e95dcd4235 100644 --- a/TRD/AliTRDCalibraFillHisto.h +++ b/TRD/AliTRDCalibraFillHisto.h @@ -1,5 +1,5 @@ #ifndef ALITRDCALIBRAFILLHISTO_H -#define ALITRDCALIBRAFILLHISTOs_H +#define ALITRDCALIBRAFILLHISTO_H /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * See cxx source for full Copyright notice */ @@ -14,15 +14,10 @@ #ifndef ROOT_TObject # include #endif -#ifndef ROOT_TLinearFitter -# include -#endif #ifndef ROOT_TProfile2D # include #endif -#ifndef ROOT_TH2I -# include -#endif + class TProfile2D; class TObjArray; @@ -67,13 +62,13 @@ class AliTRDCalibraFillHisto : public TObject { // Functions for initialising and filling with AliTRDtrackV1 Bool_t Init2Dhistos(); - Bool_t UpdateHistograms(AliTRDtrack *t); - Bool_t UpdateHistogramsV1(AliTRDtrackV1 *t); + Bool_t UpdateHistograms(const AliTRDtrack *t); + Bool_t UpdateHistogramsV1(const AliTRDtrackV1 *t); // Process events DAQ Int_t ProcessEventDAQ(AliTRDrawStreamBase *rawStream, Bool_t nocheck = kFALSE); Int_t ProcessEventDAQ(AliRawReader *rawReader, Bool_t nocheck = kFALSE); - Int_t ProcessEventDAQ(eventHeaderStruct *event, Bool_t nocheck = kFALSE); + Int_t ProcessEventDAQ(const eventHeaderStruct *event, Bool_t nocheck = kFALSE); // Is Pad on Bool_t IsPadOn(Int_t detector, Int_t row, Int_t col) const; @@ -258,12 +253,12 @@ AliTRDCalibraVector *GetCalibraVector() const { r // Calibration with AliTRDtrackV1 void FillTheInfoOfTheTrackPH(); void FillTheInfoOfTheTrackCH(Int_t nbclusters); - Bool_t FindP1TrackPHtracklet(AliTRDtrack *t, Int_t index0, Int_t index1); + Bool_t FindP1TrackPHtracklet(const AliTRDtrack *t, Int_t index0, Int_t index1); Bool_t FindP1TrackPHtrackletV1(const AliTRDseedV1 *tracklet, Int_t nbclusters); - Bool_t HandlePRFtracklet(AliTRDtrack *t, Int_t index0, Int_t index1); + Bool_t HandlePRFtracklet(const AliTRDtrack *t, Int_t index0, Int_t index1); Bool_t HandlePRFtrackletV1(const AliTRDseedV1 *tracklet, Int_t nbclusters); void ResetfVariablestracklet(); - void StoreInfoCHPHtrack(AliTRDcluster *cl, Double_t dqdl, Int_t *group, Int_t row, Int_t col); + void StoreInfoCHPHtrack(const AliTRDcluster *cl,const Double_t dqdl,const Int_t *group,const Int_t row,const Int_t col); void FillCH2d(Int_t x, Float_t y); // Calibration on DAQ @@ -274,8 +269,8 @@ AliTRDCalibraVector *GetCalibraVector() const { r // row col calibration groups stuff Bool_t LocalisationDetectorXbins(Int_t detector); Int_t CalculateTotalNumberOfBins(Int_t i); - void CheckGoodTrackletV0(Int_t detector, Int_t row, Int_t col); - void CheckGoodTrackletV1(AliTRDcluster *cl); + void CheckGoodTrackletV0(const Int_t detector,const Int_t row,const Int_t col); + void CheckGoodTrackletV1(const AliTRDcluster *cl); Int_t CalculateCalibrationGroup(Int_t i, Int_t row, Int_t col) const; // Clear @@ -303,4 +298,3 @@ AliTRDCalibraVector *GetCalibraVector() const { r #endif - diff --git a/TRD/AliTRDCalibraFit.cxx b/TRD/AliTRDCalibraFit.cxx index c472d7f361b..0e23bc13814 100644 --- a/TRD/AliTRDCalibraFit.cxx +++ b/TRD/AliTRDCalibraFit.cxx @@ -5978,4 +5978,4 @@ Double_t AliTRDCalibraFit::GausConstant(const Double_t *x, const Double_t *par) return gauss; -} +} \ No newline at end of file diff --git a/TRD/AliTRDCalibraFit.h b/TRD/AliTRDCalibraFit.h index 85063f336fa..20c10778bc7 100644 --- a/TRD/AliTRDCalibraFit.h +++ b/TRD/AliTRDCalibraFit.h @@ -13,8 +13,10 @@ #ifndef ROOT_TObject # include +#endif +#ifndef ROOT_TVectorD +# include #endif -#include class TTree; class TProfile2D; @@ -165,7 +167,7 @@ class AliTRDCalibraFit : public TObject { AliTRDFitInfo &operator=(const AliTRDFitInfo&) { return *this; } virtual ~AliTRDFitInfo() { if(fCoef) { delete [] fCoef;} } - void SetCoef(Float_t *coef) { fCoef = coef; } + void SetCoef(Float_t *coef) { fCoef = coef; } void SetDetector(Int_t detector) { fDetector = detector; } Float_t *GetCoef() const { return fCoef; } @@ -349,4 +351,3 @@ class AliTRDCalibraFit : public TObject { #endif - diff --git a/TRD/AliTRDCalibraVdriftLinearFit.cxx b/TRD/AliTRDCalibraVdriftLinearFit.cxx index 3ac80ee67fe..01d3c9aa8cc 100644 --- a/TRD/AliTRDCalibraVdriftLinearFit.cxx +++ b/TRD/AliTRDCalibraVdriftLinearFit.cxx @@ -144,7 +144,7 @@ void AliTRDCalibraVdriftLinearFit::Copy(TObject &c) const } //_____________________________________________________________________________ -Long64_t AliTRDCalibraVdriftLinearFit::Merge(TCollection* list) +Long64_t AliTRDCalibraVdriftLinearFit::Merge(const TCollection* list) { // Merge list of objects (needed by PROOF) @@ -337,4 +337,3 @@ void AliTRDCalibraVdriftLinearFit::FillPEArray() } } - diff --git a/TRD/AliTRDCalibraVdriftLinearFit.h b/TRD/AliTRDCalibraVdriftLinearFit.h index 824f3712a92..bc0aaf2ec0c 100644 --- a/TRD/AliTRDCalibraVdriftLinearFit.h +++ b/TRD/AliTRDCalibraVdriftLinearFit.h @@ -28,7 +28,7 @@ class AliTRDCalibraVdriftLinearFit : public TObject { AliTRDCalibraVdriftLinearFit(const AliTRDCalibraVdriftLinearFit &ped); AliTRDCalibraVdriftLinearFit(const TObjArray &obja); virtual ~AliTRDCalibraVdriftLinearFit(); - virtual Long64_t Merge(TCollection* list); + virtual Long64_t Merge(const TCollection* list); virtual void Copy(TObject &c) const; AliTRDCalibraVdriftLinearFit& operator = (const AliTRDCalibraVdriftLinearFit &source); @@ -59,4 +59,3 @@ class AliTRDCalibraVdriftLinearFit : public TObject { #endif - diff --git a/TRD/AliTRDCalibraVector.cxx b/TRD/AliTRDCalibraVector.cxx index 94a128202bf..40b638835ec 100644 --- a/TRD/AliTRDCalibraVector.cxx +++ b/TRD/AliTRDCalibraVector.cxx @@ -1300,6 +1300,9 @@ AliTRDPrfInfo* AliTRDCalibraVector::GetMeanSquaresPRF(Int_t det //_____________________________________________________________________________ Int_t AliTRDCalibraVector::GetTotalNumberOfBinsInDetector(Int_t det, Int_t i, Int_t nbBin) const { + // + // Get the total number of bins (Nb of bins*Nb of groups) in the detector det for the group i + // Int_t ngroup = 0; Int_t stack = AliTRDgeometry::GetStack(det); @@ -1312,6 +1315,9 @@ Int_t AliTRDCalibraVector::GetTotalNumberOfBinsInDetector(Int_t det, Int_t i, In //____________________________________________________________________________ Int_t AliTRDCalibraVector::GetNz(Int_t i) const { + // + // Get Nz the granularity in row + // Int_t nz = 0; if(i==0) nz = (Int_t)(fModeCH>>4); @@ -1324,6 +1330,9 @@ Int_t AliTRDCalibraVector::GetNz(Int_t i) const //____________________________________________________________________________ Int_t AliTRDCalibraVector::GetNrphi(Int_t i) const { + // + // Get Nrphi the granularity in col + // Int_t nrphi = 0; if(i==0) nrphi = (Int_t)(fModeCH&15); @@ -1336,6 +1345,9 @@ Int_t AliTRDCalibraVector::GetNrphi(Int_t i) const //_________________________________________________________________________________ TString AliTRDCalibraVector::GetNamePH() const { + // + // Get the name of PH to know the granularity + // Int_t nz = GetNz(1); Int_t nrphi = GetNrphi(1); @@ -1351,6 +1363,9 @@ TString AliTRDCalibraVector::GetNamePH() const //_________________________________________________________________________________ TString AliTRDCalibraVector::GetNameCH() const { + // + // Get the name of CH to know the granularity + // Int_t nz = GetNz(0); Int_t nrphi = GetNrphi(0); @@ -1366,7 +1381,10 @@ TString AliTRDCalibraVector::GetNameCH() const //_________________________________________________________________________________ TString AliTRDCalibraVector::GetNamePRF() const { - + // + // Get the name of PRF to know the granularity + // + Int_t nz = GetNz(2); Int_t nrphi = GetNrphi(2); @@ -1381,7 +1399,11 @@ TString AliTRDCalibraVector::GetNamePRF() const } //____________________________________________________________________________ -void AliTRDCalibraVector::SetNzNrphi(Int_t i, Int_t nz, Int_t nrphi) { +void AliTRDCalibraVector::SetNzNrphi(Int_t i, Int_t nz, Int_t nrphi) +{ + // + // Set NzNrphi for the granularity + // if(i==0) { fModeCH = nz; @@ -1400,4 +1422,3 @@ void AliTRDCalibraVector::SetNzNrphi(Int_t i, Int_t nz, Int_t nrphi) { } } - diff --git a/TRD/AliTRDCalibraVector.h b/TRD/AliTRDCalibraVector.h index af58cbbb30d..aea01b6ac82 100644 --- a/TRD/AliTRDCalibraVector.h +++ b/TRD/AliTRDCalibraVector.h @@ -158,4 +158,3 @@ class AliTRDCalibraVector : public TObject { #endif - diff --git a/TRD/TRDPEDESTALda.cxx b/TRD/TRDPEDESTALda.cxx index 50967eed9fb..49fe7d996c8 100644 --- a/TRD/TRDPEDESTALda.cxx +++ b/TRD/TRDPEDESTALda.cxx @@ -81,7 +81,7 @@ int main(int argc, char **argv) { /* init some counters */ - int nevents_total=0; + int neventstotal=0; int nevents =0; //Instance of AliCDBManager: needed by AliTRDRawStream @@ -155,7 +155,7 @@ int main(int argc, char **argv) { } - nevents_total++; + neventstotal++; /* free resources */ free(event); @@ -164,7 +164,7 @@ int main(int argc, char **argv) { /* report progress */ - printf("%d events processed and %d used\n",nevents_total,nevents); + printf("%d events processed and %d used\n",neventstotal,nevents); /* write file in any case to see what happens in case of problems*/ TFile *fileTRD = new TFile(RESULT_FILE,"recreate"); @@ -182,4 +182,4 @@ int main(int argc, char **argv) { return status; -} +} \ No newline at end of file diff --git a/TRD/TRDVDRIFTda.cxx b/TRD/TRDVDRIFTda.cxx index 48b64e16b5a..d31e69e3d33 100644 --- a/TRD/TRDVDRIFTda.cxx +++ b/TRD/TRDVDRIFTda.cxx @@ -100,8 +100,8 @@ int main(int argc, char **argv) { /* init some counters */ - int nevents_physics=0; - int nevents_total=0; + int neventsphysics=0; + int neventstotal=0; //Instance of AliCDBManager: needed by AliTRDrawStream //AliCDBManager *man = AliCDBManager::Instance(); @@ -153,7 +153,7 @@ int main(int argc, char **argv) { continue; } - if( ((Int_t)nevents_total)%1000 == 0 ) printf(" event number %d (physic event number %d) will be processed\n",(Int_t) nevents_total,(Int_t) nevents_physics); + if( ((Int_t)neventstotal)%1000 == 0 ) printf(" event number %d (physic event number %d) will be processed\n",(Int_t) neventstotal,(Int_t) neventsphysics); /* use event - here, just write event id to result file */ @@ -178,11 +178,11 @@ int main(int argc, char **argv) { if(eventT==PHYSICS_EVENT){ - nevents_physics++; + neventsphysics++; } - nevents_total++; + neventstotal++; /* free resources */ @@ -197,7 +197,7 @@ int main(int argc, char **argv) { /* report progress */ - printf("%d events processed and %d used\n",nevents_total,nbvdrift); + printf("%d events processed and %d used\n",neventstotal,nbvdrift); // // Write a local file and put it on the FX @@ -219,4 +219,4 @@ int main(int argc, char **argv) { delete fileTRD; return status; -} +} \ No newline at end of file -- 2.43.0