]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/mapping/AliMpExMap.h
Reverting commit from rev. 37415;
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpExMap.h
index b0d376c9d7cb3477a1a732be4336403357dd53d2..b965e058884159114359cdfa10f64dc0b920d123 100644 (file)
@@ -4,7 +4,7 @@
 // $Id$
 // $MpId: AliMpExMap.h,v 1.4 2006/05/24 13:58:07 ivana Exp $
 
-/// \ingroup basic
+/// \ingroup core
 /// \class AliMpExMap
 /// \brief Helper class making Root persistent TExMap
 ///
 #include <TArrayL.h>
 #include <TExMap.h>
 
-class AliMpIntPair;
+class AliMpExMapIterator;
 
 class TString;
 
 class AliMpExMap : public TObject
 {
+  friend class AliMpExMapIterator;
+  
   public:
     AliMpExMap();
-    AliMpExMap(Bool_t standardConstructor);
+    AliMpExMap(TRootIOCtor* /*ioCtor*/);
     AliMpExMap(const AliMpExMap& rhs);
     AliMpExMap& operator=(const AliMpExMap& rhs);
     virtual ~AliMpExMap();
     
+    
     // static methods
-    // conversion between varius keys and Long_t
-    //
-    static Long_t  GetIndex(const AliMpIntPair& pair);
+    // conversion between String and Long_t
     static Long_t  GetIndex(const TString& s);
-    static AliMpIntPair  GetPair(Long_t index);
-    static TString       GetString(Long_t index);
+    static TString GetString(Long_t index);
+
+    // methods from base class
+    virtual void Clear(Option_t* opt="");
+    virtual void Print(Option_t* opt="") const;
 
     // set methods
-    void Add(const AliMpIntPair& key, TObject* object);
+    void Add(Int_t keyFirst, Int_t keySecond, TObject* object);
     void Add(const TString& key, TObject* object);
     void Add(Int_t key, TObject* object);
 
@@ -51,28 +55,33 @@ class AliMpExMap : public TObject
     void SetOwner(Bool_t owner);
     
     // get methods
-    Int_t       GetSize() const;
-    TExMapIter  GetIterator() const;
-    TObject*    GetObject(Int_t index) const;
-    TObject*    GetObjectFast(Int_t index) const;
-
-    TObject*    GetValue(const AliMpIntPair& key) const;
+    Int_t GetSize() const;
+    Int_t GetCapacity() const;
+    
+    TObject*    GetValue(Int_t keyFirst, Int_t keySecond) const;
     TObject*    GetValue(const TString& key) const;
     TObject*    GetValue(Int_t key) const;
 
-    void Copy(TObject& dest) const;
+    AliMpExMapIterator* CreateIterator() const;
     
   private:  
     // methods
+
+    // conversion between Int_t pair key and Long_t
+    static Long_t  GetIndex(Int_t first, Int_t second);
+    static Int_t   GetPairFirst(Long_t index);
+    static Int_t   GetPairSecond(Long_t index);
+
     void FillMap();
     void AddKey(Long_t key);
+    void Copy(TObject& dest) const;
     
     // static data members
     static const Int_t    fgkDefaultSize;      ///< Default initial size
     static const Bool_t   fgkDefaultOwnership; ///< Default ownership
 
     static const Int_t    fgkSeparator1; ///< \brief the separator used for conversion
-                                         ///  of AliMpIntPair to Int_t
+                                         ///  of Int_t pair to Int_t
     static const Int_t    fgkSeparator2; ///< \brief the separator used for conversion
                                          ///  of TString to Int_t
     static const TString  fgkCharacterMap; ///< \brief the string mapping characters