]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/mapping/AliMpReader.h
trigger geometry part made more compact
[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 #include <TVector2.h>
18
19 #include "AliMpPlaneType.h"
20
21 class AliMpSector;
22 class AliMpZone;
23 class AliMpSubZone;
24 class AliMpRow;
25 class AliMpRowSegmentSpecial;
26 class AliMpVMotif;
27 class AliMpMotifSpecial;
28 class AliMpMotifType;
29
30 class 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