AliRoot Core  a565103 (a565103)
 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 TClonesArray;
27 class AliMUONTriggerLut;
28 class AliMUONVStore;
29 class AliMpExMap;
30 class AliMpDDL;
31 class AliMpTriggerCrate;
32 class AliMpLocalBoard;
36 
37 class AliMUONTriggerIO : public TObject
38 {
39 public:
41  AliMUONTriggerIO(const char* regionalFileToRead);
42  virtual ~AliMUONTriggerIO();
43 
44 
45  Bool_t ReadConfig(const char* localFile,
46  const char* regionalFile,
47  const char* globalFile,
48  AliMUONVStore* localMasks,
51 
52  Bool_t ReadTrigScalers(const char* scfile, TClonesArray& scalers) const;
53 
54  Bool_t WriteTrigScalers(const TClonesArray& scalers, const char* scfile) const;
55 
56  Bool_t ReadLUT(const char* lutFileToRead, AliMUONTriggerLut& lut);
57 
58  Bool_t WriteLUT(const AliMUONTriggerLut& lut,
59  const char* lutFileToWrite);
60 
61  Bool_t WriteConfig(const char* localFile,
62  const char* regionalFile,
63  const char* globalFile,
64  const AliMUONVStore* localMasks,
65  AliMUONRegionalTriggerConfig* regionalConfig,
66  AliMUONGlobalCrateConfig* globalConfig) const;
67 
68 
69  Int_t ReadGlobalConfig(const char* globalFile, AliMUONGlobalCrateConfig* globalConfig) const;
70 
71  Bool_t WriteGlobalConfig(const char* globalFile, AliMUONGlobalCrateConfig* globalConfig) const;
72 
73  Int_t ReadRegionalConfig(const char* regionalFile, AliMUONRegionalTriggerConfig* regionalConfig);
74 
75  Bool_t WriteRegionalConfig(const char* regionalFile, AliMUONRegionalTriggerConfig* regionalConfig) const;
76 
77  Int_t ReadLocalMasks(const char* localFile, AliMUONVStore& localMasks) const;
78 
79  Bool_t WriteLocalMasks(const char* localFile, const AliMUONVStore& localMasks) const;
80 
81  void ReadLocalLUT(AliMUONTriggerLut& lut, Int_t localBoardId, FILE* flut);
82 
83  void WriteLocalLUT(const AliMUONTriggerLut& lut, Int_t localBoardId,
84  FILE* flut);
85 
86  Int_t LocalBoardId(Int_t index) const;
87  Int_t LocalBoardId(Int_t ddlId, Int_t crateId, Int_t localId) const;
88 
89 
90 private:
91 
92  Bool_t DeCompAddress(UChar_t &ypos, UChar_t &ytri, UChar_t &xdev, UChar_t &xpos,
93  UShort_t address) const;
94 
95  void FillLut(AliMUONTriggerLut& lut,
96  Int_t icirc, UChar_t istripX, UChar_t idev,
97  Int_t lutLpt[16][2], Int_t lutHpt[16][2]) ;
98 
99 
102 
103 
104 
105 private:
107 
108  static const UInt_t fgkLocalLutSize;
109 
110 
111  ClassDef(AliMUONTriggerIO,2) // Read/Write trigger masks and LUT to/from online files
112 };
113 
114 #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