From 75b7f8b67a6ce4a5184510c8a5820579b1dbc560 Mon Sep 17 00:00:00 2001 From: morsch Date: Tue, 4 Sep 2012 08:44:25 +0000 Subject: [PATCH] Correcting the event content for ESD files writen before the the cosmic tracks were added to the std event content. Constantin Loizides --- STEER/ESD/AliESDEvent.cxx | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/STEER/ESD/AliESDEvent.cxx b/STEER/ESD/AliESDEvent.cxx index 719cfe2117b..2e734278d18 100644 --- a/STEER/ESD/AliESDEvent.cxx +++ b/STEER/ESD/AliESDEvent.cxx @@ -1488,9 +1488,16 @@ void AliESDEvent::CreateStdContent() void AliESDEvent::CompleteStdContent() { - // create missing standard objects and add them to the TList of objects - - // add new MUON containers if missing (for backward compatibility) + // Create missing standard objects and add them to the TList of objects + // + // Add cosmic tracks for cases where esd files were created + // before adding them to the std content + if (!fESDObjects->FindObject(fgkESDListName[kCosmicTracks])) { + TClonesArray* cosmics = new TClonesArray("AliESDCosmicTrack",0); + fESDObjects->AddAt(cosmics, kCosmicTracks); + fESDObjects->SetOwner(kTRUE); + } + // Add new MUON containers if missing (for backward compatibility) if (!fESDObjects->FindObject(fgkESDListName[kMuonClusters])) { TClonesArray* muonClusters = new TClonesArray("AliESDMuonCluster",0); muonClusters->SetName(fgkESDListName[kMuonClusters]); -- 2.43.0