Correctly clear AliAODHeader
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 1 Feb 2011 21:46:44 +0000 (21:46 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 1 Feb 2011 21:46:44 +0000 (21:46 +0000)
STEER/AliAODEvent.cxx
STEER/AliAODHeader.cxx
STEER/AliAODHeader.h

index d52507d..066ec5c 100644 (file)
@@ -412,7 +412,7 @@ void AliAODEvent::ResetStd(Int_t trkArrSize,
 void AliAODEvent::ClearStd()
 {
   // clears the standard arrays
-  fHeader        ->RemoveQTheta();
+  fHeader        ->Clear();
   fTracks        ->Delete();
   fVertices      ->Delete();
   fV0s           ->Delete();
index 0b5a483..722a5a1 100644 (file)
@@ -365,6 +365,13 @@ void AliAODHeader::RemoveQTheta()
   return;
 }
 
+void AliAODHeader::Clear(Option_t* /*opt*/)
+{
+  RemoveQTheta();
+  if (fCentralityP) delete fCentralityP;
+  return;
+}
+
 //______________________________________________________________________________
 void AliAODHeader::Print(Option_t* /*option*/) const 
 {
index 37938db..f657086 100644 (file)
@@ -152,6 +152,7 @@ class AliAODHeader : public AliVHeader {
   UInt_t GetOfflineTrigger() { return fOfflineTrigger; }
   void SetOfflineTrigger(UInt_t trigger) { fOfflineTrigger = trigger; }
   TString GetESDFileName()   {return fESDFileName;}
+  void Clear(Option_t* = "");
   enum {kNPHOSMatrix = 5};
   enum {kNEMCALMatrix = 12};