Correct update of the pointer to AliAODHeader in the TList.
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 8 Jun 2007 19:20:13 +0000 (19:20 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 8 Jun 2007 19:20:13 +0000 (19:20 +0000)
STEER/AliAODEvent.h

index b565b45..34abeda 100644 (file)
@@ -38,7 +38,10 @@ class AliAODEvent : public TObject {
   // -- Header
   AliAODHeader *GetHeader()              const { return (AliAODHeader*)fHeader; }
   void          AddHeader(const AliAODHeader* hdx)
-    {delete fHeader; fHeader=new AliAODHeader(*hdx);}
+    {
+       delete fHeader; fHeader = new AliAODHeader(*hdx);
+       (fAODObjects->FirstLink())->SetObject(fHeader);
+    }
 
   // -- Tracks
   TClonesArray *GetTracks()              const { return fTracks; }