AliRoot Core  3abf5b4 (3abf5b4)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliMUONRawStreamTriggerHP::AliDecoderEventHandler Class Reference
Inheritance diagram for AliMUONRawStreamTriggerHP::AliDecoderEventHandler:

Public Member Functions

 AliDecoderEventHandler ()
 Default constructor. More...
 
virtual ~AliDecoderEventHandler ()
 Default destructor. More...
 
void SetMaxStructs (UInt_t maxRegionals, UInt_t maxLocals)
 Sets the internal arrays based on the maximum number of structures allowed. More...
 
void SetRawStream (AliMUONVRawStreamTrigger *rawStream)
 Sets the raw stream object which should be the parent of this class. More...
 
const AliHeaderGetHeaders () const
 Returns the decoded DARC and global headers (and scalars if they exist). More...
 
UInt_t RegionalHeaderCount () const
 Returns the number of regional headers. More...
 
const AliRegionalHeaderRegionalHeader (UInt_t i) const
 Return the i'th regional structure header. More...
 
const AliLocalStructFirstLocalStruct () const
 Return the first local structure decoded. More...
 
const AliLocalStructEndOfLocalStructs () const
 
UInt_t GetDarcEoWErrors () const
 Get number of end of DARC word errors. More...
 
UInt_t GetGlobalEoWErrors () const
 Get number of end of Global word errors. More...
 
UInt_t GetRegEoWErrors () const
 Get number of end of regional word errors. More...
 
UInt_t GetLocalEoWErrors () const
 Get number of end of local word errors. More...
 
Bool_t Warnings () const
 Returns the warnings flag. More...
 
void Warnings (Bool_t value)
 Sets the warnings flag. More...
 
void OnNewBuffer (const void *buffer, UInt_t bufferSize)
 New buffer handler. More...
 
void OnEndOfBuffer (const void *, UInt_t)
 End of buffer handler marks the end of local trigger structures. More...
 
void OnDarcHeader (UInt_t header, const AliMUONDarcScalarsStruct *scalars, const void *)
 Handler for the DARC header which just remembers the pointers for later. More...
 
void OnGlobalHeader (const AliMUONGlobalHeaderStruct *header, const AliMUONGlobalScalarsStruct *scalars, const void *)
 Handler for the global header which stores the pointer to the headers. More...
 
void OnNewRegionalStructV2 (UInt_t iReg, const AliMUONRegionalHeaderStruct *header, const AliMUONRegionalScalarsStruct *scalars, const void *data)
 Handler for new regional card structures. More...
 
void OnLocalStructV2 (UInt_t iLoc, const AliMUONLocalInfoStruct *localStruct, const AliMUONLocalScalarsStruct *scalars)
 Handler for new local card structures. More...
 
void OnError (ErrorCode error, const void *location)
 Error handler. More...
 
- Public Member Functions inherited from AliMUONTriggerDDLDecoderEventHandler
virtual ~AliMUONTriggerDDLDecoderEventHandler ()
 
void OnNewBuffer (const void *, UInt_t)
 
void OnEndOfBuffer (const void *, UInt_t)
 
void OnDarcHeader (UInt_t, const AliMUONDarcScalarsStruct *, const void *)
 
void OnGlobalHeader (const AliMUONGlobalHeaderStruct *, const AliMUONGlobalScalarsStruct *, const void *)
 
void OnNewRegionalStruct (const AliMUONRegionalHeaderStruct *, const AliMUONRegionalScalarsStruct *, const void *)
 
void OnNewRegionalStructV2 (UInt_t, const AliMUONRegionalHeaderStruct *, const AliMUONRegionalScalarsStruct *, const void *)
 
void OnEndOfRegionalStruct (const AliMUONRegionalHeaderStruct *, const AliMUONRegionalScalarsStruct *, const void *)
 
void OnEndOfRegionalStructV2 (UInt_t, const AliMUONRegionalHeaderStruct *, const AliMUONRegionalScalarsStruct *, const void *)
 
void OnLocalStruct (const AliMUONLocalInfoStruct *, const AliMUONLocalScalarsStruct *)
 
void OnLocalStructV2 (UInt_t, const AliMUONLocalInfoStruct *, const AliMUONLocalScalarsStruct *)
 
void OnError (ErrorCode, const void *)
 

Private Member Functions

 AliDecoderEventHandler (const AliDecoderEventHandler &)
 Not implemented. More...
 
AliDecoderEventHandleroperator= (const AliDecoderEventHandler &)
 Not implemented. More...
 

Private Attributes

AliMUONVRawStreamTriggerfRawStream
 ! Pointer to the parent raw stream object. More...
 
const void * fBufferStart
 ! Pointer to the start of the current DDL payload buffer. More...
 
UInt_t fDarcHeader
 ! Currently decoded DARC header. More...
 
const AliMUONDarcScalarsStructfDarcScalars
 ! Currently decoded DARC scalars. More...
 
AliHeader fHeaders
 ! Headers of the DDL payload. More...
 
UInt_t fRegionalsCount
 ! Number of regional headers filled in fRegionals. More...
 
AliRegionalHeaderfRegionals
 ! Array of regional headers. [0..fMaxRegionals-1] More...
 
AliLocalStructfLocals
 ! Array of decoded local structured. [0..fMaxRegionals*fMaxLocals-1] More...
 
AliLocalStructfEndOfLocals
 ! Marker indicating the position just passed the last filled element in fLocals. More...
 
AliRegionalHeaderfCurrentRegional
 ! Current regional header position. More...
 
AliLocalStructfCurrentLocal
 ! Current local trigger structure. More...
 
UInt_t fDarcEoWErrors
 ! Number of end of DARC word errors. More...
 
UInt_t fGlobalEoWErrors
 ! Number of end of global word errors. More...
 
UInt_t fRegEoWErrors
 ! Number of end of regional word errors. More...
 
UInt_t fLocalEoWErrors
 ! Number of end of local word errors. More...
 
Bool_t fWarnings
 ! Flag indicating if we should generate a warning for errors. More...
 

Static Private Attributes

static const
AliMUONRegionalHeaderStruct 
fgkEmptyHeader
 ! Empty header for skipped regional structures. More...
 

Additional Inherited Members

- Public Types inherited from AliMUONTriggerDDLDecoderEventHandler
enum  ErrorCode {
  kNoError = 0, kTooManyRegionals = 1, kNoDarcHeader = 2, kNoDarcScalars = 3,
  kWrongEventType = 4, kNoEndOfDarc = 5, kBadEndOfDarc = 6, kNoGlobalHeader = 7,
  kNoGlobalScalars = 8, kNoEndOfGlobal = 9, kBadEndOfGlobal = 10, kNoRegionalHeader = 11,
  kNoRegionalScalars = 12, kNoEndOfRegional = 13, kBadEndOfRegional = 14, kNoLocalStruct = 15,
  kNoLocalScalars = 16, kNoEndOfLocal = 17, kBadEndOfLocal = 18, kBufferTooBig = 19
}
 All the possible error codes from the parsing. More...
 
- Static Public Member Functions inherited from AliMUONTriggerDDLDecoderEventHandler
static UChar_t GetDarcEventType (UInt_t header)
 
static UChar_t GetDarcType (UInt_t header)
 
static UChar_t GetDarcSerialNb (UInt_t header)
 
static UChar_t GetDarcVersion (UInt_t header)
 
static bool GetDarcVMETrig (UInt_t header)
 
static bool GetDarcGlobalFlag (UInt_t header)
 
static bool GetDarcCTPTrig (UInt_t header)
 
static bool GetDarcDAQFlag (UInt_t header)
 
static UChar_t GetDarcRegPattern (UInt_t header)
 
static UShort_t GetRegionalL0 (const AliMUONRegionalHeaderStruct *header)
 Return L0. More...
 
static UShort_t GetRegionalMask (const AliMUONRegionalHeaderStruct *header)
 Return mask. More...
 
static bool GetRegionalPhysFlag (const AliMUONRegionalHeaderStruct *header)
 Return RegPhysFlag. More...
 
static UChar_t GetRegionalResetNb (const AliMUONRegionalHeaderStruct *header)
 Return ResetNb. More...
 
static UChar_t GetRegionalSerialNb (const AliMUONRegionalHeaderStruct *header)
 Return SerialNb. More...
 
static UChar_t GetRegionalId (const AliMUONRegionalHeaderStruct *header)
 Return Id. More...
 
static UChar_t GetRegionalVersion (const AliMUONRegionalHeaderStruct *header)
 Return Version. More...
 
static UChar_t GetRegionalOutput (const AliMUONRegionalHeaderStruct *header)
 Return Output. More...
 
static UShort_t GetRegionalErrorBits (const AliMUONRegionalHeaderStruct *header)
 Return ErrorBits. More...
 
static UChar_t GetRegionalFPGANumber (const AliMUONRegionalHeaderStruct *header)
 Return FPGANumber. More...
 
static bool GetRegionalDarcPhysFlag (const AliMUONRegionalHeaderStruct *header)
 Return DarcPhysFlag. More...
 
static bool GetRegionalPresentFlag (const AliMUONRegionalHeaderStruct *header)
 Return PresentFlag. More...
 
static bool GetRegionalRamNotFullFlag (const AliMUONRegionalHeaderStruct *header)
 Return RamNotFullFlag. More...
 
static bool GetRegionalRamNotEmptyFlag (const AliMUONRegionalHeaderStruct *header)
 Return RamNotEmptyFlag. More...
 
static bool GetRegionalL2RejStatus (const AliMUONRegionalHeaderStruct *header)
 Return L2RejStatus. More...
 
static bool GetRegionalL2AccStatus (const AliMUONRegionalHeaderStruct *header)
 Return L2AccStatus. More...
 
static bool GetRegionalL1Status (const AliMUONRegionalHeaderStruct *header)
 Return L1Status. More...
 
static bool GetRegionalL0Status (const AliMUONRegionalHeaderStruct *header)
 Return L0Status. More...
 
static UChar_t GetRegionalEventInRam (const AliMUONRegionalHeaderStruct *header)
 Return EventInRam. More...
 
static UChar_t GetRegionalBusy (const AliMUONRegionalHeaderStruct *header)
 Return Busy. More...
 
static UChar_t GetGlobalOutput (const AliMUONGlobalHeaderStruct *header)
 
static UShort_t GetGlobalConfig (const AliMUONGlobalHeaderStruct *header)
 
static UShort_t GetLocalX2 (const AliMUONLocalInfoStruct *local)
 Return X2. More...
 
static UShort_t GetLocalX1 (const AliMUONLocalInfoStruct *local)
 Return X1. More...
 
static UShort_t GetLocalX4 (const AliMUONLocalInfoStruct *local)
 Return X4. More...
 
static UShort_t GetLocalX3 (const AliMUONLocalInfoStruct *local)
 Return X3. More...
 
static UShort_t GetLocalY2 (const AliMUONLocalInfoStruct *local)
 Return Y2. More...
 
static UShort_t GetLocalY1 (const AliMUONLocalInfoStruct *local)
 Return Y1. More...
 
static UShort_t GetLocalY4 (const AliMUONLocalInfoStruct *local)
 Return Y4. More...
 
static UShort_t GetLocalY3 (const AliMUONLocalInfoStruct *local)
 Return Y3. More...
 
static UChar_t GetLocalId (const AliMUONLocalInfoStruct *local)
 Return Id. More...
 
static UChar_t GetLocalDec (const AliMUONLocalInfoStruct *local)
 Return Dec. More...
 
static bool GetLocalTrigY (const AliMUONLocalInfoStruct *local)
 Return TrigY. More...
 
static bool GetLocalTriggerY (const AliMUONLocalInfoStruct *local)
 Return TriggerY. More...
 
static UChar_t GetLocalYPos (const AliMUONLocalInfoStruct *local)
 Return Upos. More...
 
static bool GetLocalSXDev (const AliMUONLocalInfoStruct *local)
 Get Sign of X deviation. More...
 
static UChar_t GetLocalXDev (const AliMUONLocalInfoStruct *local)
 Get X deviation. More...
 
static bool GetLocalTriggerX (const AliMUONLocalInfoStruct *local)
 Return TriggerX. More...
 
static UChar_t GetLocalXPos (const AliMUONLocalInfoStruct *local)
 Return Xpos. More...
 
static UChar_t GetLocalLpt (const AliMUONLocalInfoStruct *local)
 Return LPT. More...
 
static UChar_t GetLocalHpt (const AliMUONLocalInfoStruct *local)
 Return HPT. More...
 
static UShort_t GetLocalSwitch (const AliMUONLocalScalarsStruct *scalars)
 Return switch. More...
 
static UChar_t GetLocalComptXY (const AliMUONLocalScalarsStruct *scalars)
 Return ComptXY. More...
 
static UShort_t GetLocalXY1 (const AliMUONLocalScalarsStruct *scalars, UInt_t n)
 Return XY1. More...
 
static UShort_t GetLocalXY2 (const AliMUONLocalScalarsStruct *scalars, UInt_t n)
 Return XY2. More...
 
static UShort_t GetLocalXY3 (const AliMUONLocalScalarsStruct *scalars, UInt_t n)
 Return XY3. More...
 
static UShort_t GetLocalXY4 (const AliMUONLocalScalarsStruct *scalars, UInt_t n)
 Return XY4. More...
 
static const char * ErrorCodeToString (ErrorCode code)
 
static const char * ErrorCodeToMessage (ErrorCode code)
 

Detailed Description

This is the custom event handler (callback interface) class which unpacks raw data words and fills an internal buffer with decoded digits as they are decoded by the high performance decoder. Any errors are logged to the parent AliMUONVRawStreamTrigger, so one must set this pointer appropriately before decoding and DDL payload.

Definition at line 629 of file AliMUONRawStreamTriggerHP.h.

Constructor & Destructor Documentation

AliMUONRawStreamTriggerHP::AliDecoderEventHandler::AliDecoderEventHandler ( )

Default constructor.

Default constructor

Definition at line 574 of file AliMUONRawStreamTriggerHP.cxx.

AliMUONRawStreamTriggerHP::AliDecoderEventHandler::~AliDecoderEventHandler ( )
virtual

Default destructor.

Default destructor cleans up the allocated memory.

Definition at line 596 of file AliMUONRawStreamTriggerHP.cxx.

AliMUONRawStreamTriggerHP::AliDecoderEventHandler::AliDecoderEventHandler ( const AliDecoderEventHandler )
private

Not implemented.

Member Function Documentation

const AliLocalStruct* AliMUONRawStreamTriggerHP::AliDecoderEventHandler::EndOfLocalStructs ( ) const
inline

Returns the marker to the end of local structures. i.e. one position past the last local structure in fLocals.

Definition at line 661 of file AliMUONRawStreamTriggerHP.h.

const AliLocalStruct* AliMUONRawStreamTriggerHP::AliDecoderEventHandler::FirstLocalStruct ( ) const
inline

Return the first local structure decoded.

Definition at line 657 of file AliMUONRawStreamTriggerHP.h.

UInt_t AliMUONRawStreamTriggerHP::AliDecoderEventHandler::GetDarcEoWErrors ( ) const
inline

Get number of end of DARC word errors.

Definition at line 664 of file AliMUONRawStreamTriggerHP.h.

UInt_t AliMUONRawStreamTriggerHP::AliDecoderEventHandler::GetGlobalEoWErrors ( ) const
inline

Get number of end of Global word errors.

Definition at line 667 of file AliMUONRawStreamTriggerHP.h.

const AliHeader* AliMUONRawStreamTriggerHP::AliDecoderEventHandler::GetHeaders ( ) const
inline

Returns the decoded DARC and global headers (and scalars if they exist).

Definition at line 645 of file AliMUONRawStreamTriggerHP.h.

UInt_t AliMUONRawStreamTriggerHP::AliDecoderEventHandler::GetLocalEoWErrors ( ) const
inline

Get number of end of local word errors.

Definition at line 673 of file AliMUONRawStreamTriggerHP.h.

UInt_t AliMUONRawStreamTriggerHP::AliDecoderEventHandler::GetRegEoWErrors ( ) const
inline

Get number of end of regional word errors.

Definition at line 670 of file AliMUONRawStreamTriggerHP.h.

void AliMUONRawStreamTriggerHP::AliDecoderEventHandler::OnDarcHeader ( UInt_t  header,
const AliMUONDarcScalarsStruct scalars,
const void *   
)
inline

Handler for the DARC header which just remembers the pointers for later.

Definition at line 692 of file AliMUONRawStreamTriggerHP.h.

void AliMUONRawStreamTriggerHP::AliDecoderEventHandler::OnEndOfBuffer ( const void *  ,
UInt_t   
)
inline

End of buffer handler marks the end of local trigger structures.

Definition at line 686 of file AliMUONRawStreamTriggerHP.h.

void AliMUONRawStreamTriggerHP::AliDecoderEventHandler::OnError ( ErrorCode  error,
const void *  location 
)

Error handler.

This is called by the high performance decoder when a error occurs when trying to decode the DDL payload. This indicates corruption in the data. This method converts the error code to a descriptive message and logs this with the raw reader.

Parameters
errorThe error code indicating the problem.
locationA pointer to the location within the DDL payload buffer being decoded where the problem with the data was found.

Definition at line 671 of file AliMUONRawStreamTriggerHP.cxx.

void AliMUONRawStreamTriggerHP::AliDecoderEventHandler::OnGlobalHeader ( const AliMUONGlobalHeaderStruct header,
const AliMUONGlobalScalarsStruct scalars,
const void *   
)
inline

Handler for the global header which stores the pointer to the headers.

Definition at line 701 of file AliMUONRawStreamTriggerHP.h.

void AliMUONRawStreamTriggerHP::AliDecoderEventHandler::OnLocalStructV2 ( UInt_t  iLoc,
const AliMUONLocalInfoStruct localStruct,
const AliMUONLocalScalarsStruct scalars 
)
inline

Handler for new local card structures.

New local trigger structure handler. This is called by the high performance decoder when a new local trigger structure is found within the DDL payload. We mark the location of the structure in the DDL paytload and increment appropriate counters.

Definition at line 808 of file AliMUONRawStreamTriggerHP.h.

void AliMUONRawStreamTriggerHP::AliDecoderEventHandler::OnNewBuffer ( const void *  buffer,
UInt_t  bufferSize 
)

New buffer handler.

This is called by the high performance decoder when a new DDL payload is about to be decoded.

Definition at line 635 of file AliMUONRawStreamTriggerHP.cxx.

void AliMUONRawStreamTriggerHP::AliDecoderEventHandler::OnNewRegionalStructV2 ( UInt_t  iReg,
const AliMUONRegionalHeaderStruct header,
const AliMUONRegionalScalarsStruct scalars,
const void *  data 
)
inline

Handler for new regional card structures.

New regional structure handler is called by the decoder whenever a new regional header is found. We just mark the header and increment the appropriate counters.

Definition at line 783 of file AliMUONRawStreamTriggerHP.h.

AliDecoderEventHandler& AliMUONRawStreamTriggerHP::AliDecoderEventHandler::operator= ( const AliDecoderEventHandler )
private

Not implemented.

const AliRegionalHeader* AliMUONRawStreamTriggerHP::AliDecoderEventHandler::RegionalHeader ( UInt_t  i) const
inline

Return the i'th regional structure header.

Definition at line 651 of file AliMUONRawStreamTriggerHP.h.

UInt_t AliMUONRawStreamTriggerHP::AliDecoderEventHandler::RegionalHeaderCount ( ) const
inline

Returns the number of regional headers.

Definition at line 648 of file AliMUONRawStreamTriggerHP.h.

void AliMUONRawStreamTriggerHP::AliDecoderEventHandler::SetMaxStructs ( UInt_t  maxRegionals,
UInt_t  maxLocals 
)

Sets the internal arrays based on the maximum number of structures allowed.

Sets the maximum number of structures allowed.

Definition at line 605 of file AliMUONRawStreamTriggerHP.cxx.

void AliMUONRawStreamTriggerHP::AliDecoderEventHandler::SetRawStream ( AliMUONVRawStreamTrigger rawStream)
inline

Sets the raw stream object which should be the parent of this class.

Definition at line 642 of file AliMUONRawStreamTriggerHP.h.

Bool_t AliMUONRawStreamTriggerHP::AliDecoderEventHandler::Warnings ( ) const
inline

Returns the warnings flag.

Definition at line 676 of file AliMUONRawStreamTriggerHP.h.

void AliMUONRawStreamTriggerHP::AliDecoderEventHandler::Warnings ( Bool_t  value)
inline

Sets the warnings flag.

Definition at line 678 of file AliMUONRawStreamTriggerHP.h.

Member Data Documentation

const void* AliMUONRawStreamTriggerHP::AliDecoderEventHandler::fBufferStart
private

! Pointer to the start of the current DDL payload buffer.

Definition at line 731 of file AliMUONRawStreamTriggerHP.h.

AliLocalStruct* AliMUONRawStreamTriggerHP::AliDecoderEventHandler::fCurrentLocal
private

! Current local trigger structure.

Definition at line 740 of file AliMUONRawStreamTriggerHP.h.

AliRegionalHeader* AliMUONRawStreamTriggerHP::AliDecoderEventHandler::fCurrentRegional
private

! Current regional header position.

Definition at line 739 of file AliMUONRawStreamTriggerHP.h.

UInt_t AliMUONRawStreamTriggerHP::AliDecoderEventHandler::fDarcEoWErrors
private

! Number of end of DARC word errors.

Definition at line 741 of file AliMUONRawStreamTriggerHP.h.

UInt_t AliMUONRawStreamTriggerHP::AliDecoderEventHandler::fDarcHeader
private

! Currently decoded DARC header.

Definition at line 732 of file AliMUONRawStreamTriggerHP.h.

const AliMUONDarcScalarsStruct* AliMUONRawStreamTriggerHP::AliDecoderEventHandler::fDarcScalars
private

! Currently decoded DARC scalars.

Definition at line 733 of file AliMUONRawStreamTriggerHP.h.

AliLocalStruct* AliMUONRawStreamTriggerHP::AliDecoderEventHandler::fEndOfLocals
private

! Marker indicating the position just passed the last filled element in fLocals.

Definition at line 738 of file AliMUONRawStreamTriggerHP.h.

const AliMUONRegionalHeaderStruct AliMUONRawStreamTriggerHP::AliDecoderEventHandler::fgkEmptyHeader
staticprivate
Initial value:

! Empty header for skipped regional structures.

Definition at line 747 of file AliMUONRawStreamTriggerHP.h.

UInt_t AliMUONRawStreamTriggerHP::AliDecoderEventHandler::fGlobalEoWErrors
private

! Number of end of global word errors.

Definition at line 742 of file AliMUONRawStreamTriggerHP.h.

AliHeader AliMUONRawStreamTriggerHP::AliDecoderEventHandler::fHeaders
private

! Headers of the DDL payload.

Definition at line 734 of file AliMUONRawStreamTriggerHP.h.

UInt_t AliMUONRawStreamTriggerHP::AliDecoderEventHandler::fLocalEoWErrors
private

! Number of end of local word errors.

Definition at line 744 of file AliMUONRawStreamTriggerHP.h.

AliLocalStruct* AliMUONRawStreamTriggerHP::AliDecoderEventHandler::fLocals
private

! Array of decoded local structured. [0..fMaxRegionals*fMaxLocals-1]

Definition at line 737 of file AliMUONRawStreamTriggerHP.h.

AliMUONVRawStreamTrigger* AliMUONRawStreamTriggerHP::AliDecoderEventHandler::fRawStream
private

! Pointer to the parent raw stream object.

Definition at line 730 of file AliMUONRawStreamTriggerHP.h.

UInt_t AliMUONRawStreamTriggerHP::AliDecoderEventHandler::fRegEoWErrors
private

! Number of end of regional word errors.

Definition at line 743 of file AliMUONRawStreamTriggerHP.h.

AliRegionalHeader* AliMUONRawStreamTriggerHP::AliDecoderEventHandler::fRegionals
private

! Array of regional headers. [0..fMaxRegionals-1]

Definition at line 736 of file AliMUONRawStreamTriggerHP.h.

UInt_t AliMUONRawStreamTriggerHP::AliDecoderEventHandler::fRegionalsCount
private

! Number of regional headers filled in fRegionals.

Definition at line 735 of file AliMUONRawStreamTriggerHP.h.

Bool_t AliMUONRawStreamTriggerHP::AliDecoderEventHandler::fWarnings
private

! Flag indicating if we should generate a warning for errors.

Definition at line 745 of file AliMUONRawStreamTriggerHP.h.


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