1 #ifndef ALIMUONOBJECTPAIR_H
2 #define ALIMUONOBJECTPAIR_H
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
10 /// \class AliMUONObjectPair
11 /// \brief The equivalent of a std::pair<TObject*,TObject*> ;-)
13 // Author Laurent Aphecetche
19 class AliMUONObjectPair : public TObject
23 AliMUONObjectPair(TObject* first,
25 Bool_t isOwnerOfFirst=kTRUE,
26 Bool_t isOwnerOfSecond=kFALSE);
27 AliMUONObjectPair(const AliMUONObjectPair& other);
28 AliMUONObjectPair& operator=(const AliMUONObjectPair& other);
30 virtual ~AliMUONObjectPair();
32 /// Return the first element of the pair
33 TObject* First() const { return fFirst; }
34 /// Return the second element of the pair
35 TObject* Second() const { return fSecond; }
37 /// Return the first element of the pair
38 TObject* Key() const { return fFirst; }
39 /// Return the second element of the pair
40 TObject* Value() const { return fSecond; }
42 virtual void Copy(TObject& other) const;
44 virtual void Print(Option_t* opt="") const;
46 virtual void Clear(Option_t* opt="");
50 TObject* fFirst; ///< first element of the pair
51 TObject* fSecond; ///< second element of the pair
52 Bool_t fIsOwnerOfFirst; ///< whether we own the first element
53 Bool_t fIsOwnerOfSecond; ///<whether we own the second element
55 ClassDef(AliMUONObjectPair,1) // A pair of TObject*