]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/mapping/AliMpTriggerReader.h
Adding new libraries
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpTriggerReader.h
CommitLineData
1d9e7bed 1/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2 * See cxx source for full Copyright notice */
3
4// $Id$
13985652 5// $MpId: AliMpTriggerReader.h,v 1.5 2006/05/24 13:58:27 ivana Exp $
1d9e7bed 6
9b97f64e 7/// \ingroup trigger
1d9e7bed 8/// \class AliMpTriggerReader
9/// \brief Read trigger slat ASCII files
13985652 10///
11// Author: Laurent Aphecetche
1d9e7bed 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
cf25b4e1 32class AliMpSlatMotifMap;
1d9e7bed 33class AliMpSlat;
34class AliMpTrigger;
35class AliMpPCB;
36class TList;
37
38class AliMpTriggerReader : public TObject
39{
40 public:
cf25b4e1 41 AliMpTriggerReader(AliMpSlatMotifMap& motifMap);
1d9e7bed 42 virtual ~AliMpTriggerReader();
43
cddd101e 44 AliMpTrigger* ReadSlat(const char* slatType, AliMp::PlaneType planeType);
1d9e7bed 45
cf25b4e1 46 AliMpPCB* ReadPCB(const char* pcbType);
1d9e7bed 47
85fec35d 48private:
1d9e7bed 49
cf25b4e1 50 AliMpSlat* BuildSlat(const char* slatName,
cddd101e 51 AliMp::PlaneType planeType,
1d9e7bed 52 const TList& descriptionLines,
53 Double_t scale=1.0);
54
cf25b4e1 55 Int_t DecodeFlipLine(const TString& sline,
1d9e7bed 56 TString& slatType2,
57 Bool_t& flipX, Bool_t& flipY);
58
cf25b4e1 59 Int_t DecodeScaleLine(const TString& sline,
1d9e7bed 60 Double_t& scale, TString& slatType);
61
cf25b4e1 62 void FlipLines(TList& lines, Bool_t flipX, Bool_t flipY,
1d9e7bed 63 Int_t srcLine, Int_t destLine);
64
cf25b4e1 65 TString GetBoardNameFromPCBLine(const TString& sline);
1d9e7bed 66
cf25b4e1 67 Int_t GetLine(const TString& slatType);
1d9e7bed 68
cf25b4e1 69 Int_t IsLayerLine(const TString& sline);
1d9e7bed 70
cf25b4e1 71 int LocalBoardNumber(const char* localBoardName);
1d9e7bed 72
71a2d3aa 73 // AliMpPCB* PCB(const char* pcbType);
1d9e7bed 74
cf25b4e1 75 void ReadLines(const char* slatType,
cddd101e 76 AliMp::PlaneType planeType,
1d9e7bed 77 TList& lines,
78 Double_t& scale, Bool_t& flipX, Bool_t& flipY,
79 Int_t& srcLine, Int_t& destLine);
80
cf25b4e1 81 void ReadLocalBoardMapping();
1d9e7bed 82
83private:
84
cf25b4e1 85 AliMpSlatMotifMap& fMotifMap; //!< storage for motifTypes and motifs...
1d9e7bed 86
cf25b4e1 87 TMap fLocalBoardMap; //!< map of TObjString to TObjString
85fec35d 88
829425a5 89 static const TString fgkKeywordLayer; //!< Keyword: LAYER
90 static const TString fgkKeywordScale; //!< Keyword: SCALE
91 static const TString fgkKeywordPcb; //!< Keyword : PCB
92 static const TString fgkKeywordFlipX; //!< Keyword : FLIPX
93 static const TString fgkKeywordFlipY; //!< Keyword : FLIPY
1d9e7bed 94
cf25b4e1 95 ClassDef(AliMpTriggerReader,0) // Reader for trigger slats mapping files
1d9e7bed 96};
97
98#endif