]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/mapping/AliMpTriggerReader.h
Replacement of TVector2 object with two doubles
[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
cffcff29 7/// \ingroup mptrigger
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;
ab167304 36class AliMpDataStreams;
657b96e3 37
1d9e7bed 38class TList;
39
40class AliMpTriggerReader : public TObject
41{
42 public:
183279c1 43 AliMpTriggerReader(const AliMpDataStreams& dataStreams, AliMpSlatMotifMap* motifMap);
1d9e7bed 44 virtual ~AliMpTriggerReader();
45
cddd101e 46 AliMpTrigger* ReadSlat(const char* slatType, AliMp::PlaneType planeType);
1d9e7bed 47
cf25b4e1 48 AliMpPCB* ReadPCB(const char* pcbType);
1d9e7bed 49
85fec35d 50private:
1d9e7bed 51
cf25b4e1 52 AliMpSlat* BuildSlat(const char* slatName,
cddd101e 53 AliMp::PlaneType planeType,
1d9e7bed 54 const TList& descriptionLines,
55 Double_t scale=1.0);
56
cf25b4e1 57 Int_t DecodeFlipLine(const TString& sline,
1d9e7bed 58 TString& slatType2,
59 Bool_t& flipX, Bool_t& flipY);
60
cf25b4e1 61 Int_t DecodeScaleLine(const TString& sline,
1d9e7bed 62 Double_t& scale, TString& slatType);
63
cf25b4e1 64 void FlipLines(TList& lines, Bool_t flipX, Bool_t flipY,
1d9e7bed 65 Int_t srcLine, Int_t destLine);
66
cf25b4e1 67 TString GetBoardNameFromPCBLine(const TString& sline);
1d9e7bed 68
cf25b4e1 69 Int_t GetLine(const TString& slatType);
1d9e7bed 70
cf25b4e1 71 Int_t IsLayerLine(const TString& sline);
1d9e7bed 72
cf25b4e1 73 int LocalBoardNumber(const char* localBoardName);
1d9e7bed 74
71a2d3aa 75 // AliMpPCB* PCB(const char* pcbType);
1d9e7bed 76
cf25b4e1 77 void ReadLines(const char* slatType,
cddd101e 78 AliMp::PlaneType planeType,
1d9e7bed 79 TList& lines,
80 Double_t& scale, Bool_t& flipX, Bool_t& flipY,
81 Int_t& srcLine, Int_t& destLine);
82
cf25b4e1 83 void ReadLocalBoardMapping();
1d9e7bed 84
85private:
657b96e3 86 /// Not implemented
87 AliMpTriggerReader(const AliMpTriggerReader& rhs);
88 /// Not implemented
89 AliMpTriggerReader& operator=(const AliMpTriggerReader& rhs);
1d9e7bed 90
7d5d0cc5 91 const AliMpDataStreams& fkDataStreams; //!< data streams
657b96e3 92 AliMpSlatMotifMap* fMotifMap; //!< storage for motifTypes and motifs...
1d9e7bed 93
cf25b4e1 94 TMap fLocalBoardMap; //!< map of TObjString to TObjString
85fec35d 95
829425a5 96 static const TString fgkKeywordLayer; //!< Keyword: LAYER
97 static const TString fgkKeywordScale; //!< Keyword: SCALE
98 static const TString fgkKeywordPcb; //!< Keyword : PCB
99 static const TString fgkKeywordFlipX; //!< Keyword : FLIPX
100 static const TString fgkKeywordFlipY; //!< Keyword : FLIPY
1d9e7bed 101
cf25b4e1 102 ClassDef(AliMpTriggerReader,0) // Reader for trigger slats mapping files
1d9e7bed 103};
104
105#endif