coverity defects fixed
[u/mrichter/AliRoot.git] / PMD / AliPMDcluster.cxx
index decf8b6..4f9ee27 100644 (file)
@@ -22,6 +22,7 @@
 #include "Riostream.h"
 #include "Rtypes.h"
 #include "AliPMDcluster.h"
+#include "AliLog.h"
 #include <stdio.h>
 
 ClassImp(AliPMDcluster)
@@ -41,13 +42,15 @@ AliPMDcluster::AliPMDcluster():
       fClusCellDataY[i] = 0;
       fClusCellTrack[i] = -1;
       fClusCellPid[i]   = -1;
+      fClusCellAdc[i]   = 0;
     }
 
 }
 // --------------------------------------------------------------------- //
 AliPMDcluster::AliPMDcluster(Int_t idet, Int_t ismn, Float_t *clusdata,
                             Int_t *celldataX, Int_t *celldataY,
-                            Int_t *celltrack, Int_t *cellpid):
+                            Int_t *celltrack, Int_t *cellpid,
+                            Float_t *celladc):
   fDet(idet),
   fSMN(ismn)
 {
@@ -56,12 +59,14 @@ AliPMDcluster::AliPMDcluster(Int_t idet, Int_t ismn, Float_t *clusdata,
     {
       fClusData[i] = clusdata[i];
     }
+
   for (Int_t i = 0; i < 19; i++)
     {
       fClusCellDataX[i] = celldataX[i];
       fClusCellDataY[i] = celldataY[i];
       fClusCellTrack[i] = celltrack[i];
       fClusCellPid[i]   = cellpid[i];
+      fClusCellAdc[i]   = celladc[i];
     }
 
 }
@@ -90,6 +95,7 @@ AliPMDcluster::AliPMDcluster(const AliPMDcluster &pmdcluster):
       this->fClusCellDataY[i] = pmdcluster.fClusCellDataY[i];
       this->fClusCellTrack[i] = pmdcluster.fClusCellTrack[i];
       this->fClusCellPid[i]   = pmdcluster.fClusCellPid[i];
+      this->fClusCellAdc[i]   = pmdcluster.fClusCellAdc[i];
     }
 }
 // --------------------------------------------------------------------- //
@@ -111,6 +117,7 @@ AliPMDcluster & AliPMDcluster::operator=(const AliPMDcluster &pmdcluster)
          this->fClusCellDataY[i] = pmdcluster.fClusCellDataY[i];
          this->fClusCellTrack[i] = pmdcluster.fClusCellTrack[i];
          this->fClusCellPid[i]   = pmdcluster.fClusCellPid[i];
+         this->fClusCellAdc[i]   = pmdcluster.fClusCellAdc[i];
        }
     }
   return *this;
@@ -183,3 +190,8 @@ Int_t AliPMDcluster::GetClusCellPid(Int_t i) const
   return fClusCellPid[i];
 }
 // --------------------------------------------------------------------- //
+Float_t AliPMDcluster::GetClusCellAdc(Int_t i) const
+{
+  return fClusCellAdc[i];
+}
+// --------------------------------------------------------------------- //