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