]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/mapping/AliMpTriggerReader.h
Fixing part of the Coding violation
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpTriggerReader.h
1 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2  * See cxx source for full Copyright notice                               */
3
4 // $Id$
5 // $MpId: AliMpTriggerReader.h,v 1.5 2006/05/24 13:58:27 ivana Exp $
6
7 /// \ingroup mptrigger
8 /// \class AliMpTriggerReader
9 /// \brief Read trigger slat ASCII files
10 ///
11 //  Author: Laurent Aphecetche
12
13 #ifndef ALI_MP_TRIGGER_READER_H
14 #define ALI_MP_TRIGGER_READER_H
15
16 #ifndef ROOT_TObject
17 #  include "TObject.h"
18 #endif
19
20 #ifndef ROOT_TMap
21 #  include "TMap.h"
22 #endif
23
24 #ifndef ROOT_TString
25 #  include "TString.h"
26 #endif
27
28 #ifndef ALI_MP_PLANE_TYPE_H
29 #  include "AliMpPlaneType.h"
30 #endif
31
32 class AliMpSlatMotifMap;
33 class AliMpSlat;
34 class AliMpTrigger;
35 class AliMpPCB;
36
37 class TList;
38
39 class AliMpTriggerReader : public TObject
40 {
41  public:
42   AliMpTriggerReader();
43   virtual ~AliMpTriggerReader();
44
45   AliMpTrigger* ReadSlat(const char* slatType, AliMp::PlaneType planeType);
46
47   AliMpPCB* ReadPCB(const char* pcbType);
48   
49 private:
50     
51   AliMpSlat* BuildSlat(const char* slatName, 
52                               AliMp::PlaneType planeType,
53                               const TList& descriptionLines,
54                               Double_t scale=1.0);
55   
56   Int_t DecodeFlipLine(const TString& sline,
57                               TString& slatType2,
58                               Bool_t& flipX, Bool_t& flipY);
59   
60   Int_t DecodeScaleLine(const TString& sline, 
61                                Double_t& scale, TString& slatType);
62   
63   void FlipLines(TList& lines, Bool_t flipX, Bool_t flipY, 
64                         Int_t srcLine, Int_t destLine);
65   
66   TString GetBoardNameFromPCBLine(const TString& sline);
67   
68   Int_t GetLine(const TString& slatType);
69   
70   Int_t IsLayerLine(const TString& sline);
71     
72   int LocalBoardNumber(const char* localBoardName);
73   
74   // AliMpPCB* PCB(const char* pcbType); 
75   
76   void ReadLines(const char* slatType,
77                         AliMp::PlaneType planeType,
78                         TList& lines,
79                         Double_t& scale, Bool_t& flipX, Bool_t& flipY,
80                         Int_t& srcLine, Int_t& destLine);
81   
82   void ReadLocalBoardMapping();
83   
84 private:
85   /// Not implemented
86   AliMpTriggerReader(const AliMpTriggerReader& rhs);
87   /// Not implemented
88   AliMpTriggerReader& operator=(const AliMpTriggerReader& rhs);
89     
90   AliMpSlatMotifMap* fMotifMap; //!< storage for motifTypes and motifs...
91   
92   TMap fLocalBoardMap; //!< map of TObjString to TObjString
93
94   static const TString fgkKeywordLayer; //!< Keyword: LAYER
95   static const TString fgkKeywordScale; //!< Keyword: SCALE
96   static const TString fgkKeywordPcb; //!< Keyword : PCB
97   static const TString fgkKeywordFlipX; //!< Keyword : FLIPX
98   static const TString fgkKeywordFlipY; //!< Keyword : FLIPY
99   
100   ClassDef(AliMpTriggerReader,0) // Reader for trigger slats mapping files 
101 };
102
103 #endif