Coding rule violations
authorcblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 1 Feb 2012 12:26:49 +0000 (12:26 +0000)
committercblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 1 Feb 2012 12:26:49 +0000 (12:26 +0000)
TRD/AliTRDAnalysisTaskTP.cxx
TRD/AliTRDalignment.h
TRD/AliTRDarrayADC.cxx
TRD/AliTRDarrayDictionary.cxx
TRD/AliTRDarraySignal.cxx
TRD/AliTRDcluster.cxx
TRD/AliTRDcluster.h
TRD/AliTRDclusterizer.h
TRD/AliTRDdigitizer.cxx
TRD/AliTRDdigitsManager.cxx
TRD/AliTRDdigitsManager.h

index 486335e..0d214a0 100644 (file)
@@ -69,9 +69,12 @@ AliTRDAnalysisTaskTP::AliTRDAnalysisTaskTP()
   fArray(0x0),
   fFile(0x0)
 {
-  // default constructor
+  //
+  // Default constructor
+  //
 
 }
+
 //____________________________________________________________
 AliTRDAnalysisTaskTP::AliTRDAnalysisTaskTP(const char *name) :
   AliAnalysisTaskSE(name),
@@ -87,23 +90,35 @@ AliTRDAnalysisTaskTP::AliTRDAnalysisTaskTP(const char *name) :
   fArray(0x0),
   fFile(0x0)
 {
+  //
   // Constructor
+  //
+
   DefineOutput(1, TTree::Class());
   DefineOutput(2, TObjArray::Class());
 
 }
+
 //____________________________________________________________
-AliTRDAnalysisTaskTP::~AliTRDAnalysisTaskTP() {
+AliTRDAnalysisTaskTP::~AliTRDAnalysisTaskTP() 
+{
+  //
   // destructor
+  //
 
 }
+
 //____________________________________________________________
-void AliTRDAnalysisTaskTP::UserCreateOutputObjects() {
+void AliTRDAnalysisTaskTP::UserCreateOutputObjects() 
+{
+  //
+  // Create the output objects
+  //
 
   AliAlignObjParams alobj;  // initialize align obj.  
   TString option = GetOption();
 
-if (!fArrHists) fArrHists=new TObjArray;
+  if (!fArrHists) fArrHists=new TObjArray;
 
   fModpop = new TH2D("modpop","modpop",90,-0.5,89.5,30,-0.5,29.5);
   fModpop->SetXTitle("module nr");
@@ -115,8 +130,13 @@ if (!fArrHists) fArrHists=new TObjArray;
   fTree->Branch("SP","AliTrackPointArray", &fArray);
 
 }
+
 //____________________________________________________________
-void AliTRDAnalysisTaskTP::UserExec(Option_t *) {
+void AliTRDAnalysisTaskTP::UserExec(Option_t *) 
+{
+  //
+  // Exec function
+  //
 
   //AliESDEvent *fESD = dynamic_cast<AliESDEvent *>(fInputEvent);
   fESD = dynamic_cast<AliESDEvent *>(fInputEvent);
@@ -262,11 +282,14 @@ void AliTRDAnalysisTaskTP::UserExec(Option_t *) {
   PostData(1,fTree);
   PostData(2,fArrHists);
 }
+
 //____________________________________________________________
-void AliTRDAnalysisTaskTP::Terminate(Option_t */*option*/) {
+void AliTRDAnalysisTaskTP::Terminate(Option_t */*option*/) 
+{
   //
   // Terminate
   //
+
 }
 
 
index 364d257..c6a1967 100644 (file)
@@ -52,8 +52,8 @@ class AliTRDalignment : public TObject {
 
   // simple getters (for other getters see below)
 
-  void GetSm(int sm, double * const a)               {for (int i = 0; i < 6; i++) a[i] = fSm[sm][i];}
-  void GetCh(int ch, double * const a)               {for (int i = 0; i < 6; i++) a[i] = fCh[ch][i];}
+  void GetSm(int sm, double * const a) const         {for (int i = 0; i < 6; i++) a[i] = fSm[sm][i];}
+  void GetCh(int ch, double * const a) const         {for (int i = 0; i < 6; i++) a[i] = fCh[ch][i];}
   
   // dumping on screen
 
index 1730e7d..c8c48ea 100644 (file)
@@ -100,11 +100,8 @@ AliTRDarrayADC::~AliTRDarrayADC()
   // AliTRDarrayADC destructor
   //
 
-  if(fADC)
-    {
-      delete [] fADC;
-      fADC=0;
-    }
+  delete [] fADC;
+  fADC=0;
 
 }
 
index dcd7e82..3d5dfee 100644 (file)
@@ -106,11 +106,8 @@ AliTRDarrayDictionary::~AliTRDarrayDictionary()
   //   AliTRDarrayDictionary destructor
   //
 
-  if(fDictionary)
-    {
-      delete [] fDictionary;
-      fDictionary=0;
-    }
+  delete [] fDictionary;
+  fDictionary=0;
 
 }
 
index 828a04a..1293a20 100644 (file)
@@ -100,11 +100,8 @@ AliTRDarraySignal::~AliTRDarraySignal()
   // AliTRDarraySignal destructor
   //
 
-  if (fSignal)   
-    {
-      delete [] fSignal;
-      fSignal=0;  
-    }
+  delete [] fSignal;
+  fSignal=0;  
 
 }
 
index 4c612bf..a33d32d 100644 (file)
@@ -86,8 +86,8 @@ AliTRDcluster::AliTRDcluster(Int_t det, UChar_t col, UChar_t row, UChar_t time
 
 //___________________________________________________________________________
 AliTRDcluster::AliTRDcluster(Int_t det, Float_t q
-                           , Float_t *pos, Float_t *sig
-                           , Int_t *tracks, Char_t npads, Short_t * const signals
+                           , const Float_t *pos, const Float_t *sig
+                           , const Int_t *tracks, Char_t npads, Short_t * const signals
                            , UChar_t col, UChar_t row, UChar_t time
                            , Char_t timebin, Float_t center, UShort_t volid)
   :AliCluster(volid,pos[0],pos[1],pos[2],sig[0],sig[1],0.0,0x0) 
index 244497d..ce0c8e2 100644 (file)
@@ -36,8 +36,8 @@ public:
 
   AliTRDcluster();
   AliTRDcluster(Int_t det, UChar_t col, UChar_t row, UChar_t time, const Short_t *sig, UShort_t volid);
-  AliTRDcluster(Int_t det, Float_t q, Float_t *pos, Float_t *sig
-             , Int_t *tracks, Char_t npads, Short_t * const signals
+  AliTRDcluster(Int_t det, Float_t q, const Float_t *pos, const Float_t *sig
+             , const Int_t *tracks, Char_t npads, Short_t * const signals
              , UChar_t col, UChar_t row, UChar_t time
              , Char_t timebin, Float_t center, UShort_t volid);
   AliTRDcluster(const AliTRDtrackletWord *const tracklet, Int_t det, UShort_t volid);
index c583ea0..37d4239 100644 (file)
@@ -13,7 +13,6 @@
 
 #include <TNamed.h>
 
-#include "AliTRDrawStream.h"
 #include "AliTRDgeometry.h"
 
 class TFile;
@@ -26,6 +25,7 @@ class AliRawReader;
 class AliTRD;
 class AliTRDcluster;
 
+class AliTRDrawStream;
 class AliTRDarrayADC;
 class AliTRDarraySignal;
 class AliTRDdigitsManager;
@@ -136,55 +136,54 @@ protected:
 
   virtual void     AddClusterToArray(AliTRDcluster* cluster);
 
-private:
-  inline void      CalcAdditionalInfo(const MaxStruct &Max, Short_t *const signals, Int_t &nPadCount);
-
-protected:
-  const AliTRDReconstructor *fReconstructor; //! reconstructor
-  AliRunLoader        *fRunLoader;           //! Run Loader
-  TTree               *fClusterTree;         //! Tree with the cluster
-  TClonesArray        *fRecPoints;           //! Array of clusters
-  TClonesArray        *fTracklets;           //! Array of online tracklets
-  TClonesArray        *fTracks;              //! Array of GTU tracks
-
-  TTree               *fTrackletTree;        //! Tree for tracklets
-
-  AliTRDdigitsManager *fDigitsManager;       //! TRD digits manager
-
-  UInt_t              **fTrackletContainer;  //! tracklet container
-                                            // legacy code to avoid breakint AliHLTTRDClusterizer
-                                            // but it's useless
-
-  Int_t                fRawVersion;          //  Expected raw version of the data - default is 2
-
-  AliTRDtransform     *fTransform;           //! Transforms the reconstructed space points
-
-  AliTRDarrayADC      *fDigits;               // Array holding the digits
-  AliTRDSignalIndex   *fIndexes;              // Array holding the indexes to the digits
-  Short_t              fMaxThresh;            // Threshold value for the maximum
-  Short_t              fMaxThreshTest;        // Threshold value for the maximum to test agains
-  Short_t              fSigThresh;            // Threshold value for the digit signal
-  Float_t              fMinMaxCutSigma;       // Threshold value for the maximum (cut noise)
-  Float_t              fMinLeftRightCutSigma; // Threshold value for the sum pad (cut noise)
-  Int_t                fLayer;                // Current layer of the detector
-  Int_t                fDet;                  // Current detecor
-  UShort_t             fVolid;                // Volume ID
-  Int_t                fColMax;               // Number of Colums in one detector
-  Int_t                fTimeTotal;            // Number of time bins
-  AliTRDCalROC        *fCalGainFactorROC;     // Calibration object with pad wise values for the gain factors
-  Float_t              fCalGainFactorDetValue;// Calibration value for chamber wise noise
-  AliTRDCalROC        *fCalNoiseROC;          // Calibration object with pad wise values for the noise
-  Float_t              fCalNoiseDetValue;     // Calibration value for chamber wise noise
+  const AliTRDReconstructor *fReconstructor;     //! reconstructor
+  AliRunLoader        *fRunLoader;                //! Run Loader
+  TTree               *fClusterTree;              //! Tree with the cluster
+  TClonesArray        *fRecPoints;                //! Array of clusters
+  TClonesArray        *fTracklets;                //! Array of online tracklets
+  TClonesArray        *fTracks;                   //! Array of GTU tracks
+
+  TTree               *fTrackletTree;             //! Tree for tracklets
+
+  AliTRDdigitsManager *fDigitsManager;            //! TRD digits manager
+
+  UInt_t              **fTrackletContainer;       //! tracklet container
+                                                 // legacy code to avoid breakint AliHLTTRDClusterizer
+                                                 // but it's useless
+
+  Int_t                fRawVersion;               //  Expected raw version of the data - default is 2
+
+  AliTRDtransform     *fTransform;                //! Transforms the reconstructed space points
+
+  AliTRDarrayADC      *fDigits;                   // Array holding the digits
+  AliTRDSignalIndex   *fIndexes;                  // Array holding the indexes to the digits
+  Short_t              fMaxThresh;                // Threshold value for the maximum
+  Short_t              fMaxThreshTest;            // Threshold value for the maximum to test agains
+  Short_t              fSigThresh;                // Threshold value for the digit signal
+  Float_t              fMinMaxCutSigma;           // Threshold value for the maximum (cut noise)
+  Float_t              fMinLeftRightCutSigma;     // Threshold value for the sum pad (cut noise)
+  Int_t                fLayer;                    // Current layer of the detector
+  Int_t                fDet;                      // Current detecor
+  UShort_t             fVolid;                    // Volume ID
+  Int_t                fColMax;                   // Number of Colums in one detector
+  Int_t                fTimeTotal;                // Number of time bins
+  AliTRDCalROC        *fCalGainFactorROC;         // Calibration object with pad wise values for the gain factors
+  Float_t              fCalGainFactorDetValue;    // Calibration value for chamber wise noise
+  AliTRDCalROC        *fCalNoiseROC;              // Calibration object with pad wise values for the noise
+  Float_t              fCalNoiseDetValue;         // Calibration value for chamber wise noise
   AliTRDCalSingleChamberStatus *fCalPadStatusROC; // Calibration object with the pad status
-  AliTRDCalOnlineGainTableROC *fCalOnGainROC; // Calibration table of online gain factors
-  Int_t                fClusterROC;           // The index to the first cluster of a given ROC
-  Int_t                firstClusterROC;       // The number of cluster in a given ROC
-  Int_t                fNoOfClusters;         // Number of Clusters already processed and still owned by the clusterizer
-  Int_t                fBaseline;             // Baseline of the ADC values
-  AliTRDrawStream     *fRawStream;            // Raw data streamer
+  AliTRDCalOnlineGainTableROC *fCalOnGainROC;     // Calibration table of online gain factors
+  Int_t                fClusterROC;               // The index to the first cluster of a given ROC
+  Int_t                firstClusterROC;           // The number of cluster in a given ROC
+  Int_t                fNoOfClusters;             // Number of Clusters already processed and still owned by the clusterizer
+  Int_t                fBaseline;                 // Baseline of the ADC values
+  AliTRDrawStream     *fRawStream;                // Raw data streamer
   UInt_t               fTrgFlags[AliTRDgeometry::kNsector]; // trigger flags
 
-  ClassDef(AliTRDclusterizer,6)               //  TRD clusterfinder
+private:
+  inline void      CalcAdditionalInfo(const MaxStruct &Max, Short_t *const signals, Int_t &nPadCount);
+
+  ClassDef(AliTRDclusterizer,6)                   //  TRD clusterfinder
 
 };
 
index 9bdc9d0..8774694 100644 (file)
@@ -192,36 +192,23 @@ AliTRDdigitizer::~AliTRDdigitizer()
   // AliTRDdigitizer destructor
   //
 
-  if (fDigitsManager) {
-    delete fDigitsManager;
-    fDigitsManager      = 0;
-  }
+  delete fDigitsManager;
+  fDigitsManager      = 0;
 
-  if (fSDigitsManager) {
-    // s-digitsmanager will be deleted via list
-    fSDigitsManager     = 0;
-  }
-
-  if (fSDigitsManagerList) {
-    fSDigitsManagerList->Delete();
-    delete fSDigitsManagerList;
-    fSDigitsManagerList = 0;
-  }
+  // s-digitsmanager will be deleted via list
+  fSDigitsManager     = 0;
+  fSDigitsManagerList->Delete();
+  delete fSDigitsManagerList;
+  fSDigitsManagerList = 0;
 
-  if (fMasks) {
-    delete [] fMasks;
-    fMasks       = 0;
-  }
+  delete [] fMasks;
+  fMasks       = 0;
 
-  if (fMcmSim) {
-    delete fMcmSim;
-    fMcmSim = 0;
-  }
+  delete fMcmSim;
+  fMcmSim = 0;
 
-  if (fGeo) {
-    delete fGeo;
-    fGeo = 0;
-  }
+  delete fGeo;
+  fGeo = 0;
 
 }
 
index 048ee25..fc08178 100644 (file)
@@ -629,7 +629,7 @@ AliTRDarrayDictionary *AliTRDdigitsManager::GetDictionary(Int_t det
 }
 
 //_____________________________________________________________________________
-Int_t AliTRDdigitsManager::GetTrack(Int_t track, AliTRDdigit * const digit) const
+Int_t AliTRDdigitsManager::GetTrack(Int_t track, const AliTRDdigit * const digit) const
 {
   // 
   // Returns the MC-track numbers from the dictionary for a given digit
index 61d7d69..89ffbe4 100644 (file)
@@ -69,7 +69,7 @@ class AliTRDdigitsManager : public TObject {
   void                        RemoveIndexes(Int_t det);
   void                        ClearIndexes(Int_t det);
   
-  Int_t                       GetTrack(Int_t track, AliTRDdigit * const digit) const;
+  Int_t                       GetTrack(Int_t track, const AliTRDdigit * const digit) const;
   Short_t                     GetDigitAmp(Int_t row, Int_t col, Int_t time, Int_t det) const;
   UChar_t                     GetPadStatus(Int_t row, Int_t col, Int_t time, Int_t det) const;