1 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2 * See cxx source for full Copyright notice */
5 // $MpId: AliMpTriggerReader.h,v 1.5 2006/05/24 13:58:27 ivana Exp $
8 /// \class AliMpTriggerReader
9 /// \brief Read trigger slat ASCII files
11 // Author: Laurent Aphecetche
13 #ifndef ALI_MP_TRIGGER_READER_H
14 #define ALI_MP_TRIGGER_READER_H
28 #ifndef ALI_MP_PLANE_TYPE_H
29 # include "AliMpPlaneType.h"
32 #ifndef ALI_MP_STATION_TYPE_H
33 # include "AliMpStationType.h"
41 class AliMpTriggerReader : public TObject
45 virtual ~AliMpTriggerReader();
47 static AliMpTrigger* ReadSlat(const char* slatType, AliMpPlaneType planeType);
49 static AliMpPCB* ReadPCB(const char* pcbType);
55 static AliMpSlat* BuildSlat(const char* slatName,
56 AliMpPlaneType planeType,
57 const TList& descriptionLines,
60 static Int_t DecodeFlipLine(const TString& sline,
62 Bool_t& flipX, Bool_t& flipY);
64 static Int_t DecodeScaleLine(const TString& sline,
65 Double_t& scale, TString& slatType);
67 static void FlipLines(TList& lines, Bool_t flipX, Bool_t flipY,
68 Int_t srcLine, Int_t destLine);
70 static TString GetBoardNameFromPCBLine(const TString& sline);
72 static Int_t GetLine(const TString& slatType);
74 static Int_t IsLayerLine(const TString& sline);
76 static int LocalBoardNumber(const char* localBoardName);
78 static AliMpPCB* PCB(const char* pcbType);
80 static void ReadLines(const char* slatType,
81 AliMpPlaneType planeType,
83 Double_t& scale, Bool_t& flipX, Bool_t& flipY,
84 Int_t& srcLine, Int_t& destLine);
86 static void ReadLocalBoardMapping();
90 static TMap fgPCBMap; //!< map of TObjString to AliMpPCB*
92 static TMap fgLocalBoardMap; //!< map of TObjString to TObjString
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
100 ClassDef(AliMpTriggerReader,1) // Reader for trigger slats mapping files