AliRoot Core  a565103 (a565103)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliMUONStringIntMap.h
Go to the documentation of this file.
1 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2  * See cxx source for full Copyright notice */
3 
4 // $Id$
5 
11 
12 #ifndef ALI_MUON_STRING_INT_MAP_H
13 #define ALI_MUON_STRING_INT_MAP_H
14 
15 #include <TObject.h>
16 #include <TObjArray.h>
17 #include <TArrayI.h>
18 
19 using std::ofstream;
20 
21 class AliMUONStringIntMap : public TObject
22 {
23  public:
25  virtual ~AliMUONStringIntMap();
26 
27  // methods
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;
31 
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;
37 
38  // Methods for iterating over all elements
39  Bool_t Next(TString& first, Int_t& second);
40  void ResetItr();
41 
42  protected:
47 
48  private:
49  // data members
50  Int_t fNofItems;
52  TArrayI fSecondArray;
54 
55  ClassDef(AliMUONStringIntMap,2) // motif map
56 };
57 
58 #endif //ALI_MUON_STRING_INT_MAP_H
Bool_t Set(const TString &first, Int_t second)
TObjArray fFirstArray
first item array
Bool_t Next(TString &first, Int_t &second)
Int_t fNofItems
number of items
#define TObjArray
Substitutes map <string, int> which ALICE does not allow to use.
Int_t Get(const TString &first) const
Int_t fCurrentIndex
current index
AliMUONStringIntMap & operator=(const AliMUONStringIntMap &rhs)
Not implemented.
virtual void Print(const char *="") const
virtual void Clear(Option_t *="")
TArrayI fSecondArray
second item array
Int_t Contains(const TString &first) const
Bool_t Add(const TString &first, Int_t second)