Fixed initialization issue of fAODObjects after removal of its creation from the...
authoragheata <agheata@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 19 Dec 2011 09:36:25 +0000 (09:36 +0000)
committeragheata <agheata@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 19 Dec 2011 09:36:25 +0000 (09:36 +0000)
STEER/AOD/AliAODEvent.cxx

index efa4f27..0c1fe8a 100644 (file)
@@ -258,6 +258,10 @@ void AliAODEvent::AddObject(TObject* obj)
   // Please be aware that in order to increase performance you should
   // refrain from using TObjArrays (if possible). Use TClonesArrays, instead.
   
+  if ( !fAODObjects ) {
+     fAODObjects = new TList();
+     fAODObjects->SetOwner();
+  }
   if ( !fAODObjects->FindObject(obj) ) 
   {
     fAODObjects->AddLast(obj);