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