Code for MUON Station1 (I.Hrivnacova)
[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>
17#include <TVector2.h>
18
19#include "AliMpPlaneType.h"
20
21class AliMpSector;
22class AliMpZone;
23class AliMpSubZone;
24class AliMpRow;
25class AliMpRowSegmentSpecial;
26class AliMpVMotif;
27class AliMpMotifSpecial;
28class AliMpMotifType;
29
30class AliMpReader : public TObject
31{
32 public:
33 AliMpReader(AliMpPlaneType plane);
34 AliMpReader();
35 virtual ~AliMpReader();
36
37 // methods
38 AliMpSector* BuildSector();
39 AliMpMotifType* BuildMotifType(TString motifTypeId);
40 AliMpMotifSpecial* BuildMotifSpecial(TString motifID,
41 AliMpMotifType* motifType);
42
43 // set methods
44 void SetVerboseLevel(Int_t verboseLevel);
45
46 private:
47 // methods
48 void ReadSectorData(ifstream& in);
49 void ReadZoneData(ifstream& in);
50 void ReadSubZoneData(ifstream& in, AliMpZone* zone);
51 void ReadRowSegmentsData(ifstream& in,
52 AliMpZone* zone, AliMpSubZone* subZone);
53 AliMpVMotif* ReadMotifData(ifstream& in, AliMpZone* zone);
54 void ReadSectorSpecialData(ifstream& in);
55 void ReadMotifsSpecialData(ifstream& in);
56 void ReadRowSpecialData(ifstream& in);
57 void ReadRowSegmentSpecialData(ifstream& in,
58 AliMpRowSegmentSpecial* segment);
59
60 // static data members
61 static const TString fgkSectorKeyword;
62 static const TString fgkZoneKeyword;
63 static const TString fgkSubZoneKeyword;
64 static const TString fgkRowKeyword;
65 static const TString fgkEofKeyword;
66 static const TString fgkSectorSpecialKeyword;
67 static const TString fgkMotifKeyword;
68 static const TString fgkRowSpecialKeyword;
69 static const TString fgkPadRowsKeyword;
70 static const TString fgkPadRowSegmentKeyword;
71
72 // data members
73 AliMpPlaneType fPlaneType; // plane type
74 AliMpSector* fSector; // sector
75 Int_t fVerboseLevel;// verbose level
76
77 ClassDef(AliMpReader,1) // Data reader
78};
79
80#endif //ALI_MP_READER_H
81