X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=MUON%2FAliMUONTriggerIO.h;h=7cc4dee0e61735dace363342f61a8e6c0ddf5e74;hb=7875dc73a706005dd1b60857c5424accacf572f2;hp=7cf5df6ef8d9aff6f7cd417f19af12bf0ae11e45;hpb=acdc80b6d49a528787d7ab767e4434fbdb9f620e;p=u%2Fmrichter%2FAliRoot.git diff --git a/MUON/AliMUONTriggerIO.h b/MUON/AliMUONTriggerIO.h index 7cf5df6ef8d..7cc4dee0e61 100644 --- a/MUON/AliMUONTriggerIO.h +++ b/MUON/AliMUONTriggerIO.h @@ -6,7 +6,7 @@ // $Id$ -/// \ingroup trigger +/// \ingroup calib /// \class AliMUONTriggerIO /// \brief Handles read/write of masks and LUT to/from online files /// @@ -17,20 +17,23 @@ #endif #include "AliMpExMap.h" -#include "AliMpGlobalCrate.h" #include "AliMpRegionalTrigger.h" + + #ifndef ROOT_TArrayI # include #endif class AliMUONTriggerLut; -class AliMUONVCalibParam; class AliMUONVStore; class AliMpExMap; class AliMpDDL; class AliMpTriggerCrate; class AliMpLocalBoard; +class AliMUONGlobalCrateConfig; +class AliMUONRegionalTriggerConfig; + class AliMUONTriggerIO : public TObject { @@ -39,33 +42,51 @@ public: AliMUONTriggerIO(const char* regionalFileToRead); virtual ~AliMUONTriggerIO(); - Bool_t ReadMasks(const char* localFile, + + Bool_t ReadConfig(const char* localFile, const char* regionalFile, const char* globalFile, AliMUONVStore* localMasks, - AliMUONVStore* regionalMasks, - AliMUONVCalibParam* globalMasks, - Bool_t warn = true); - + AliMUONRegionalTriggerConfig* regionalConfig, + AliMUONGlobalCrateConfig* globalConfig); + Bool_t ReadLUT(const char* lutFileToRead, AliMUONTriggerLut& lut); Bool_t WriteLUT(const AliMUONTriggerLut& lut, const char* lutFileToWrite); - Bool_t WriteMasks(const char* localFile, + Bool_t WriteConfig(const char* localFile, const char* regionalFile, const char* globalFile, - AliMUONVStore* localMasks, - AliMUONVStore* regionalMasks, - AliMUONVCalibParam* globalMasks) const; + const AliMUONVStore* localMasks, + AliMUONRegionalTriggerConfig* regionalConfig, + AliMUONGlobalCrateConfig* globalConfig) const; + + + Int_t ReadGlobalConfig(const char* globalFile, AliMUONGlobalCrateConfig* globalConfig) const; + + Bool_t WriteGlobalConfig(const char* globalFile, AliMUONGlobalCrateConfig* globalConfig) const; + + Int_t ReadRegionalConfig(const char* regionalFile, AliMUONRegionalTriggerConfig* regionalConfig); + + Bool_t WriteRegionalConfig(const char* regionalFile, AliMUONRegionalTriggerConfig* regionalConfig) const; + + Int_t ReadLocalMasks(const char* localFile, AliMUONVStore& localMasks) const; + + Bool_t WriteLocalMasks(const char* localFile, const AliMUONVStore& localMasks) const; + + void ReadLocalLUT(AliMUONTriggerLut& lut, Int_t localBoardId, FILE* flut); + void WriteLocalLUT(const AliMUONTriggerLut& lut, Int_t localBoardId, + FILE* flut); + Int_t LocalBoardId(Int_t index) const; + Int_t LocalBoardId(Int_t ddlId, Int_t crateId, Int_t localId) const; - void UpdateMapping(Bool_t writeFile = true) const; private: - void DeCompAddress(UChar_t &ypos, UChar_t &ytri, UChar_t &xdev, UChar_t &xpos, + Bool_t DeCompAddress(UChar_t &ypos, UChar_t &ytri, UChar_t &xdev, UChar_t &xpos, UShort_t address) const; void FillLut(AliMUONTriggerLut& lut, @@ -76,29 +97,15 @@ private: /// Return number of local boards Int_t NofLocalBoards() const { return fRegionalTrigger.GetNofLocalBoards(); } - Int_t ReadGlobal(const char* globalFile, AliMUONVCalibParam* globalMasks); - - Bool_t WriteGlobal(const char* globalFile, AliMUONVCalibParam* globalMasks) const; - - Int_t ReadRegional(const char* regionalFile, AliMUONVStore* regionalMasks, Bool_t warn = true); - - Bool_t WriteRegional(const char* regionalFile, AliMUONVStore* regionalMasks) const; - - Int_t ReadLocalMasks(const char* localFile, AliMUONVStore& localMasks) const; - Bool_t WriteLocalMasks(const char* localFile, AliMUONVStore& localMasks) const; - - void ReadLocalLUT(AliMUONTriggerLut& lut, Int_t localBoardId, FILE* flut); - - void WriteLocalLUT(const AliMUONTriggerLut& lut, Int_t localBoardId, - FILE* flut); - private: AliMpRegionalTrigger fRegionalTrigger; //!< Regional trigger - AliMpGlobalCrate fGlobalCrate; //!< Global crate object - ClassDef(AliMUONTriggerIO,0) // Read/Write trigger masks and LUT to/from online files + static const UInt_t fgkLocalLutSize; ///< length of the lut for one local board + + + ClassDef(AliMUONTriggerIO,2) // Read/Write trigger masks and LUT to/from online files }; #endif