minor coverity defect: added protection for self-assignment
[u/mrichter/AliRoot.git] / MUON / AliMUONTrackStoreV1.h
CommitLineData
3a018b82 1#ifndef ALIMUONTRACKSTOREV1_H
2#define ALIMUONTRACKSTOREV1_H
3
4/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5* See cxx source for full Copyright notice */
6
7// $Id$
8
9/// \ingroup rec
10/// \class AliMUONTrackStoreV1
11/// \brief Implementation of AliMUONVTrackStore
12///
13// Author Laurent Aphecetche
14
15#ifndef ALIMUONVTRACKSTORE_H
16# include "AliMUONVTrackStore.h"
17#endif
18
19class TClonesArray;
20
21class AliMUONTrackStoreV1 : public AliMUONVTrackStore
22{
23public:
24 AliMUONTrackStoreV1();
25 virtual ~AliMUONTrackStoreV1();
26
27 using AliMUONVTrackStore::Add;
28
7332f213 29 virtual AliMUONTrack* Add(const AliMUONTrack& track);
3a018b82 30
7332f213 31 virtual AliMUONTrack* Remove(AliMUONTrack& track);
32
3a018b82 33 /// Whether the Connect(TTree&) method is implemented
34 virtual Bool_t CanConnect() const { return kTRUE; }
35
36 virtual Bool_t Connect(TTree& tree, Bool_t alone=kTRUE) const;
37
38 virtual AliMUONTrackStoreV1* Create() const { return new AliMUONTrackStoreV1; }
39
40 virtual TIterator* CreateIterator() const;
41
42 virtual void Clear(Option_t* opt="");
43
44 using AliMUONVTrackStore::GetSize;
45
46 virtual Int_t GetSize() const;
47
48private:
49 /// Return the tracks array
50 TClonesArray* Tracks() const { return fTracks; }
51
52 /// Return the address of the tracks array
53 TClonesArray** TracksPtr() const { return const_cast<TClonesArray**>(&fTracks); }
54
55 /// Not implemented
56 AliMUONTrackStoreV1(const AliMUONTrackStoreV1&);
57 /// Not implemented
58 AliMUONTrackStoreV1& operator=(const AliMUONTrackStoreV1&);
59
60private:
61 TClonesArray* fTracks; ///< Internal array
62
63 ClassDef(AliMUONTrackStoreV1,1) // Implementation of AliMUONVTrackStore
64};
65
66#endif