ROOT logo
AliRoot » MUON » AliMUONRawStreamTrackerHP::AliBusPatch

class AliMUONRawStreamTrackerHP::AliBusPatch

 \ingroup raw
 \class AliMUONRawStreamTrackerHP
 \brief A high performance stream decoder for muon tracking DDL streams.

 This is the raw stream class which interfaces between the high performance
 core decoder and the AliRawReader class.
 To gain the most out of the decoder, the Next() method which returns batches
 of decoded digit / channel information should be used. That is:
 \code
   const AliBusPatch* Next();
 \endcode

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

 \author Artur Szostak <artursz@iafrica.com>

Function Members (Methods)

Data Members

private:
const AliMUONRawStreamTrackerHP::AliDspHeader*fDSP/< The DSP this bus patch belongs to.
const UInt_t*fData/< Pointer to the bus patch data.
const AliMUONBusPatchHeaderStruct*fHeader/< Pointer to bus patch in DDL payload.
const AliMUONRawStreamTrackerHP::AliBusPatch*fNext/< Next bus patch object in the DSP.
const Bool_t*fParityOk/< Array of flags indicating if the parity of the given data word in fData is good or not.

Class Charts

Inheritance Chart:
AliMUONRawStreamTrackerHP::AliBusPatch

Function documentation

void Print(Option_t* opt = "") const
 Print header to screen.
Bool_t Next(Int_t& busPatchId, UShort_t& manuId, UChar_t& manuChannel, UShort_t& adc)
 Advance one step in the iteration. Returns false if finished.
Int_t GetDataKey() const
 Return data key word for CRT header
{assert(fHeader != NULL); return fHeader->fDataKey;}
Int_t GetTotalLength() const
 Return total length of block structure (w/o padding word)
{assert(fHeader != NULL); return fHeader->fTotalLength;}
Int_t GetLength() const
 Return length of raw data
{assert(fHeader != NULL); return fHeader->fLength;}
const AliMUONBlockHeaderStruct* GetHeader() const
 Return the header's raw data.
{return fHeader;}
const AliDspHeader* GetDspHeader(UInt_t i)
 Return the i'th DSP in this block.
void SetNext(const AliMUONRawStreamTrackerHP::AliBusPatch* next)
 Sets the next block header.
{ fNext = next; }
AliBusPatch(const AliMUONRawStreamTrackerHP::AliDspHeader* dsp = NULL, const AliMUONBusPatchHeaderStruct* header = NULL, const UInt_t* data = NULL, const Bool_t* parityOk = NULL)
 Default constructor.
AliBusPatch(const AliMUONRawStreamTrackerHP::AliBusPatch& o)
 Implement shallow copying in the copy constructor.
~AliBusPatch()
 Default destructor.
{}
Int_t GetBusPatchId() const
 Return bus patch id
{assert(fHeader != NULL); return fHeader->fBusPatchId;}
const UInt_t* GetData() const
 Return raw digit data
{return fData;}
UInt_t GetDataCount() const
 Returns the number of raw data words within this bus patch.
{ return (UInt_t)GetLength(); }
Char_t GetParity(UInt_t n) const
 Returns the parity bit of the n'th raw data word.
UShort_t GetManuId(UInt_t n) const
 Returns the MANU ID of the n'th raw data word.
UChar_t GetChannelId(UInt_t n) const
 Returns the channel ID of the n'th raw data word.
UShort_t GetCharge(UInt_t n) const
 Returns the charge/signal of the n'th raw data word.
UInt_t GetData(UInt_t n) const
 Returns the n'th raw data word.
Bool_t IsParityOk(UInt_t n) const
 Returns kTRUE if the parity of the n'th raw data word is OK
 and kFALSE otherwise.
Bool_t GetData(UInt_t n, UShort_t& manuId, UChar_t& channelId, UShort_t& adc) const
 Unpacks and returns the fields of the n'th raw data word. kTRUE
 is returned if the data word's parity was OK and kFALSE otherwise.