]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUONStringIntMap.h
Addind methods for iterating
[u/mrichter/AliRoot.git] / MUON / AliMUONStringIntMap.h
CommitLineData
d635d68e 1/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2 * See cxx source for full Copyright notice */
3
4// $Id$
5
6/// \ingroup geometry
7/// \class AliMUONStringIntMap
8/// \brief Substitutes map <string, int> which ALICE does not allow to use
9///
a9aad96e 10/// \author Ivana Hrivnacova, IPN Orsay
d635d68e 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
d635d68e 19class AliMUONStringIntMap : public TObject
20{
21 public:
22 AliMUONStringIntMap();
23 virtual ~AliMUONStringIntMap();
24
25 // methods
26 Bool_t Add(const TString& first, Int_t second);
abca6eb2 27 Bool_t Set(const TString& first, Int_t second);
28 Int_t Contains(const TString& first) const;
29
d635d68e 30 Int_t Get(const TString& first) const;
31 Int_t GetNofItems() const;
32 virtual void Clear(Option_t* /*option*/ ="");
33 virtual void Print(const char* /*option*/ = "") const;
34 void Print(const TString& key, ofstream& out) const;
3d775853 35
36 // Methods for iterating over all elements
37 Bool_t Next(TString& first, Int_t& second);
38 void ResetItr();
39
d635d68e 40 protected:
71a2d3aa 41 /// Not implemented
d635d68e 42 AliMUONStringIntMap(const AliMUONStringIntMap& rhs);
71a2d3aa 43 /// Not implemented
d635d68e 44 AliMUONStringIntMap& operator = (const AliMUONStringIntMap& rhs);
45
46 private:
47 // data members
829425a5 48 Int_t fNofItems; ///< number of items
49 TObjArray fFirstArray; ///< first item array
50 TArrayI fSecondArray; ///< second item array
3d775853 51 Int_t fCurrentIndex;///< current index
52
53 ClassDef(AliMUONStringIntMap,2) // motif map
d635d68e 54};
55
56#endif //ALI_MUON_STRING_INT_MAP_H