]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/mapping/AliMpStringObjMap.h
New macro to keep track of timing performances of the segmentation methods (Laurent)
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpStringObjMap.h
CommitLineData
c623aa64 1/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2 * See cxx source for full Copyright notice */
3
4// $Id$
5
46df088d 6/// \ingroup core
c623aa64 7/// \class AliMpStringObjMap
8/// \brief Substitutes map <string, TObject> which ALICE does not allow to use
9///
2a116780 10/// The map is not optimised for large data size
11///
13985652 12/// \author Ivana Hrivnacova, IPN Orsay
c623aa64 13
14#ifndef ALI_MP_STRING_OBJ_MAP_H
15#define ALI_MP_STRING_OBJ_MAP_H
16
17#include <TObject.h>
18#include <TObjArray.h>
19#include <TArrayI.h>
20
21class AliMpStringObjMap : public TObject
22{
23 public:
973e9d18 24 AliMpStringObjMap(Bool_t isOwner = false);
c623aa64 25 virtual ~AliMpStringObjMap();
26
27 // methods
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;
34
2a116780 35 // iterating over elements
36 void First();
37 void Next();
38 TObject* CurrentItem();
39 TString CurrentKey();
40 Bool_t IsDone() const;
41
13e7956b 42 private:
f5671fc3 43 /// Not implemented
c623aa64 44 AliMpStringObjMap(const AliMpStringObjMap& rhs);
f5671fc3 45 /// Not implemented
c623aa64 46 AliMpStringObjMap& operator = (const AliMpStringObjMap& rhs);
2a116780 47
48 // static data members
49 static const TString fgkUndefinedKey; ///< Undefined key string
13e7956b 50
c623aa64 51 // data members
2a116780 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)
c623aa64 56
57 ClassDef(AliMpStringObjMap,1) // motif map
58};
59
60#endif //ALI_MP_STRING_OBJ_MAP_H