coverity defects fixed
[u/mrichter/AliRoot.git] / PMD / AliPMDcluster.cxx
index 865fd36..4f9ee27 100644 (file)
@@ -22,6 +22,7 @@
 #include "Riostream.h"
 #include "Rtypes.h"
 #include "AliPMDcluster.h"
+#include "AliLog.h"
 #include <stdio.h>
 
 ClassImp(AliPMDcluster)
@@ -35,16 +36,21 @@ AliPMDcluster::AliPMDcluster():
     {
       fClusData[i] = 0.;
     }
-  for (Int_t i = 0; i < 15; i++)
+  for (Int_t i = 0; i < 19; i++)
     {
       fClusCellDataX[i] = 0;
       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 *celldataX, Int_t *celldataY,
+                            Int_t *celltrack, Int_t *cellpid,
+                            Float_t *celladc):
   fDet(idet),
   fSMN(ismn)
 {
@@ -53,10 +59,14 @@ AliPMDcluster::AliPMDcluster(Int_t idet, Int_t ismn, Float_t *clusdata,
     {
       fClusData[i] = clusdata[i];
     }
-  for (Int_t i = 0; i < 15; 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];
     }
 
 }
@@ -79,10 +89,13 @@ AliPMDcluster::AliPMDcluster(const AliPMDcluster &pmdcluster):
     {
       this->fClusData[i] = pmdcluster.fClusData[i];
     }
-  for(Int_t i=0; i<15; i++)
+  for(Int_t i=0; i<19; i++)
     {
       this->fClusCellDataX[i] = pmdcluster.fClusCellDataX[i];
       this->fClusCellDataY[i] = pmdcluster.fClusCellDataY[i];
+      this->fClusCellTrack[i] = pmdcluster.fClusCellTrack[i];
+      this->fClusCellPid[i]   = pmdcluster.fClusCellPid[i];
+      this->fClusCellAdc[i]   = pmdcluster.fClusCellAdc[i];
     }
 }
 // --------------------------------------------------------------------- //
@@ -98,10 +111,13 @@ AliPMDcluster & AliPMDcluster::operator=(const AliPMDcluster &pmdcluster)
        {
          this->fClusData[i] = pmdcluster.fClusData[i];
        }
-      for(Int_t i=0; i<15; i++)
+      for(Int_t i=0; i<19; i++)
        {
          this->fClusCellDataX[i] = pmdcluster.fClusCellDataX[i];
          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;
@@ -164,3 +180,18 @@ Int_t AliPMDcluster::GetClusCellY(Int_t i) const
   return fClusCellDataY[i];
 }
 // --------------------------------------------------------------------- //
+Int_t AliPMDcluster::GetClusCellTrack(Int_t i) const
+{
+  return fClusCellTrack[i];
+}
+// --------------------------------------------------------------------- //
+Int_t AliPMDcluster::GetClusCellPid(Int_t i) const
+{
+  return fClusCellPid[i];
+}
+// --------------------------------------------------------------------- //
+Float_t AliPMDcluster::GetClusCellAdc(Int_t i) const
+{
+  return fClusCellAdc[i];
+}
+// --------------------------------------------------------------------- //