Code for MUON Station1 (I.Hrivnacova)
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpMotifMap.h
CommitLineData
5f91c9e8 1// $Id$
2// Category: motif
3//
4// Class AliMpMotifMap
5// -------------------
6// Class describing the motif map container, where motifs are
7// mapped to their string IDs.
8//
9// Authors: David Guez, Ivana Hrivnacova; IPN Orsay
10
11#ifndef ALI_MP_MOTIF_MAP_H
12#define ALI_MP_MOTIF_MAP_H
13
14#include <map>
15
16#include <TObject.h>
17#include <TString.h>
18#include <TVector2.h>
19
20#include "AliMpMotifTypes.h"
21#include "AliMpIntPair.h"
22
23class AliMpVMotif;
24class AliMpMotifType;
25class AliMpMotifPosition;
26
27class AliMpMotifMap : public TObject
28{
29 public:
30 AliMpMotifMap();
31 virtual ~AliMpMotifMap();
32
33 // methods
34 Bool_t AddMotif(AliMpVMotif* motif, Bool_t warn = true);
35 Bool_t AddMotifType(AliMpMotifType* motifType, Bool_t warn = true);
36 Bool_t AddMotifPosition(AliMpMotifPosition* motifType, Bool_t warn = true);
37 void FillMotifPositionMap2();
38 void Print() const;
39 void PrintGlobalIndices(const char* fileName) const;
40 void UpdateGlobalIndices(const char* fileName);
41
42 // find methods
43 AliMpVMotif* FindMotif(const TString& motifID) const;
44 AliMpVMotif* FindMotif(const TString& motifID, const TString& motifTypeID,
45 TVector2 padDimensions) const;
46 AliMpMotifType* FindMotifType(const TString& motifTypeID) const;
47 AliMpMotifPosition* FindMotifPosition(Int_t motifPositionID) const;
48 AliMpMotifPosition* FindMotifPosition(AliMpIntPair indices) const;
49
50 private:
51 // methods
52 void PrintMotifs() const;
53 void PrintMotifTypes() const;
54 void PrintMotifPositions() const;
55 void PrintMotifPositions2() const;
56
57 // unused derrived functions
58 virtual void Print(const char* option) const {}
59
60#ifdef __HP_aCC
61 // data members
62 // EXCLUDED FOR CINT (does not compile on HP)
63 MotifMap fMotifs; //! motifs map
64 MotifTypeMap fMotifTypes; //!motif types map
65 //MotifPositionMap fMotifPositions; //! motif positions map
66 // not taken by cint
67 map<Int_t, AliMpMotifPosition*> fMotifPositions; //! motif positions map by Id
68 MotifPositionMap2 fMotifPositions2; //! motif positions map
69#else
70 // data members
71 MotifMap fMotifs; // motifs map
72 MotifTypeMap fMotifTypes; // motif types map
73 //MotifPositionMap fMotifPositions; // motif positions map
74 // not taken by cint
75 std::map<Int_t, AliMpMotifPosition*> fMotifPositions; // motif positions map by Id
76 MotifPositionMap2 fMotifPositions2; // motif positions map
77#endif
78
79 ClassDef(AliMpMotifMap,1) // motif map
80};
81
82#endif //ALI_MP_MOTIF_MAP_H