]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliESDCaloCluster.cxx
Add Clear method to Calorimeter objects
[u/mrichter/AliRoot.git] / STEER / AliESDCaloCluster.cxx
index 7dd2a0934ed942f48007af22cffaa892d2f1f46d..4aaa0bc03c25881725e1b46579b80b0e976f8cdc 100644 (file)
@@ -210,6 +210,18 @@ AliESDCaloCluster::~AliESDCaloCluster(){
   if(fCellsAbsId){ delete[] fCellsAbsId;  fCellsAbsId = 0;}
 }
 
+//_______________________________________________________________________
+void AliESDCaloCluster::Clear(const Option_t*){ 
+  //
+  // This is destructor according Coding Conventions 
+  //
+  if(fTracksMatched)delete fTracksMatched;fTracksMatched = 0;
+  if(fLabels) delete fLabels; fLabels = 0;
+  if(fCellsAmpFraction){ delete[] fCellsAmpFraction; fCellsAmpFraction=0;}
+  if(fCellsAbsId){ delete[] fCellsAbsId;  fCellsAbsId = 0;}
+}
+
+
 //_______________________________________________________________________
 void AliESDCaloCluster::SetPID(const Float_t *p) {
   // Sets the probability of each particle type