From: morsch Date: Tue, 4 Sep 2012 08:44:25 +0000 (+0000) Subject: Correcting the event content for ESD files writen before the the cosmic X-Git-Url: http://git.uio.no/git/?a=commitdiff_plain;h=75b7f8b67a6ce4a5184510c8a5820579b1dbc560;p=u%2Fmrichter%2FAliRoot.git Correcting the event content for ESD files writen before the the cosmic tracks were added to the std event content. Constantin Loizides --- 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]);