6 // Class that takes care of reading the sector data.
8 // Authors: David Guez, Ivana Hrivnacova; IPN Orsay
10 #ifndef ALI_MP_READER_H
11 #define ALI_MP_READER_H
18 #include "AliMpSectorTypes.h"
19 #include "AliMpStationType.h"
20 #include "AliMpPlaneType.h"
21 #include "AliMpXDirection.h"
22 #include "AliMpIntPair.h"
28 class AliMpVRowSegmentSpecial;
30 class AliMpMotifSpecial;
33 class AliMpReader : public TObject
36 AliMpReader(AliMpStationType station, AliMpPlaneType plane);
38 virtual ~AliMpReader();
41 AliMpSector* BuildSector();
42 AliMpMotifType* BuildMotifType(const TString& motifTypeId);
43 AliMpMotifSpecial* BuildMotifSpecial(const TString& motifID,
44 AliMpMotifType* motifType);
47 void SetVerboseLevel(Int_t verboseLevel);
50 AliMpReader(const AliMpReader& right);
51 AliMpReader& operator = (const AliMpReader& right);
55 static const Int_t fgkSeparator; // the separator used for conversion
59 Int_t GetIndex(const string& s) const;
60 Int_t GetIndex(const AliMpIntPair& pair) const;
61 string GetString(Int_t index) const;
62 AliMpIntPair GetPair(Int_t index) const;
66 void ReadSectorData(ifstream& in);
67 void ReadZoneData(ifstream& in);
68 void ReadSubZoneData(ifstream& in, AliMpZone* zone);
69 void ReadRowSegmentsData(ifstream& in,
70 AliMpZone* zone, AliMpSubZone* subZone);
71 AliMpVMotif* ReadMotifData(ifstream& in, AliMpZone* zone);
72 void ReadSectorSpecialData(ifstream& in, AliMpXDirection direction);
73 void ReadMotifsSpecialData(ifstream& in);
74 void ReadRowSpecialData(ifstream& in, AliMpXDirection direction);
75 void ReadRowSegmentSpecialData(ifstream& in,
76 AliMpVRowSegmentSpecial* segment,
77 AliMpXDirection direction);
79 // static data members
80 static const TString fgkSectorKeyword; // sector keyword
81 static const TString fgkZoneKeyword; // zone keyword
82 static const TString fgkSubZoneKeyword; // subzone keyword
83 static const TString fgkRowKeyword; // row keyword
84 static const TString fgkEofKeyword; // eof keyword
85 static const TString fgkSectorSpecialKeyword; // sector special keyword
86 static const TString fgkMotifKeyword; // motif keyword
87 static const TString fgkRowSpecialKeyword; // row special keyword
88 static const TString fgkPadRowsKeyword; // pad rows keyword
89 static const TString fgkPadRowSegmentKeyword; // pad row segment keyword
92 AliMpStationType fStationType; // station type
93 AliMpPlaneType fPlaneType; // plane type
94 AliMpSector* fSector; // sector
95 Int_t fVerboseLevel;// verbose level
97 ClassDef(AliMpReader,1) // Data reader
100 #endif //ALI_MP_READER_H