]>
Commit | Line | Data |
---|---|---|
ea199e33 | 1 | #ifndef ALIMUONOBJECTPAIR_H |
2 | #define ALIMUONOBJECTPAIR_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 | ||
5cc83322 | 9 | /// \ingroup calib |
ea199e33 | 10 | /// \class AliMUONObjectPair |
11 | /// \brief The equivalent of a std::pair<TObject*,TObject*> ;-) | |
12 | /// | |
13 | // Author Laurent Aphecetche | |
14 | ||
15 | #ifndef ROOT_TObject | |
16 | # include "TObject.h" | |
17 | #endif | |
18 | ||
19 | class AliMUONObjectPair : public TObject | |
20 | { | |
21 | public: | |
22 | AliMUONObjectPair(); | |
23 | AliMUONObjectPair(TObject* first, | |
24 | TObject* second, | |
25 | Bool_t isOwnerOfFirst=kTRUE, | |
26 | Bool_t isOwnerOfSecond=kFALSE); | |
27 | AliMUONObjectPair(const AliMUONObjectPair& other); | |
28 | AliMUONObjectPair& operator=(const AliMUONObjectPair& other); | |
29 | ||
30 | virtual ~AliMUONObjectPair(); | |
31 | ||
71a2d3aa | 32 | /// Return the first element of the pair |
ea199e33 | 33 | TObject* First() const { return fFirst; } |
71a2d3aa | 34 | /// Return the second element of the pair |
ea199e33 | 35 | TObject* Second() const { return fSecond; } |
36 | ||
71a2d3aa | 37 | /// Return the first element of the pair |
ea199e33 | 38 | TObject* Key() const { return fFirst; } |
71a2d3aa | 39 | /// Return the second element of the pair |
ea199e33 | 40 | TObject* Value() const { return fSecond; } |
41 | ||
42 | virtual void Copy(TObject& other) const; | |
43 | ||
44 | private: | |
45 | ||
46 | TObject* fFirst; ///< first element of the pair | |
47 | TObject* fSecond; ///< second element of the pair | |
48 | Bool_t fIsOwnerOfFirst; ///< whether we own the first element | |
49 | Bool_t fIsOwnerOfSecond; ///<whether we own the second element | |
50 | ||
51 | ClassDef(AliMUONObjectPair,1) // A pair of TObject* | |
52 | }; | |
53 | ||
54 | #endif |