1 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2 * See cxx source for full Copyright notice */
7 /// \class AliMUONStringIntMap
8 /// \brief Substitutes map <string, int> which ALICE does not allow to use
10 /// \author Ivana Hrivnacova, IPN Orsay
12 #ifndef ALI_MUON_STRING_INT_MAP_H
13 #define ALI_MUON_STRING_INT_MAP_H
16 #include <TObjArray.h>
21 class AliMUONStringIntMap : public TObject
24 AliMUONStringIntMap();
25 virtual ~AliMUONStringIntMap();
28 Bool_t Add(const TString& first, Int_t second);
29 Bool_t Set(const TString& first, Int_t second);
30 Int_t Contains(const TString& first) const;
32 Int_t Get(const TString& first) const;
33 Int_t GetNofItems() const;
34 virtual void Clear(Option_t* /*option*/ ="");
35 virtual void Print(const char* /*option*/ = "") const;
36 void Print(const TString& key, ofstream& out) const;
38 // Methods for iterating over all elements
39 Bool_t Next(TString& first, Int_t& second);
44 AliMUONStringIntMap(const AliMUONStringIntMap& rhs);
46 AliMUONStringIntMap& operator = (const AliMUONStringIntMap& rhs);
50 Int_t fNofItems; ///< number of items
51 TObjArray fFirstArray; ///< first item array
52 TArrayI fSecondArray; ///< second item array
53 Int_t fCurrentIndex;///< current index
55 ClassDef(AliMUONStringIntMap,2) // motif map
58 #endif //ALI_MUON_STRING_INT_MAP_H