ENDIF replaced by endif (compilation problems)
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpReader.h
CommitLineData
5f91c9e8 1// $Id$
2// Category: sector
3//
4// Class AliMpReader
5// -------------------
6// Class that takes care of reading the sector data.
7//
8// Authors: David Guez, Ivana Hrivnacova; IPN Orsay
9
10#ifndef ALI_MP_READER_H
11#define ALI_MP_READER_H
12
13#include <fstream>
14
15#include <TObject.h>
16#include <TString.h>
5f91c9e8 17
f79c58a5 18#include "AliMpSectorTypes.h"
4139354b 19#include "AliMpStationType.h"
5f91c9e8 20#include "AliMpPlaneType.h"
4139354b 21#include "AliMpXDirection.h"
f79c58a5 22#include "AliMpIntPair.h"
5f91c9e8 23
24class AliMpSector;
25class AliMpZone;
26class AliMpSubZone;
27class AliMpRow;
4139354b 28class AliMpVRowSegmentSpecial;
5f91c9e8 29class AliMpVMotif;
30class AliMpMotifSpecial;
31class AliMpMotifType;
32
33class AliMpReader : public TObject
34{
35 public:
4139354b 36 AliMpReader(AliMpStationType station, AliMpPlaneType plane);
5f91c9e8 37 AliMpReader();
38 virtual ~AliMpReader();
39
40 // methods
41 AliMpSector* BuildSector();
4139354b 42 AliMpMotifType* BuildMotifType(const TString& motifTypeId);
43 AliMpMotifSpecial* BuildMotifSpecial(const TString& motifID,
5f91c9e8 44 AliMpMotifType* motifType);
45
46 // set methods
47 void SetVerboseLevel(Int_t verboseLevel);
48
49 private:
f79c58a5 50#ifdef WITH_ROOT
51 static const Int_t fgkSeparator; // the separator used for conversion
52 // of string to Int_t
53
54 // methods
ec094451 55 Int_t GetIndex(const string& s) const;
f79c58a5 56 Int_t GetIndex(const AliMpIntPair& pair) const;
ec094451 57 string GetString(Int_t index) const;
f79c58a5 58 AliMpIntPair GetPair(Int_t index) const;
59#endif
60
5f91c9e8 61 // methods
62 void ReadSectorData(ifstream& in);
63 void ReadZoneData(ifstream& in);
64 void ReadSubZoneData(ifstream& in, AliMpZone* zone);
65 void ReadRowSegmentsData(ifstream& in,
66 AliMpZone* zone, AliMpSubZone* subZone);
67 AliMpVMotif* ReadMotifData(ifstream& in, AliMpZone* zone);
4139354b 68 void ReadSectorSpecialData(ifstream& in, AliMpXDirection direction);
5f91c9e8 69 void ReadMotifsSpecialData(ifstream& in);
4139354b 70 void ReadRowSpecialData(ifstream& in, AliMpXDirection direction);
5f91c9e8 71 void ReadRowSegmentSpecialData(ifstream& in,
4139354b 72 AliMpVRowSegmentSpecial* segment,
73 AliMpXDirection direction);
5f91c9e8 74
75 // static data members
4139354b 76 static const TString fgkSectorKeyword; // sector keyword
77 static const TString fgkZoneKeyword; // zone keyword
78 static const TString fgkSubZoneKeyword; // subzone keyword
79 static const TString fgkRowKeyword; // row keyword
80 static const TString fgkEofKeyword; // eof keyword
81 static const TString fgkSectorSpecialKeyword; // sector special keyword
82 static const TString fgkMotifKeyword; // motif keyword
83 static const TString fgkRowSpecialKeyword; // row special keyword
84 static const TString fgkPadRowsKeyword; // pad rows keyword
85 static const TString fgkPadRowSegmentKeyword; // pad row segment keyword
5f91c9e8 86
4139354b 87 // data members
88 AliMpStationType fStationType; // station type
89 AliMpPlaneType fPlaneType; // plane type
90 AliMpSector* fSector; // sector
91 Int_t fVerboseLevel;// verbose level
5f91c9e8 92
93 ClassDef(AliMpReader,1) // Data reader
94};
95
96#endif //ALI_MP_READER_H