AliRoot Core  v5-06-30 (35d6c57)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliMUONRawStreamTrackerHP::AliDecoderEventHandler Class Reference
Inheritance diagram for AliMUONRawStreamTrackerHP::AliDecoderEventHandler:

Public Member Functions

 AliDecoderEventHandler ()
 Default constructor. More...
 
virtual ~AliDecoderEventHandler ()
 Default destructor. More...
 
void SetMaxStructs (UInt_t maxBlocks, UInt_t maxDsps, UInt_t maxBusPatches)
 Sets the internal arrays based on the maximum number of structures allowed. More...
 
void SetRawStream (AliMUONRawStreamTrackerHP *rawStream)
 Sets the raw stream object which should be the parent of this class. More...
 
UInt_t BlockCount () const
 Return the number of blocks found in the payload. More...
 
const AliBlockHeaderBlockHeader (UInt_t i) const
 Return the i'th block structure. More...
 
const AliBusPatchFirstBusPatch () const
 Return the first bus patch decoded. More...
 
const AliBusPatchEndOfBusPatch () const
 Returns the marker to the end of bus patches. i.e. one position past the last bus patch. More...
 
UInt_t ParityErrorCount () const
 Returns the number of parity errors found in the DDL. More...
 
UInt_t GlitchErrorCount () const
 Returns the number of glitch errors found in the DDL. More...
 
UInt_t PaddingErrorCount () const
 Returns the number of padding errors found in the DDL. More...
 
UInt_t TokenLostCount () const
 Returns the number of token lost errors found in the DDL. 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 bus patches. More...
 
void OnNewBlock (const AliMUONBlockHeaderStruct *header, const void *)
 
void OnNewDSP (const AliMUONDSPHeaderStruct *header, const void *)
 
void OnNewBusPatch (const AliMUONBusPatchHeaderStruct *header, const void *data)
 
void OnData (UInt_t, bool parityError)
 Raw data word handler. More...
 
void OnError (ErrorCode error, const void *location)
 Error handler. More...
 
- Public Member Functions inherited from AliMUONTrackerDDLDecoderEventHandler
virtual ~AliMUONTrackerDDLDecoderEventHandler ()
 
void OnNewBuffer (const void *, UInt_t)
 
void OnEndOfBuffer (const void *, UInt_t)
 
void OnNewBlock (const AliMUONBlockHeaderStruct *, const void *)
 
void OnEndOfBlock (const AliMUONBlockHeaderStruct *, const void *)
 
void OnNewDSP (const AliMUONDSPHeaderStruct *, const void *)
 
void OnEndOfDSP (const AliMUONDSPHeaderStruct *, const void *)
 
void OnNewBusPatch (const AliMUONBusPatchHeaderStruct *, const void *)
 
void OnEndOfBusPatch (const AliMUONBusPatchHeaderStruct *, const void *)
 
void OnData (UInt_t, bool)
 
void OnError (ErrorCode, const void *)
 

Private Member Functions

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

Private Attributes

AliMUONRawStreamTrackerHPfRawStream
 ! Pointer to the parent raw stream object. More...
 
const void * fBufferStart
 ! Pointer to the start of the current DDL payload buffer. More...
 
UInt_t fBlockCount
 ! Number of blocks filled in fBlocks. More...
 
AliBlockHeaderfBlocks
 ! Array of blocks. [0..fMaxBlocks-1] More...
 
AliDspHeaderfDSPs
 ! Array of DSPs. [0..fMaxDsps*fMaxBlocks-1] More...
 
AliBusPatchfBusPatches
 ! Array of bus patches. [0..fMaxBusPatches*fMaxDsps*fMaxBlocks-1] More...
 
AliBusPatchfEndOfBusPatches
 ! Marks the last bus patch. More...
 
UInt_t fMaxChannels
 ! Maximum number of elements that can be stored in fParityOk. More...
 
Bool_t * fParityOk
 ! Array of flags for indicating if the parity is good for a raw data word. More...
 
AliBlockHeaderfCurrentBlock
 ! Current block in fBlocks. More...
 
AliDspHeaderfCurrentDSP
 ! Current DSP in fDSPs. More...
 
AliBusPatchfCurrentBusPatch
 ! Current bus patch in fBusPatches. More...
 
Bool_t * fCurrentParityOkFlag
 ! Current parity flag to be set in fParityOk. More...
 
UInt_t fParityErrors
 ! Number of parity errors found in DDL. More...
 
UInt_t fGlitchErrors
 ! Number of glitch errors found in DDL. More...
 
UInt_t fPaddingErrors
 ! Number of padding errors found in DDL. More...
 
UInt_t fTokenLostErrors
 ! Number of token lost errors found in DDL. More...
 
UInt_t fMaxBlocks
 ! max number of blocks More...
 
UInt_t fMaxDsps
 ! max number of dsps per block More...
 
UInt_t fMaxBusPatches
 ! max number of buspatches per dsp More...
 

Additional Inherited Members

- Public Types inherited from AliMUONTrackerDDLDecoderEventHandler
enum  ErrorCode {
  kNoError = 0, kBufferTooBig = 10, kTooManyBlocks = 11, kTooManyDSPs = 12,
  kTooManyBusPatches = 13, kNoBlockHeader = 14, kBadBlockKey = 15, kBadBlockLength = 16,
  kBadBlockTotalLength = 17, kBlockLengthMismatch = 18, kNoDSPHeader = 19, kBadDSPKey = 20,
  kBadDSPLength = 21, kBadDSPTotalLength = 22, kDSPLengthMismatch = 23, kNoBusPatchHeader = 24,
  kBadBusPatchKey = 25, kBadBusPatchLength = 26, kBadBusPatchTotalLength = 27, kBusPatchLengthMismatch = 28,
  kNoDDLTrailerWords = 29, kTooFewDDLTrailerWords = 30, kUnknownDspError = 31, kTokenLost = 32,
  kGlitchFound = 1, kBadPaddingWord = 2, kParityError = 3
}
 All the possible error codes for the parsing. More...
 
- Static Public Member Functions inherited from AliMUONTrackerDDLDecoderEventHandler
static void UnpackADC (UInt_t data, UShort_t &manuId, UChar_t &channelId, UShort_t &adc)
 
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.

Definition at line 606 of file AliMUONRawStreamTrackerHP.h.

Constructor & Destructor Documentation

AliMUONRawStreamTrackerHP::AliDecoderEventHandler::AliDecoderEventHandler ( )

Default constructor.

Default constructor initialises the internal parity flags buffer to store 8192 elements. This array will grow dynamically if needed.

Definition at line 540 of file AliMUONRawStreamTrackerHP.cxx.

AliMUONRawStreamTrackerHP::AliDecoderEventHandler::~AliDecoderEventHandler ( )
virtual

Default destructor.

Default destructor cleans up the allocated memory.

Definition at line 567 of file AliMUONRawStreamTrackerHP.cxx.

AliMUONRawStreamTrackerHP::AliDecoderEventHandler::AliDecoderEventHandler ( const AliDecoderEventHandler )
private

Not implemented.

Member Function Documentation

UInt_t AliMUONRawStreamTrackerHP::AliDecoderEventHandler::BlockCount ( ) const
inline

Return the number of blocks found in the payload.

Definition at line 622 of file AliMUONRawStreamTrackerHP.h.

const AliBlockHeader* AliMUONRawStreamTrackerHP::AliDecoderEventHandler::BlockHeader ( UInt_t  i) const
inline

Return the i'th block structure.

Definition at line 625 of file AliMUONRawStreamTrackerHP.h.

const AliBusPatch* AliMUONRawStreamTrackerHP::AliDecoderEventHandler::EndOfBusPatch ( ) const
inline

Returns the marker to the end of bus patches. i.e. one position past the last bus patch.

Definition at line 634 of file AliMUONRawStreamTrackerHP.h.

const AliBusPatch* AliMUONRawStreamTrackerHP::AliDecoderEventHandler::FirstBusPatch ( ) const
inline

Return the first bus patch decoded.

Definition at line 631 of file AliMUONRawStreamTrackerHP.h.

UInt_t AliMUONRawStreamTrackerHP::AliDecoderEventHandler::GlitchErrorCount ( ) const
inline

Returns the number of glitch errors found in the DDL.

Definition at line 639 of file AliMUONRawStreamTrackerHP.h.

void AliMUONRawStreamTrackerHP::AliDecoderEventHandler::OnData ( UInt_t  ,
bool  parityError 
)
inline

Raw data word handler.

Definition at line 672 of file AliMUONRawStreamTrackerHP.h.

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

End of buffer handler marks the end of bus patches.

Definition at line 651 of file AliMUONRawStreamTrackerHP.h.

void AliMUONRawStreamTrackerHP::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 logger object.

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 689 of file AliMUONRawStreamTrackerHP.cxx.

void AliMUONRawStreamTrackerHP::AliDecoderEventHandler::OnNewBlock ( const AliMUONBlockHeaderStruct header,
const void *   
)
inline

New block handler is called by the decoder whenever a new block structure is found. We just mark the new block and increment the internal counter.

New block handler is called by the decoder whenever a new block structure is found. We just mark the new block and increment the internal counter.

Definition at line 750 of file AliMUONRawStreamTrackerHP.h.

void AliMUONRawStreamTrackerHP::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.

Parameters
bufferThe pointer to the buffer storing the DDL payload.
bufferSizeThe size of the buffer in bytes.

Definition at line 616 of file AliMUONRawStreamTrackerHP.cxx.

void AliMUONRawStreamTrackerHP::AliDecoderEventHandler::OnNewBusPatch ( const AliMUONBusPatchHeaderStruct header,
const void *  data 
)
inline

New bus patch handler. This is called by the high performance decoder when a new bus patch is found within the DDL payload.

New bus patch handler. This is called by the high performance decoder when a new bus patch is found within the DDL payload.

Definition at line 782 of file AliMUONRawStreamTrackerHP.h.

void AliMUONRawStreamTrackerHP::AliDecoderEventHandler::OnNewDSP ( const AliMUONDSPHeaderStruct header,
const void *   
)
inline

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

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

Definition at line 766 of file AliMUONRawStreamTrackerHP.h.

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

Not implemented.

UInt_t AliMUONRawStreamTrackerHP::AliDecoderEventHandler::PaddingErrorCount ( ) const
inline

Returns the number of padding errors found in the DDL.

Definition at line 641 of file AliMUONRawStreamTrackerHP.h.

UInt_t AliMUONRawStreamTrackerHP::AliDecoderEventHandler::ParityErrorCount ( ) const
inline

Returns the number of parity errors found in the DDL.

Definition at line 637 of file AliMUONRawStreamTrackerHP.h.

void AliMUONRawStreamTrackerHP::AliDecoderEventHandler::SetMaxStructs ( UInt_t  maxBlocks,
UInt_t  maxDsps,
UInt_t  maxBusPatches 
)

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

Sets the maximum number of structures allowed.

Definition at line 578 of file AliMUONRawStreamTrackerHP.cxx.

void AliMUONRawStreamTrackerHP::AliDecoderEventHandler::SetRawStream ( AliMUONRawStreamTrackerHP rawStream)
inline

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

Definition at line 619 of file AliMUONRawStreamTrackerHP.h.

UInt_t AliMUONRawStreamTrackerHP::AliDecoderEventHandler::TokenLostCount ( ) const
inline

Returns the number of token lost errors found in the DDL.

Definition at line 643 of file AliMUONRawStreamTrackerHP.h.

Member Data Documentation

UInt_t AliMUONRawStreamTrackerHP::AliDecoderEventHandler::fBlockCount
private

! Number of blocks filled in fBlocks.

Definition at line 691 of file AliMUONRawStreamTrackerHP.h.

Referenced by BlockCount(), BlockHeader(), and OnNewBlock().

AliBlockHeader* AliMUONRawStreamTrackerHP::AliDecoderEventHandler::fBlocks
private

! Array of blocks. [0..fMaxBlocks-1]

Definition at line 692 of file AliMUONRawStreamTrackerHP.h.

Referenced by BlockHeader().

const void* AliMUONRawStreamTrackerHP::AliDecoderEventHandler::fBufferStart
private

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

Definition at line 690 of file AliMUONRawStreamTrackerHP.h.

AliBusPatch* AliMUONRawStreamTrackerHP::AliDecoderEventHandler::fBusPatches
private

! Array of bus patches. [0..fMaxBusPatches*fMaxDsps*fMaxBlocks-1]

Definition at line 694 of file AliMUONRawStreamTrackerHP.h.

Referenced by FirstBusPatch().

AliBlockHeader* AliMUONRawStreamTrackerHP::AliDecoderEventHandler::fCurrentBlock
private

! Current block in fBlocks.

Definition at line 698 of file AliMUONRawStreamTrackerHP.h.

Referenced by OnNewBlock().

AliBusPatch* AliMUONRawStreamTrackerHP::AliDecoderEventHandler::fCurrentBusPatch
private

! Current bus patch in fBusPatches.

Definition at line 700 of file AliMUONRawStreamTrackerHP.h.

Referenced by OnEndOfBuffer().

AliDspHeader* AliMUONRawStreamTrackerHP::AliDecoderEventHandler::fCurrentDSP
private

! Current DSP in fDSPs.

Definition at line 699 of file AliMUONRawStreamTrackerHP.h.

Referenced by OnNewBlock().

Bool_t* AliMUONRawStreamTrackerHP::AliDecoderEventHandler::fCurrentParityOkFlag
private

! Current parity flag to be set in fParityOk.

Definition at line 701 of file AliMUONRawStreamTrackerHP.h.

Referenced by OnData().

AliDspHeader* AliMUONRawStreamTrackerHP::AliDecoderEventHandler::fDSPs
private

! Array of DSPs. [0..fMaxDsps*fMaxBlocks-1]

Definition at line 693 of file AliMUONRawStreamTrackerHP.h.

AliBusPatch* AliMUONRawStreamTrackerHP::AliDecoderEventHandler::fEndOfBusPatches
private

! Marks the last bus patch.

Definition at line 695 of file AliMUONRawStreamTrackerHP.h.

Referenced by EndOfBusPatch(), and OnEndOfBuffer().

UInt_t AliMUONRawStreamTrackerHP::AliDecoderEventHandler::fGlitchErrors
private

! Number of glitch errors found in DDL.

Definition at line 703 of file AliMUONRawStreamTrackerHP.h.

Referenced by GlitchErrorCount().

UInt_t AliMUONRawStreamTrackerHP::AliDecoderEventHandler::fMaxBlocks
private

! max number of blocks

Definition at line 706 of file AliMUONRawStreamTrackerHP.h.

Referenced by OnNewBlock().

UInt_t AliMUONRawStreamTrackerHP::AliDecoderEventHandler::fMaxBusPatches
private

! max number of buspatches per dsp

Definition at line 708 of file AliMUONRawStreamTrackerHP.h.

UInt_t AliMUONRawStreamTrackerHP::AliDecoderEventHandler::fMaxChannels
private

! Maximum number of elements that can be stored in fParityOk.

Definition at line 696 of file AliMUONRawStreamTrackerHP.h.

Referenced by OnData().

UInt_t AliMUONRawStreamTrackerHP::AliDecoderEventHandler::fMaxDsps
private

! max number of dsps per block

Definition at line 707 of file AliMUONRawStreamTrackerHP.h.

UInt_t AliMUONRawStreamTrackerHP::AliDecoderEventHandler::fPaddingErrors
private

! Number of padding errors found in DDL.

Definition at line 704 of file AliMUONRawStreamTrackerHP.h.

Referenced by PaddingErrorCount().

UInt_t AliMUONRawStreamTrackerHP::AliDecoderEventHandler::fParityErrors
private

! Number of parity errors found in DDL.

Definition at line 702 of file AliMUONRawStreamTrackerHP.h.

Referenced by ParityErrorCount().

Bool_t* AliMUONRawStreamTrackerHP::AliDecoderEventHandler::fParityOk
private

! Array of flags for indicating if the parity is good for a raw data word.

Definition at line 697 of file AliMUONRawStreamTrackerHP.h.

Referenced by OnData().

AliMUONRawStreamTrackerHP* AliMUONRawStreamTrackerHP::AliDecoderEventHandler::fRawStream
private

! Pointer to the parent raw stream object.

Definition at line 689 of file AliMUONRawStreamTrackerHP.h.

Referenced by SetRawStream().

UInt_t AliMUONRawStreamTrackerHP::AliDecoderEventHandler::fTokenLostErrors
private

! Number of token lost errors found in DDL.

Definition at line 705 of file AliMUONRawStreamTrackerHP.h.

Referenced by TokenLostCount().


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