1 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2 * See cxx source for full Copyright notice */
7 /// \class AliMpStringObjMap
8 /// \brief Substitutes map <string, TObject> which ALICE does not allow to use
10 /// The map is not optimised for large data size
12 /// \author Ivana Hrivnacova, IPN Orsay
14 #ifndef ALI_MP_STRING_OBJ_MAP_H
15 #define ALI_MP_STRING_OBJ_MAP_H
18 #include <TObjArray.h>
21 class AliMpStringObjMap : public TObject
24 AliMpStringObjMap(Bool_t isOwner = false);
25 virtual ~AliMpStringObjMap();
28 Bool_t Add(const TString& first, TObject* second);
29 TObject* Get(const TString& first) const;
30 Int_t GetNofItems() const;
31 virtual void Clear(Option_t* /*option*/ ="");
32 virtual void Print(const char* /*option*/ = "") const;
33 void Print(const TString& key, ofstream& out) const;
35 // iterating over elements
38 TObject* CurrentItem();
40 Bool_t IsDone() const;
44 AliMpStringObjMap(const AliMpStringObjMap& rhs);
46 AliMpStringObjMap& operator = (const AliMpStringObjMap& rhs);
48 // static data members
49 static const TString fgkUndefinedKey; ///< Undefined key string
52 Int_t fNofItems; ///< number of items
53 TObjArray fFirstArray; ///< first item array
54 TObjArray fSecondArray; ///< second item array
55 Int_t fCurrentIndex; ///< current item index (for iteration)
57 ClassDef(AliMpStringObjMap,1) // motif map
60 #endif //ALI_MP_STRING_OBJ_MAP_H