AliRoot Core  v5-06-15 (45dab64)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliMUONTriggerIO.h
Go to the documentation of this file.
1 #ifndef ALIMUONTRIGGERIO_H
2 #define ALIMUONTRIGGERIO_H
3 
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
6 
7 // $Id$
8 
13 // Author Laurent Aphecetche, Subatech
14 
15 #ifndef ROOT_TObject
16 # include <TObject.h>
17 #endif
18 
19 #include "AliMpExMap.h"
20 #include "AliMpRegionalTrigger.h"
21 
22 #ifndef ROOT_TArrayI
23 # include <TArrayI.h>
24 #endif
25 
26 class AliMUONTriggerLut;
27 class AliMUONVStore;
28 class AliMpExMap;
29 class AliMpDDL;
30 class AliMpTriggerCrate;
31 class AliMpLocalBoard;
35 
36 class AliMUONTriggerIO : public TObject
37 {
38 public:
40  AliMUONTriggerIO(const char* regionalFileToRead);
41  virtual ~AliMUONTriggerIO();
42 
43 
44  Bool_t ReadConfig(const char* localFile,
45  const char* regionalFile,
46  const char* globalFile,
47  AliMUONVStore* localMasks,
50 
51  Bool_t ReadTrigScalers(const char* scfile, TClonesArray& scalers) const;
52 
53  Bool_t WriteTrigScalers(const TClonesArray& scalers, const char* scfile) const;
54 
55  Bool_t ReadLUT(const char* lutFileToRead, AliMUONTriggerLut& lut);
56 
57  Bool_t WriteLUT(const AliMUONTriggerLut& lut,
58  const char* lutFileToWrite);
59 
60  Bool_t WriteConfig(const char* localFile,
61  const char* regionalFile,
62  const char* globalFile,
63  const AliMUONVStore* localMasks,
64  AliMUONRegionalTriggerConfig* regionalConfig,
65  AliMUONGlobalCrateConfig* globalConfig) const;
66 
67 
68  Int_t ReadGlobalConfig(const char* globalFile, AliMUONGlobalCrateConfig* globalConfig) const;
69 
70  Bool_t WriteGlobalConfig(const char* globalFile, AliMUONGlobalCrateConfig* globalConfig) const;
71 
72  Int_t ReadRegionalConfig(const char* regionalFile, AliMUONRegionalTriggerConfig* regionalConfig);
73 
74  Bool_t WriteRegionalConfig(const char* regionalFile, AliMUONRegionalTriggerConfig* regionalConfig) const;
75 
76  Int_t ReadLocalMasks(const char* localFile, AliMUONVStore& localMasks) const;
77 
78  Bool_t WriteLocalMasks(const char* localFile, const AliMUONVStore& localMasks) const;
79 
80  void ReadLocalLUT(AliMUONTriggerLut& lut, Int_t localBoardId, FILE* flut);
81 
82  void WriteLocalLUT(const AliMUONTriggerLut& lut, Int_t localBoardId,
83  FILE* flut);
84 
85  Int_t LocalBoardId(Int_t index) const;
86  Int_t LocalBoardId(Int_t ddlId, Int_t crateId, Int_t localId) const;
87 
88 
89 private:
90 
91  Bool_t DeCompAddress(UChar_t &ypos, UChar_t &ytri, UChar_t &xdev, UChar_t &xpos,
92  UShort_t address) const;
93 
94  void FillLut(AliMUONTriggerLut& lut,
95  Int_t icirc, UChar_t istripX, UChar_t idev,
96  Int_t lutLpt[16][2], Int_t lutHpt[16][2]) ;
97 
98 
101 
102 
103 
104 private:
106 
107  static const UInt_t fgkLocalLutSize;
108 
109 
110  ClassDef(AliMUONTriggerIO,2) // Read/Write trigger masks and LUT to/from online files
111 };
112 
113 #endif
Bool_t ReadLUT(const char *lutFileToRead, AliMUONTriggerLut &lut)
The class defines the configuration of global crate.
AliMpRegionalTrigger fRegionalTrigger
! Regional trigger
The class defines the properties of trigger crate.
void ReadLocalLUT(AliMUONTriggerLut &lut, Int_t localBoardId, FILE *flut)
Int_t ReadRegionalConfig(const char *regionalFile, AliMUONRegionalTriggerConfig *regionalConfig)
Bool_t WriteLUT(const AliMUONTriggerLut &lut, const char *lutFileToWrite)
Bool_t WriteRegionalConfig(const char *regionalFile, AliMUONRegionalTriggerConfig *regionalConfig) const
Class that manages the properties of the local board.
Bool_t WriteTrigScalers(const TClonesArray &scalers, const char *scfile) const
void FillLut(AliMUONTriggerLut &lut, Int_t icirc, UChar_t istripX, UChar_t idev, Int_t lutLpt[16][2], Int_t lutHpt[16][2])
The class defined electronics properties of DDL.
Definition: AliMpDDL.h:20
Bool_t ReadTrigScalers(const char *scfile, TClonesArray &scalers) const
Handles read/write of masks and LUT to/from online files.
Int_t ReadGlobalConfig(const char *globalFile, AliMUONGlobalCrateConfig *globalConfig) const
Int_t NofLocalBoards() const
Return number of local boards.
Bool_t WriteLocalMasks(const char *localFile, const AliMUONVStore &localMasks) const
Int_t ReadLocalMasks(const char *localFile, AliMUONVStore &localMasks) const
The class defines the properties of regional trigger crate.
Int_t LocalBoardId(Int_t index) const
AliMUONRegionalTriggerConfig * regionalConfig
virtual ~AliMUONTriggerIO()
static const UInt_t fgkLocalLutSize
length of the lut for one local board
Bool_t WriteConfig(const char *localFile, const char *regionalFile, const char *globalFile, const AliMUONVStore *localMasks, AliMUONRegionalTriggerConfig *regionalConfig, AliMUONGlobalCrateConfig *globalConfig) const
MUON trigger scalers.
Base class for MUON data stores.
Definition: AliMUONVStore.h:22
void WriteLocalLUT(const AliMUONTriggerLut &lut, Int_t localBoardId, FILE *flut)
MUON trigger look up table class.
Bool_t ReadConfig(const char *localFile, const char *regionalFile, const char *globalFile, AliMUONVStore *localMasks, AliMUONRegionalTriggerConfig *regionalConfig, AliMUONGlobalCrateConfig *globalConfig)
The class defines the properties of regional trigger crate.
Helper class making Root persistent TExMap.
Definition: AliMpExMap.h:28
Bool_t WriteGlobalConfig(const char *globalFile, AliMUONGlobalCrateConfig *globalConfig) const
AliMUONGlobalCrateConfig * globalConfig
Bool_t DeCompAddress(UChar_t &ypos, UChar_t &ytri, UChar_t &xdev, UChar_t &xpos, UShort_t address) const