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>
23 class AliMpStringObjMap : public TObject
26 AliMpStringObjMap(Bool_t isOwner = false);
27 virtual ~AliMpStringObjMap();
30 Bool_t Add(const TString& first, TObject* second);
31 TObject* Get(const TString& first) const;
32 Int_t GetNofItems() const;
33 virtual void Clear(Option_t* /*option*/ ="");
34 virtual void Print(const char* /*option*/ = "") const;
35 void Print(const TString& key, ofstream& out) const;
37 // iterating over elements
40 TObject* CurrentItem();
42 Bool_t IsDone() const;
46 AliMpStringObjMap(const AliMpStringObjMap& rhs);
48 AliMpStringObjMap& operator = (const AliMpStringObjMap& rhs);
51 static const TString& GetUndefinedKey();
54 Int_t fNofItems; ///< number of items
55 TObjArray fFirstArray; ///< first item array
56 TObjArray fSecondArray; ///< second item array
57 Int_t fCurrentIndex; ///< current item index (for iteration)
59 ClassDef(AliMpStringObjMap,1) // motif map
62 #endif //ALI_MP_STRING_OBJ_MAP_H