AliRoot Core  v5-06-30 (35d6c57)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliMUONTriggerIO Class Reference

Handles read/write of masks and LUT to/from online files. More...

#include <AliMUONTriggerIO.h>

Inheritance diagram for AliMUONTriggerIO:

Public Member Functions

 AliMUONTriggerIO ()
 
 AliMUONTriggerIO (const char *regionalFileToRead)
 
virtual ~AliMUONTriggerIO ()
 
Bool_t ReadConfig (const char *localFile, const char *regionalFile, const char *globalFile, AliMUONVStore *localMasks, AliMUONRegionalTriggerConfig *regionalConfig, AliMUONGlobalCrateConfig *globalConfig)
 
Bool_t ReadTrigScalers (const char *scfile, TClonesArray &scalers) const
 
Bool_t WriteTrigScalers (const TClonesArray &scalers, const char *scfile) const
 
Bool_t ReadLUT (const char *lutFileToRead, AliMUONTriggerLut &lut)
 
Bool_t WriteLUT (const AliMUONTriggerLut &lut, const char *lutFileToWrite)
 
Bool_t WriteConfig (const char *localFile, const char *regionalFile, const char *globalFile, 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
 

Private Member Functions

Bool_t DeCompAddress (UChar_t &ypos, UChar_t &ytri, UChar_t &xdev, UChar_t &xpos, UShort_t address) const
 
void FillLut (AliMUONTriggerLut &lut, Int_t icirc, UChar_t istripX, UChar_t idev, Int_t lutLpt[16][2], Int_t lutHpt[16][2])
 
Int_t NofLocalBoards () const
 Return number of local boards. More...
 

Private Attributes

AliMpRegionalTrigger fRegionalTrigger
 ! Regional trigger More...
 

Static Private Attributes

static const UInt_t fgkLocalLutSize = 1 << 14
 length of the lut for one local board More...
 

Detailed Description

Handles read/write of masks and LUT to/from online files.

Handles read/write of masks and LUT to/from online files, to be used by Shuttle and Trigger DA.

Author
Laurent Aphecetche, Christian Finck Subatech
Bogdan Vulpescu, LPC Clermont-Ferrand

Definition at line 36 of file AliMUONTriggerIO.h.

Constructor & Destructor Documentation

AliMUONTriggerIO::AliMUONTriggerIO ( )

ctor

Definition at line 61 of file AliMUONTriggerIO.cxx.

AliMUONTriggerIO::AliMUONTriggerIO ( const char *  regionalFileToRead)

ctor

Definition at line 69 of file AliMUONTriggerIO.cxx.

AliMUONTriggerIO::~AliMUONTriggerIO ( )
virtual

dtor

Definition at line 78 of file AliMUONTriggerIO.cxx.

Member Function Documentation

Bool_t AliMUONTriggerIO::DeCompAddress ( UChar_t &  ypos,
UChar_t &  ytri,
UChar_t &  xdev,
UChar_t &  xpos,
UShort_t  address 
) const
private

decompose the 15-bits address

Definition at line 85 of file AliMUONTriggerIO.cxx.

Referenced by ReadLocalLUT().

void AliMUONTriggerIO::FillLut ( AliMUONTriggerLut lut,
Int_t  icirc,
UChar_t  istripX,
UChar_t  idev,
Int_t  lutLpt[16][2],
Int_t  lutHpt[16][2] 
)
private

Fill the LUT histograms

Definition at line 151 of file AliMUONTriggerIO.cxx.

Referenced by ReadLocalLUT().

Int_t AliMUONTriggerIO::LocalBoardId ( Int_t  index) const

Return the i-th localBoardId, or -1 if index is out of bounds

Definition at line 1051 of file AliMUONTriggerIO.cxx.

Referenced by main().

Int_t AliMUONTriggerIO::LocalBoardId ( Int_t  ddlId,
Int_t  crateId,
Int_t  localId 
) const

Return local board id from crate and local indexes.

Definition at line 1061 of file AliMUONTriggerIO.cxx.

Int_t AliMUONTriggerIO::NofLocalBoards ( ) const
inlineprivate

Return number of local boards.

Definition at line 100 of file AliMUONTriggerIO.h.

Referenced by ReadLocalMasks(), ReadLUT(), WriteLocalMasks(), and WriteLUT().

Bool_t AliMUONTriggerIO::ReadConfig ( const char *  localFile,
const char *  regionalFile,
const char *  globalFile,
AliMUONVStore localMasks,
AliMUONRegionalTriggerConfig regionalConfig,
AliMUONGlobalCrateConfig globalConfig 
)

Fill the various masks store from files

Definition at line 539 of file AliMUONTriggerIO.cxx.

Referenced by AliMUONTriggerSubprocessor::Initialize(), and ReadMaskFiles().

Int_t AliMUONTriggerIO::ReadGlobalConfig ( const char *  globalFile,
AliMUONGlobalCrateConfig globalConfig 
) const

read the global crate file the masks are disable bit for each crate, 8 per darc board bit value 0 means enable, 1 means disable *

Definition at line 582 of file AliMUONTriggerIO.cxx.

Referenced by ReadConfig().

void AliMUONTriggerIO::ReadLocalLUT ( AliMUONTriggerLut lut,
Int_t  localBoardId,
FILE *  flut 
)

Read the LUT for one local board from an online file

Definition at line 264 of file AliMUONTriggerIO.cxx.

Referenced by ReadLUT().

Int_t AliMUONTriggerIO::ReadLocalMasks ( const char *  localFile,
AliMUONVStore localMasks 
) const

Fills the local masks store from file

Definition at line 198 of file AliMUONTriggerIO.cxx.

Referenced by ReadConfig().

Bool_t AliMUONTriggerIO::ReadLUT ( const char *  lutFileToRead,
AliMUONTriggerLut lut 
)

Fill the LUT object from online file

Definition at line 364 of file AliMUONTriggerIO.cxx.

Referenced by AliMUONTriggerSubprocessor::Initialize().

Int_t AliMUONTriggerIO::ReadRegionalConfig ( const char *  regionalFile,
AliMUONRegionalTriggerConfig regionalConfig 
)

Read regional file to fill

Definition at line 596 of file AliMUONTriggerIO.cxx.

Referenced by AliMUONTriggerIO(), and ReadConfig().

Bool_t AliMUONTriggerIO::ReadTrigScalers ( const char *  scfile,
TClonesArray &  scalers 
) const

Fill the trigger scalers object from online file

Definition at line 416 of file AliMUONTriggerIO.cxx.

Referenced by AliMUONTriggerSubprocessor::Initialize().

Bool_t AliMUONTriggerIO::WriteConfig ( const char *  localFile,
const char *  regionalFile,
const char *  globalFile,
const AliMUONVStore localMasks,
AliMUONRegionalTriggerConfig regionalConfig,
AliMUONGlobalCrateConfig globalConfig 
) const

write config files

Definition at line 737 of file AliMUONTriggerIO.cxx.

Bool_t AliMUONTriggerIO::WriteGlobalConfig ( const char *  globalFile,
AliMUONGlobalCrateConfig globalConfig 
) const

write global config

Definition at line 759 of file AliMUONTriggerIO.cxx.

Referenced by UpdateGlobalMasks(), and WriteConfig().

void AliMUONTriggerIO::WriteLocalLUT ( const AliMUONTriggerLut lut,
Int_t  localBoardId,
FILE *  flut 
)

loop over the address for the 4-bits lpt and hpt decisions

Definition at line 961 of file AliMUONTriggerIO.cxx.

Referenced by WriteLUT().

Bool_t AliMUONTriggerIO::WriteLocalMasks ( const char *  localFile,
const AliMUONVStore localMasks 
) const

write local mask removing/adding enable for a local board need a update of the configuration before calling this method mask are written for all boards including the copy card (Ch.F.)

Definition at line 919 of file AliMUONTriggerIO.cxx.

Referenced by MakePatternStore(), and WriteConfig().

Bool_t AliMUONTriggerIO::WriteLUT ( const AliMUONTriggerLut lut,
const char *  lutFileToWrite 
)

Convert an offline lut into an online (binary) lut file

Definition at line 614 of file AliMUONTriggerIO.cxx.

Bool_t AliMUONTriggerIO::WriteRegionalConfig ( const char *  regionalFile,
AliMUONRegionalTriggerConfig regionalConfig 
) const

write regional mask with the current configuration

if regional masks not defined, take the one from current configuration

Definition at line 833 of file AliMUONTriggerIO.cxx.

Referenced by WriteConfig().

Bool_t AliMUONTriggerIO::WriteTrigScalers ( const TClonesArray &  scalers,
const char *  scfile 
) const

Convert offline scalers into an online (binary) file

Definition at line 645 of file AliMUONTriggerIO.cxx.

Member Data Documentation

const UInt_t AliMUONTriggerIO::fgkLocalLutSize = 1 << 14
staticprivate

length of the lut for one local board

Definition at line 107 of file AliMUONTriggerIO.h.

Referenced by ReadLocalLUT(), and WriteLocalLUT().

AliMpRegionalTrigger AliMUONTriggerIO::fRegionalTrigger
private

The documentation for this class was generated from the following files: