X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=MUON%2FAliMUONTrackStoreV1.cxx;h=1d6dee6590734e872751961b4fc35b88370b9fd4;hb=6c0d43d87b41ce17548aa29738fdde4b072ebbae;hp=ff388ab8913059fc549484e20bca1ced86511903;hpb=3a018b82305d41c806093581c679c8505ddbc2c6;p=u%2Fmrichter%2FAliRoot.git diff --git a/MUON/AliMUONTrackStoreV1.cxx b/MUON/AliMUONTrackStoreV1.cxx index ff388ab8913..1d6dee65907 100644 --- a/MUON/AliMUONTrackStoreV1.cxx +++ b/MUON/AliMUONTrackStoreV1.cxx @@ -15,13 +15,14 @@ // $Id$ +//----------------------------------------------------------------------------- /// \class AliMUONTrackStoreV1 /// /// Implementation of AliMUONTrackStoreV1, which should be backward /// compatible, i.e. able to read old TreeT files /// /// \author Laurent Aphecetche, Subatech -/// +//----------------------------------------------------------------------------- #include "AliMUONTrackStoreV1.h" @@ -39,7 +40,6 @@ AliMUONTrackStoreV1::AliMUONTrackStoreV1() : AliMUONVTrackStore(), fTracks(new TClonesArray("AliMUONTrack",10)) { /// Ctor - fTracks->SetOwner(kTRUE); } //_____________________________________________________________________________ @@ -50,11 +50,21 @@ AliMUONTrackStoreV1::~AliMUONTrackStoreV1() } //_____________________________________________________________________________ -void +AliMUONTrack* AliMUONTrackStoreV1::Add(const AliMUONTrack& track) { /// Add a track - new((*fTracks)[fTracks->GetLast()+1]) AliMUONTrack(track); + return new((*fTracks)[fTracks->GetLast()+1]) AliMUONTrack(track); +} + +//_____________________________________________________________________________ +AliMUONTrack* +AliMUONTrackStoreV1::Remove(AliMUONTrack& track) +{ + /// Remove a track from the store + AliMUONTrack* t = static_cast(fTracks->Remove(&track)); + if (t) fTracks->Compress(); + return t; } //_____________________________________________________________________________