]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONStringIntMap.h
fix array access out of bound + add histo for #chamber hit
[u/mrichter/AliRoot.git] / MUON / AliMUONStringIntMap.h
index 8b851c507773c85fb9b19b93f1f40aa963a69f76..d63ddbee02a17f75753b888b16f1ff844c93ca7e 100644 (file)
@@ -3,11 +3,11 @@
 
 // $Id$
 
-/// \ingroup geometry
+/// \ingroup core
 /// \class AliMUONStringIntMap
 /// \brief Substitutes map <string, int> which ALICE does not allow to use 
 ///
-/// Author: Ivana Hrivnacova, IPN Orsay
+/// \author Ivana Hrivnacova, IPN Orsay
 
 #ifndef ALI_MUON_STRING_INT_MAP_H
 #define ALI_MUON_STRING_INT_MAP_H
@@ -16,6 +16,8 @@
 #include <TObjArray.h>
 #include <TArrayI.h>
 
+using std::ofstream;
+
 class AliMUONStringIntMap : public TObject
 {
   public:
@@ -24,16 +26,23 @@ class AliMUONStringIntMap : public TObject
     
     // methods
     Bool_t  Add(const TString& first, Int_t second);
+    Bool_t  Set(const TString& first, Int_t second);
+    Int_t Contains(const TString& first) const;
+    
     Int_t   Get(const TString& first) const;
     Int_t   GetNofItems() const;
     virtual void Clear(Option_t* /*option*/ ="");
     virtual void Print(const char* /*option*/ = "") const;
     void Print(const TString& key, ofstream& out) const;
-    
+
+    // Methods for iterating over all elements    
+    Bool_t  Next(TString& first, Int_t& second);
+    void    ResetItr();
+
   protected:
+    /// Not implemented
     AliMUONStringIntMap(const AliMUONStringIntMap& rhs);
-
-    // operators  
+    /// Not implemented
     AliMUONStringIntMap& operator = (const AliMUONStringIntMap& rhs);
  
   private:
@@ -41,8 +50,9 @@ class AliMUONStringIntMap : public TObject
     Int_t      fNofItems;    ///< number of items
     TObjArray  fFirstArray;  ///< first item array
     TArrayI    fSecondArray; ///< second item array
-  ClassDef(AliMUONStringIntMap,1)  // motif map
+    Int_t      fCurrentIndex;///< current index
+
+  ClassDef(AliMUONStringIntMap,2)  // motif map
 };    
 
 #endif //ALI_MUON_STRING_INT_MAP_H