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

Higher performance decoder stream class for reading MUON raw trigger data. More...

#include <AliMUONRawStreamTriggerHP.h>

Inheritance diagram for AliMUONRawStreamTriggerHP:

Classes

class  AliDecoderEventHandler
 
class  AliHeader
 Light weight interface class to the DARC and global header data. More...
 
class  AliLocalStruct
 Light weight interface class to the local trigger card data. More...
 
class  AliRegionalHeader
 Light weight interface class to the regional card header data. More...
 

Public Member Functions

 AliMUONRawStreamTriggerHP ()
 
 AliMUONRawStreamTriggerHP (AliRawReader *rawReader)
 
virtual ~AliMUONRawStreamTriggerHP ()
 
virtual void First ()
 Initialize iterator. More...
 
virtual Bool_t NextDDL ()
 DDL iterator. More...
 
virtual Bool_t IsDone () const
 Whether the iteration is finished or not. More...
 
virtual void AddErrorMessage ()
 
virtual Bool_t Next (UChar_t &id, UChar_t &dec, Bool_t &trigY, UChar_t &yPos, UChar_t &sXDev, UChar_t &xDev, UChar_t &xPos, Bool_t &triggerY, Bool_t &triggerX, TArrayS &xPattern, TArrayS &yPattern)
 Advance one step in the iteration. Returns false if finished. More...
 
virtual AliMUONDDLTriggerGetDDLTrigger () const
 Construct and return a pointer to the DDL payload object. More...
 
const AliLocalStructNext ()
 Returns the next local trigger structure. More...
 
virtual Int_t GetMaxDDL () const
 Return maximum number of DDLs. More...
 
virtual Int_t GetMaxReg () const
 Return maximum number of regional cards in the DDL. More...
 
virtual void SetMaxReg (Int_t reg)
 Set the maximum number of regional cards in the DDL. More...
 
virtual Int_t GetMaxLoc () const
 Return maximum number of local cards in the DDL. More...
 
virtual void SetMaxLoc (Int_t loc)
 Sets the maximum number of local cards in the DDL. More...
 
virtual Int_t GetDDL () const
 Return number of the current DDL being handled in the range [0..1] and -1 if no DDL set. More...
 
virtual Bool_t IsErrorMessage () const
 check error/Warning presence More...
 
virtual void DisableWarnings ()
 Set warnings flag to disable warnings on data errors. More...
 
virtual void EnableWarnings ()
 Set warnings flag to enable warnings on data errors. More...
 
UInt_t GetDarcEoWErrors () const
 Get number of end of DARC word errors in the DDL last decoded. More...
 
UInt_t GetGlobalEoWErrors () const
 Get number of end of Global word errors in the DDL last decoded. More...
 
UInt_t GetRegEoWErrors () const
 Get number of end of regional word errors in the DDL last decoded. More...
 
UInt_t GetLocalEoWErrors () const
 Get number of end of local word errors in the DDL last decoded. More...
 
UInt_t NumberOfDarcEoWErrors () const
 Number of end of DARC word errors since First() was called. More...
 
UInt_t NumberOfGlobalEoWErrors () const
 Number of end of global word errors since First() was called. More...
 
UInt_t NumberOfRegEoWErrors () const
 Number of end of regional word errors since First() was called. More...
 
UInt_t NumberOfLocalEoWErrors () const
 Number of end of local word errors since First() was called. More...
 
Bool_t HasDarcEoWError () const
 Whether we got any end of DARC word errors or not since calling First(). More...
 
Bool_t HasGlobalEoWError () const
 Whether we got any end of global word errors or not since calling First(). More...
 
Bool_t HasRegEoWError () const
 Whether we got any end of regional word errors or not since calling First(). More...
 
Bool_t HasLocalEoWError () const
 Whether we got any end of local word errors or not since calling First(). More...
 
Bool_t TryRecover () const
 Returns the "try to recover from errors" flag. More...
 
void TryRecover (Bool_t value)
 
const AliHeaderGetHeaders () const
 Returns the DARC and global headers plus scalars if they exist. More...
 
UInt_t GetRegionalHeaderCount () const
 Return the number of regional structures in the DDL payload. More...
 
const AliRegionalHeaderGetFirstRegionalHeader () const
 Return the first regional structure header. More...
 
const AliRegionalHeaderGetRegionalHeader (UInt_t i) const
 Return the i'th regional header or NULL if not found. More...
 
UInt_t GetLocalStructCount (UInt_t reg) const
 
const AliLocalStructGetLocalStruct (UInt_t reg, UInt_t i) const
 
const AliLocalStructCurrentLocalStruct () const
 Returns the current local struct being decoded or NULL if none found. More...
 
const AliRegionalHeaderCurrentRegionalHeader () const
 
- Public Member Functions inherited from AliMUONVRawStreamTrigger
 AliMUONVRawStreamTrigger ()
 
 AliMUONVRawStreamTrigger (AliRawReader *rawReader)
 
virtual ~AliMUONVRawStreamTrigger ()
 
- Public Member Functions inherited from AliMUONRawStream
 AliMUONRawStream ()
 
 AliMUONRawStream (AliRawReader *rawReader)
 
virtual ~AliMUONRawStream ()
 
virtual void SetReader (AliRawReader *rawReader)
 Set object for reading the raw data. More...
 
virtual AliRawReader * GetReader ()
 Get object for reading the raw data. More...
 
virtual void EnabbleErrorLogger ()
 Enable error info logger. More...
 
virtual Bool_t IsErrorLogger () const
 Check if error info logger enable. More...
 
virtual void Swap (UInt_t *buffer, Int_t size) const
 swap method for Power PC More...
 

Private Member Functions

 AliMUONRawStreamTriggerHP (const AliMUONRawStreamTriggerHP &stream)
 Not implemented. More...
 
AliMUONRawStreamTriggerHPoperator= (const AliMUONRawStreamTriggerHP &stream)
 Not implemented. More...
 

Private Attributes

AliMUONTriggerDDLDecoder
< AliDecoderEventHandler
fDecoder
 ! The decoder for the DDL payload. More...
 
Int_t fDDL
 ! The current DDL number being handled. More...
 
Int_t fBufferSize
 ! This is the buffer size in bytes of fBuffer. More...
 
UChar_t * fBuffer
 ! This is the buffer in which we store the DDL payload read from AliRawReader. More...
 
const AliLocalStructfkCurrentLocalStruct
 ! The current local trigger structure being handled by Next(). More...
 
Bool_t fHadError
 ! Flag indicating if there was a decoding error or not. More...
 
Bool_t fDone
 ! Flag indicating if the iteration is done or not. More...
 
AliMUONDDLTriggerfDDLObject
 ! Temporary DDL object used by GetDDLTrigger() for caching. More...
 
UInt_t fTotalNumberOfDarcEoWErrors
 ! The total number of end of DARC word errors since the last call to First(). More...
 
UInt_t fTotalNumberOfGlobalEoWErrors
 ! The total number of end of global word errors since the last call to First(). More...
 
UInt_t fTotalNumberOfRegEoWErrors
 ! The total number of end of regional word errors since the last call to First(). More...
 
UInt_t fTotalNumberOfLocalEoWErrors
 ! The total number of end of local word errors since the last call to First(). More...
 

Static Private Attributes

static const Int_t fgkMaxDDL = 2
 ! Maximum number of DDLs More...
 

Additional Inherited Members

- Public Types inherited from AliMUONVRawStreamTrigger
enum  rawStreamTriggerError { kDarcEoWErr = 6, kGlobalEoWErr = 7, kRegEoWErr = 8, kLocalEoWErr = 9 }
 error numbers More...
 

Detailed Description

Higher performance decoder stream class for reading MUON raw trigger data.

Implementation of a streamer interface to the high performance trigger decoder. This is the raw stream class which interfaces between the high performance core decoder for MUON trigger chambers and the AliRawReader class. To gain the most out of the decoder, the Next() method should be used, for example:

AliMUONRawStreamTriggerHP* rawStream; // assume initialised
while ((localStruct = rawStream->Next()) != NULL)
{
// Do something with localStruct here.
}

This decoder tries to implement as similar an interface as possible to AliMUONRawStreamTrigger where possible. However certain constructs which would slow us down too much are avoided.

Author
Artur Szostak artur.nosp@m.sz@i.nosp@m.afric.nosp@m.a.co.nosp@m.m

Definition at line 25 of file AliMUONRawStreamTriggerHP.h.

Constructor & Destructor Documentation

AliMUONRawStreamTriggerHP::AliMUONRawStreamTriggerHP ( )

Default constructor.

Definition at line 71 of file AliMUONRawStreamTriggerHP.cxx.

AliMUONRawStreamTriggerHP::AliMUONRawStreamTriggerHP ( AliRawReader *  rawReader)

Constructor with AliRawReader as argument.

Definition at line 101 of file AliMUONRawStreamTriggerHP.cxx.

AliMUONRawStreamTriggerHP::~AliMUONRawStreamTriggerHP ( )
virtual

Default destructor which cleans up the memory allocated.

Definition at line 131 of file AliMUONRawStreamTriggerHP.cxx.

AliMUONRawStreamTriggerHP::AliMUONRawStreamTriggerHP ( const AliMUONRawStreamTriggerHP stream)
private

Not implemented.

Member Function Documentation

virtual void AliMUONRawStreamTriggerHP::AddErrorMessage ( )
inlinevirtual

Nothing is actually done in the AddErrorMessage method because we log the error messages as we find them in AliDecoderEventHandler::OnError().

Implements AliMUONRawStream.

Definition at line 45 of file AliMUONRawStreamTriggerHP.h.

const AliLocalStruct* AliMUONRawStreamTriggerHP::CurrentLocalStruct ( ) const
inline

Returns the current local struct being decoded or NULL if none found.

Definition at line 603 of file AliMUONRawStreamTriggerHP.h.

Referenced by CurrentRegionalHeader().

const AliRegionalHeader* AliMUONRawStreamTriggerHP::CurrentRegionalHeader ( ) const
inline

Returns the current regional structure being decoded or NULL if none found.

Definition at line 611 of file AliMUONRawStreamTriggerHP.h.

virtual void AliMUONRawStreamTriggerHP::DisableWarnings ( )
inlinevirtual

Set warnings flag to disable warnings on data errors.

Implements AliMUONVRawStreamTrigger.

Definition at line 81 of file AliMUONRawStreamTriggerHP.h.

virtual void AliMUONRawStreamTriggerHP::EnableWarnings ( )
inlinevirtual

Set warnings flag to enable warnings on data errors.

Definition at line 83 of file AliMUONRawStreamTriggerHP.h.

void AliMUONRawStreamTriggerHP::First ( )
virtual

Initialize iterator.

Initialise or reset the iterator. The first DDL will be found and decoded.

Reimplemented from AliMUONRawStream.

Definition at line 148 of file AliMUONRawStreamTriggerHP.cxx.

Referenced by TimeUsingNewDecoder(), and TimeUsingNewDecoderOldInterface().

UInt_t AliMUONRawStreamTriggerHP::GetDarcEoWErrors ( ) const
inline

Get number of end of DARC word errors in the DDL last decoded.

Definition at line 86 of file AliMUONRawStreamTriggerHP.h.

Referenced by AliMUONTriggerQADataMakerRec::MakeRaws().

virtual Int_t AliMUONRawStreamTriggerHP::GetDDL ( ) const
inlinevirtual

Return number of the current DDL being handled in the range [0..1] and -1 if no DDL set.

Implements AliMUONVRawStreamTrigger.

Definition at line 75 of file AliMUONRawStreamTriggerHP.h.

Referenced by AliMUONTriggerQADataMakerRec::MakeRaws(), MUONRawStreamTriggerHPExpert(), MUONRawStreamTriggerHPExpert2(), MUONRawStreamTriggerHPExpert3(), and AliMUONDigitMaker::ReadTriggerDDL().

AliMUONDDLTrigger * AliMUONRawStreamTriggerHP::GetDDLTrigger ( ) const
virtual

Construct and return a pointer to the DDL payload object.

Construct and return a pointer to the DDL payload object.

Returns
Pointer to internally constructed AliMUONDDLTrigger object. The object is owned by this class and should not be deleted by the caller.
Note
This method should not be used just to gain access to the DDL payload, unless there is a good reason to have the AliMUONDDLTrigger object. For example, if you want to modify the data and then save it to another DDL stream. Otherwise it can be an order of magnitude faster to access the DDL headers and data with the GetHeaders, GetRegionalHeader and GetLocalStruct methods for example. Refer to the MUONRawStreamTrigger.C macro to see how to use the fast decoder interface optimally.

Implements AliMUONVRawStreamTrigger.

Definition at line 321 of file AliMUONRawStreamTriggerHP.cxx.

const AliRegionalHeader* AliMUONRawStreamTriggerHP::GetFirstRegionalHeader ( ) const
inline

Return the first regional structure header.

Definition at line 575 of file AliMUONRawStreamTriggerHP.h.

Referenced by MUONRawStreamTriggerHPExpert3().

UInt_t AliMUONRawStreamTriggerHP::GetGlobalEoWErrors ( ) const
inline

Get number of end of Global word errors in the DDL last decoded.

Definition at line 89 of file AliMUONRawStreamTriggerHP.h.

Referenced by AliMUONTriggerQADataMakerRec::MakeRaws().

const AliHeader* AliMUONRawStreamTriggerHP::GetHeaders ( ) const
inline
UInt_t AliMUONRawStreamTriggerHP::GetLocalEoWErrors ( ) const
inline

Get number of end of local word errors in the DDL last decoded.

Definition at line 95 of file AliMUONRawStreamTriggerHP.h.

Referenced by AliMUONTriggerQADataMakerRec::MakeRaws().

const AliLocalStruct* AliMUONRawStreamTriggerHP::GetLocalStruct ( UInt_t  reg,
UInt_t  i 
) const
inline

Returns the i'th local trigger structure for the given regional structure number or NULL if not found.

Definition at line 596 of file AliMUONRawStreamTriggerHP.h.

Referenced by MUONRawStreamTriggerHPExpert().

UInt_t AliMUONRawStreamTriggerHP::GetLocalStructCount ( UInt_t  reg) const
inline

Returns the number of local trigger structures for the given regional structure number.

Definition at line 588 of file AliMUONRawStreamTriggerHP.h.

Referenced by MUONRawStreamTriggerHPExpert().

virtual Int_t AliMUONRawStreamTriggerHP::GetMaxDDL ( ) const
inlinevirtual

Return maximum number of DDLs.

Implements AliMUONVRawStreamTrigger.

Definition at line 60 of file AliMUONRawStreamTriggerHP.h.

Referenced by NextDDL().

virtual Int_t AliMUONRawStreamTriggerHP::GetMaxLoc ( ) const
inlinevirtual

Return maximum number of local cards in the DDL.

Implements AliMUONVRawStreamTrigger.

Definition at line 69 of file AliMUONRawStreamTriggerHP.h.

virtual Int_t AliMUONRawStreamTriggerHP::GetMaxReg ( ) const
inlinevirtual

Return maximum number of regional cards in the DDL.

Implements AliMUONVRawStreamTrigger.

Definition at line 63 of file AliMUONRawStreamTriggerHP.h.

UInt_t AliMUONRawStreamTriggerHP::GetRegEoWErrors ( ) const
inline

Get number of end of regional word errors in the DDL last decoded.

Definition at line 92 of file AliMUONRawStreamTriggerHP.h.

Referenced by AliMUONTriggerQADataMakerRec::MakeRaws().

const AliRegionalHeader* AliMUONRawStreamTriggerHP::GetRegionalHeader ( UInt_t  i) const
inline
UInt_t AliMUONRawStreamTriggerHP::GetRegionalHeaderCount ( ) const
inline
Bool_t AliMUONRawStreamTriggerHP::HasDarcEoWError ( ) const
inline

Whether we got any end of DARC word errors or not since calling First().

Definition at line 110 of file AliMUONRawStreamTriggerHP.h.

Bool_t AliMUONRawStreamTriggerHP::HasGlobalEoWError ( ) const
inline

Whether we got any end of global word errors or not since calling First().

Definition at line 113 of file AliMUONRawStreamTriggerHP.h.

Bool_t AliMUONRawStreamTriggerHP::HasLocalEoWError ( ) const
inline

Whether we got any end of local word errors or not since calling First().

Definition at line 119 of file AliMUONRawStreamTriggerHP.h.

Bool_t AliMUONRawStreamTriggerHP::HasRegEoWError ( ) const
inline

Whether we got any end of regional word errors or not since calling First().

Definition at line 116 of file AliMUONRawStreamTriggerHP.h.

Bool_t AliMUONRawStreamTriggerHP::IsDone ( ) const
virtual

Whether the iteration is finished or not.

Indicates whether the iteration is finished or not.

Returns
kTRUE if we already read all the digits and kFALSE if not.

Reimplemented from AliMUONRawStream.

Definition at line 280 of file AliMUONRawStreamTriggerHP.cxx.

virtual Bool_t AliMUONRawStreamTriggerHP::IsErrorMessage ( ) const
inlinevirtual

check error/Warning presence

Definition at line 78 of file AliMUONRawStreamTriggerHP.h.

Bool_t AliMUONRawStreamTriggerHP::Next ( UChar_t &  id,
UChar_t &  dec,
Bool_t &  trigY,
UChar_t &  yPos,
UChar_t &  sXDev,
UChar_t &  xDev,
UChar_t &  xPos,
Bool_t &  triggerY,
Bool_t &  triggerX,
TArrayS &  xPattern,
TArrayS &  yPattern 
)
virtual

Advance one step in the iteration. Returns false if finished.

Advance one step in the iteration. Returns kFALSE if finished. If kTRUE is returned then the output parameters are filled with the values found in the next local trigger circuit structure.

Implements AliMUONVRawStreamTrigger.

Definition at line 289 of file AliMUONRawStreamTriggerHP.cxx.

Referenced by TimeUsingNewDecoder(), and TimeUsingNewDecoderOldInterface().

const AliMUONRawStreamTriggerHP::AliLocalStruct * AliMUONRawStreamTriggerHP::Next ( )
inline

Returns the next local trigger structure.

Iterates through all the local trigger structures for the event. When no more local triggers are found then NULL is returned.

Definition at line 770 of file AliMUONRawStreamTriggerHP.h.

Referenced by Next().

Bool_t AliMUONRawStreamTriggerHP::NextDDL ( )
virtual

DDL iterator.

Read in the next trigger DDL and decode the payload with the high performance decoder.

Returns
kTRUE if the next DDL was successfully read and kFALSE otherwise.

Implements AliMUONRawStream.

Definition at line 165 of file AliMUONRawStreamTriggerHP.cxx.

Referenced by First(), AliMUONTriggerQADataMakerRec::MakeRaws(), MUONRawStreamTriggerHPExpert(), MUONRawStreamTriggerHPExpert2(), MUONRawStreamTriggerHPExpert3(), Next(), and AliMUONDigitMaker::ReadTriggerDDL().

UInt_t AliMUONRawStreamTriggerHP::NumberOfDarcEoWErrors ( ) const
inline

Number of end of DARC word errors since First() was called.

Definition at line 98 of file AliMUONRawStreamTriggerHP.h.

Referenced by HasDarcEoWError().

UInt_t AliMUONRawStreamTriggerHP::NumberOfGlobalEoWErrors ( ) const
inline

Number of end of global word errors since First() was called.

Definition at line 101 of file AliMUONRawStreamTriggerHP.h.

Referenced by HasGlobalEoWError().

UInt_t AliMUONRawStreamTriggerHP::NumberOfLocalEoWErrors ( ) const
inline

Number of end of local word errors since First() was called.

Definition at line 107 of file AliMUONRawStreamTriggerHP.h.

Referenced by HasLocalEoWError().

UInt_t AliMUONRawStreamTriggerHP::NumberOfRegEoWErrors ( ) const
inline

Number of end of regional word errors since First() was called.

Definition at line 104 of file AliMUONRawStreamTriggerHP.h.

Referenced by HasRegEoWError().

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

Not implemented.

void AliMUONRawStreamTriggerHP::SetMaxLoc ( Int_t  loc)
virtual

Sets the maximum number of local cards in the DDL.

Sets the maximum number of local cards in the DDL.

Implements AliMUONVRawStreamTrigger.

Definition at line 410 of file AliMUONRawStreamTriggerHP.cxx.

void AliMUONRawStreamTriggerHP::SetMaxReg ( Int_t  reg)
virtual

Set the maximum number of regional cards in the DDL.

Set the maximum allowed number of regional cards in the DDL.

Definition at line 397 of file AliMUONRawStreamTriggerHP.cxx.

Bool_t AliMUONRawStreamTriggerHP::TryRecover ( ) const
inline

Returns the "try to recover from errors" flag.

Definition at line 122 of file AliMUONRawStreamTriggerHP.h.

void AliMUONRawStreamTriggerHP::TryRecover ( Bool_t  value)
inline

Sets the "try to recover from errors" flag. i.e. should the decoder try to recover from errors found in the payload headers.

Definition at line 127 of file AliMUONRawStreamTriggerHP.h.

Member Data Documentation

UChar_t* AliMUONRawStreamTriggerHP::fBuffer
private

! This is the buffer in which we store the DDL payload read from AliRawReader.

Definition at line 753 of file AliMUONRawStreamTriggerHP.h.

Referenced by NextDDL(), and ~AliMUONRawStreamTriggerHP().

Int_t AliMUONRawStreamTriggerHP::fBufferSize
private

! This is the buffer size in bytes of fBuffer.

Definition at line 752 of file AliMUONRawStreamTriggerHP.h.

Referenced by NextDDL().

Int_t AliMUONRawStreamTriggerHP::fDDL
private

! The current DDL number being handled.

Definition at line 751 of file AliMUONRawStreamTriggerHP.h.

Referenced by First(), GetDDL(), and NextDDL().

AliMUONDDLTrigger* AliMUONRawStreamTriggerHP::fDDLObject
mutableprivate

! Temporary DDL object used by GetDDLTrigger() for caching.

Definition at line 757 of file AliMUONRawStreamTriggerHP.h.

Referenced by GetDDLTrigger(), NextDDL(), and ~AliMUONRawStreamTriggerHP().

Bool_t AliMUONRawStreamTriggerHP::fDone
private

! Flag indicating if the iteration is done or not.

Definition at line 756 of file AliMUONRawStreamTriggerHP.h.

Referenced by First(), IsDone(), and NextDDL().

const Int_t AliMUONRawStreamTriggerHP::fgkMaxDDL = 2
staticprivate

! Maximum number of DDLs

Definition at line 763 of file AliMUONRawStreamTriggerHP.h.

Referenced by GetMaxDDL().

Bool_t AliMUONRawStreamTriggerHP::fHadError
private

! Flag indicating if there was a decoding error or not.

Definition at line 755 of file AliMUONRawStreamTriggerHP.h.

Referenced by IsErrorMessage(), and NextDDL().

const AliLocalStruct* AliMUONRawStreamTriggerHP::fkCurrentLocalStruct
private

! The current local trigger structure being handled by Next().

Definition at line 754 of file AliMUONRawStreamTriggerHP.h.

Referenced by CurrentLocalStruct(), Next(), and NextDDL().

UInt_t AliMUONRawStreamTriggerHP::fTotalNumberOfDarcEoWErrors
private

! The total number of end of DARC word errors since the last call to First().

Definition at line 758 of file AliMUONRawStreamTriggerHP.h.

Referenced by First(), NextDDL(), and NumberOfDarcEoWErrors().

UInt_t AliMUONRawStreamTriggerHP::fTotalNumberOfGlobalEoWErrors
private

! The total number of end of global word errors since the last call to First().

Definition at line 759 of file AliMUONRawStreamTriggerHP.h.

Referenced by First(), NextDDL(), and NumberOfGlobalEoWErrors().

UInt_t AliMUONRawStreamTriggerHP::fTotalNumberOfLocalEoWErrors
private

! The total number of end of local word errors since the last call to First().

Definition at line 761 of file AliMUONRawStreamTriggerHP.h.

Referenced by First(), NextDDL(), and NumberOfLocalEoWErrors().

UInt_t AliMUONRawStreamTriggerHP::fTotalNumberOfRegEoWErrors
private

! The total number of end of regional word errors since the last call to First().

Definition at line 760 of file AliMUONRawStreamTriggerHP.h.

Referenced by First(), NextDDL(), and NumberOfRegEoWErrors().


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