]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TPC/AliTPCclusterMI.cxx
Fix for coverity 17562
[u/mrichter/AliRoot.git] / TPC / AliTPCclusterMI.cxx
index 449ae1e56051733a0c7c98d2d038ced24d5157f2..13f2d2b0e5238840cefe07cee738a5e03093aa12 100644 (file)
 ClassImp(AliTPCclusterMI)
 
 
-AliTPCclusterMI::AliTPCclusterMI(Bool_t withInfo):
+AliTPCclusterMI::AliTPCclusterMI():
   AliCluster(),
-  fQ(0),
-  fType(0),
-  fMax(0),
-  fUsed(0),
-  fDetector(0),
-  fRow(0),
-  fTimeBin(0),
-  fPad(0),
-  fInfo(0)
+  fInfo(0),
+  fTimeBin(0),  //time bin coordinate
+  fPad(0),  //pad coordinate
+  fQ(0),       //Q of cluster (in ADC counts)  
+  fMax(0),      //maximal amplitude in cluster
+  fType(0),     //type of the cluster 0 means golden 
+  fUsed(0),     //counter of usage  
+  fDetector(0), //detector  number
+  fRow(0)      //row number number
 {
   //
   // default constructor
   //
-  if (withInfo) fInfo = new AliTPCclusterInfo;
 }
 
 AliTPCclusterMI::AliTPCclusterMI(const AliTPCclusterMI & cluster):
   AliCluster(cluster),
+  fInfo(0),
+  fTimeBin(cluster.fTimeBin),
+  fPad(cluster.fPad),
   fQ(cluster.fQ),
-  fType(cluster.fType),
   fMax(cluster.fMax),
+  fType(cluster.fType),
   fUsed(cluster.fUsed),
   fDetector(cluster.fDetector),
-  fRow(cluster.fRow),
-  fTimeBin(cluster.fTimeBin),
-  fPad(cluster.fPad),
-  fInfo(0)
+  fRow(cluster.fRow)
 {
   //
   // copy constructor
@@ -98,13 +97,15 @@ AliTPCclusterMI & AliTPCclusterMI::operator = (const AliTPCclusterMI & cluster)
 
 AliTPCclusterMI::AliTPCclusterMI(Int_t *lab, Float_t *hit) : 
   AliCluster(0,hit,0.,0.,lab),
-  fQ(0),
-  fType(0),
-  fMax(0),
-  fUsed(0),
-  fDetector(0),
-  fRow(0),
-  fInfo(0)
+  fInfo(0),
+  fTimeBin(0),  //time bin coordinate
+  fPad(0),  //pad coordinate
+  fQ(0),       //Q of cluster (in ADC counts)  
+  fMax(0),      //maximal amplitude in cluster
+  fType(0),     //type of the cluster 0 means golden 
+  fUsed(0),     //counter of usage  
+  fDetector(0), //detector  number
+  fRow(0)      //row number number
 {
   //
   // constructor
@@ -150,3 +151,12 @@ void AliTPCclusterMI::SetDetector(Int_t detector){
   Int_t modId = (fDetector<36)?fDetector: fDetector-36;
   SetVolumeId(AliGeomManager::LayerToVolUID(id,modId));  
 }
+
+
+void AliTPCclusterMI::SetInfo(AliTPCclusterInfo * info) {
+  //
+  //
+  //
+  if (fInfo) delete fInfo;
+  fInfo = info;
+}