X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=MUON%2FAliMUONTriggerIO.h;h=7cc4dee0e61735dace363342f61a8e6c0ddf5e74;hb=7875dc73a706005dd1b60857c5424accacf572f2;hp=a92d6c82f0d447cce7ae89522bb3149aa901a29f;hpb=aed0186bef9c7c018a50dd78e5eea8415444db8c;p=u%2Fmrichter%2FAliRoot.git diff --git a/MUON/AliMUONTriggerIO.h b/MUON/AliMUONTriggerIO.h index a92d6c82f0d..7cc4dee0e61 100644 --- a/MUON/AliMUONTriggerIO.h +++ b/MUON/AliMUONTriggerIO.h @@ -6,31 +6,34 @@ // $Id$ -/// \ingroup trigger +/// \ingroup calib /// \class AliMUONTriggerIO /// \brief Handles read/write of masks and LUT to/from online files /// // Author Laurent Aphecetche, Subatech -#ifndef ROOT_TArrayI -# include -#endif - #ifndef ROOT_TObject # include #endif -#include #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,40 +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); -// void SetLocalBoardIds(const TArrayI& localBoardIds); - - Int_t LocalBoardId(Int_t index) const; - - 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; - AliMpTriggerCrate* GetTriggerCrate(TString crateName, Bool_t warn = true) const; - AliMpLocalBoard* GetLocalBoard(Int_t localBoardId, Bool_t warn = true) const; - AliMpDDL* GetDDL(Int_t ddlId, Bool_t warn = true) const; + void ReadLocalLUT(AliMUONTriggerLut& lut, Int_t localBoardId, FILE* flut); - void UpdateMapping(Bool_t writeFile = true) const; + 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; + 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, @@ -81,33 +95,17 @@ private: /// Return number of local boards - Int_t NofLocalBoards() const { return fLocalBoards.GetSize(); } + 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: - AliMpExMap fTriggerCrates; //!< The map of trigger crate per their ID - AliMpExMap fLocalBoards; //!< The map of local board per their ID - AliMpGlobalCrate fGlobalCrate; //!< Global crate object - TObjArray fDDLs; //!< DDLs array object + AliMpRegionalTrigger fRegionalTrigger; //!< Regional trigger - 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