ROOT logo
AliRoot » MUON » AliMUONRawStreamTrackerHP

class AliMUONRawStreamTrackerHP: public TObject

 \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)

public:
AliMUONRawStreamTrackerHP()
AliMUONRawStreamTrackerHP(AliRawReader* rawReader)
virtual~AliMUONRawStreamTrackerHP()
voidTObject::AbstractMethod(const char* method) const
virtual voidTObject::AppendPad(Option_t* option = "")
Bool_tAutoDetectTrailer() const
voidAutoDetectTrailer(Bool_t value)
virtual voidTObject::Browse(TBrowser* b)
Bool_tCheckForTrailer() const
voidCheckForTrailer(Bool_t value)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTObject::Clear(Option_t* = "")
virtual TObject*TObject::Clone(const char* newname = "") const
virtual Int_tTObject::Compare(const TObject* obj) const
virtual voidTObject::Copy(TObject& object) const
const AliMUONRawStreamTrackerHP::AliBlockHeader*CurrentBlockHeader() const
const AliMUONRawStreamTrackerHP::AliBusPatch*CurrentBusPatch() const
const AliMUONRawStreamTrackerHP::AliDspHeader*CurrentDspHeader() const
virtual voidTObject::Delete(Option_t* option = "")MENU
voidDisableMUONErrorLogger()
voidDisableRawReaderErrorLogger()
voidDisableWarnings()
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
virtual voidTObject::Dump() constMENU
virtual voidEnabbleErrorLogger()
voidEnableMUONErrorLogger()
voidEnableRawReaderErrorLogger()
voidEnableWarnings()
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
virtual voidFirst()
UInt_tGetBlockCount() const
const AliMUONRawStreamTrackerHP::AliBlockHeader*GetBlockHeader(UInt_t i) const
const AliMUONRawStreamTrackerHP::AliBusPatch*GetBusPatch(UInt_t block, UInt_t dsp, UInt_t i) const
UInt_tGetBusPatchCount(UInt_t block, UInt_t dsp) const
virtual Int_tGetDDL() const
virtual AliMUONDDLTracker*GetDDLTracker() const
virtual Option_t*TObject::GetDrawOption() const
UInt_tGetDspCount(UInt_t block) const
const AliMUONRawStreamTrackerHP::AliDspHeader*GetDspHeader(UInt_t block, UInt_t i) const
static Long_tTObject::GetDtorOnly()
const AliMUONRawStreamTrackerHP::AliBlockHeader*GetFirstBlockHeader() const
Int_tGetGlitchErrors() const
virtual const char*TObject::GetIconName() const
AliMUONRawStreamTrackerHP::EDetailLevelGetLoggingDetailLevel() const
virtual Int_tGetMaxBlock() const
virtual Int_tGetMaxBus() const
virtual Int_tGetMaxDsp() const
const AliMUONLogger*GetMUONErrorLogger() const
AliMUONLogger*GetMUONErrorLogger()
virtual const char*TObject::GetName() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
Int_tGetPaddingErrors() const
Int_tGetParityErrors() const
virtual AliRawReader*GetReader()
virtual const char*TObject::GetTitle() const
Int_tGetTokenLostErrors() const
virtual UInt_tTObject::GetUniqueID() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
Bool_tHasGlitchError() const
virtual ULong_tTObject::Hash() const
Bool_tHasPaddingError() const
Bool_tHasParityError() const
Bool_tHasTokenLostError() const
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual voidTObject::Inspect() constMENU
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tIsDone() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tIsErrorMessage() const
virtual Bool_tTObject::IsFolder() const
Bool_tIsMUONErrorLoggerEnabled() const
Bool_tTObject::IsOnHeap() const
Bool_tIsRawReaderErrorLoggerEnabled() const
virtual Bool_tTObject::IsSortable() const
Bool_tIsWarningsEnabled() const
Bool_tTObject::IsZombie() const
virtual voidTObject::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
const AliMUONRawStreamTrackerHP::AliBusPatch*Next()
virtual Bool_tNext(Int_t& busPatchId, UShort_t& manuId, UChar_t& manuChannel, UShort_t& adc)
virtual Bool_tNext(Int_t& busPatchId, UShort_t& manuId, UChar_t& manuChannel, UShort_t& adc, Bool_t skipParityErrors)
virtual Bool_tNextDDL()
virtual Bool_tTObject::Notify()
UInt_tNumberOfGlitchErrors() const
UInt_tNumberOfPaddingErrors() const
UInt_tNumberOfParityErrors() const
UInt_tNumberOfTokenLostErrors() const
voidTObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const
static voidTObject::operator delete(void* ptr)
static voidTObject::operator delete(void* ptr, void* vp)
static voidTObject::operator delete[](void* ptr)
static voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidTObject::Print(Option_t* option = "") const
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
voidTObject::ResetBit(UInt_t f)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(basic_ostream<char,char_traits<char> >& out, Option_t* option = "")
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
voidSetLoggingDetailLevel(AliMUONRawStreamTrackerHP::EDetailLevel level)
virtual voidSetMaxBlock(Int_t blk)
virtual voidSetMaxBus(Int_t bus)
virtual voidSetMaxDsp(Int_t dsp)
voidSetMUONErrorLogger(AliMUONLogger* logger)
static voidTObject::SetObjectStat(Bool_t stat)
voidSetReader(AliRawReader* reader)
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidShowMembers(TMemberInspector&)
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
Bool_tTryRecover() const
voidTryRecover(Bool_t value)
virtual voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
protected:
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
voidTObject::MakeZombie()

Data Members

public:
enum EDetailLevel { kLowErrorDetail
kMediumErrorDetail
kHighErrorDetail
};
enum TObject::EStatusBits { kCanDelete
kMustCleanup
kObjInCanvas
kIsReferenced
kHasUUID
kCannotPick
kNoContextMenu
kInvalidObject
};
enum TObject::[unnamed] { kIsOnHeap
kNotDeleted
kZombie
kBitMask
kSingleKey
kOverwrite
kWriteDelete
};
private:
UChar_t*fBuffer!< This is the buffer in which we store the DDL payload read from AliRawReader.
Int_tfBufferSize!< This is the buffer size in bytes of fBuffer.
Int_tfDDL!< The current DDL number being handled.
AliMUONDDLTracker*fDDLObject!< Temporary DDL object used by GetDDLTracker() for caching.
AliMUONTrackerDDLDecoder<AliMUONRawStreamTrackerHP::AliDecoderEventHandler>fDecoder!< The decoder for the DDL payload.
AliMUONRawStreamTrackerHP::EDetailLevelfDetailLevel!< The logging detail level used in the error messages generated in OnError.
Bool_tfDone!< Flag indicating if the iteration is done or not.
Bool_tfEnableMUONErrorLogger!< whether or not we log errors to AliMUONLogger
Bool_tfEnableRawReaderErrorLogger!< whether or not we log errors to the raw reader.
Bool_tfHadError!< Flag indicating if there was a decoding error or not.
AliMUONLogger*fLogger!< Logger object to store error messages.
AliRawReader*fRawReader!< Pointer to the raw reader
UInt_tfTotalNumberOfGlitchErrors!< number of glitch errors since First() was called
UInt_tfTotalNumberOfPaddingErrors!< number of padding errors since First() was called
UInt_tfTotalNumberOfParityErrors!< number of parity errors since First() was called
UInt_tfTotalNumberOfTokenLostErrors!< number of token lost errors since First() was called
Bool_tfWarnings!< Flag indicating if we should generate a warning for errors.
static const Int_tfgkMaxDDL!< max number of tracker DDLs
const AliMUONRawStreamTrackerHP::AliBusPatch*fkCurrentBusPatch!< The current bus patch being handled by Next().
const UInt_t*fkCurrentData!< The current data word to return by Next().
const UInt_t*fkEndOfData!< The last data word in the current bus patch.

Class Charts

Inheritance Chart:
TObject
AliMUONRawStreamTrackerHP

Function documentation

AliMUONRawStreamTrackerHP()
 Default constructor.

AliMUONRawStreamTrackerHP(AliRawReader* rawReader)
 Constructor with AliRawReader as argument.

~AliMUONRawStreamTrackerHP()
 Default destructor.

void First()
 Initialise or reset the iterator.
 The first DDL will be found and decoded.
Bool_t NextDDL()
 Reading the next tracker DDL and decode the payload with the
 high performance decoder.
 \return kTRUE if the next DDL was successfully read and kFALSE otherwise.
Bool_t IsDone() const
 Indicates whether the iteration is finished or not.
 \return kTRUE if we already read all the digits and kFALSE if not.
Bool_t Next(Int_t& busPatchId, UShort_t& manuId, UChar_t& manuChannel, UShort_t& adc, Bool_t skipParityErrors)
 Advance one step in the iteration. Returns false if finished.
 [out] \param busPatchId  This is filled with the bus patch ID of the digit.
 [out] \param manuId      This is filled with the MANU ID of the digit.
 [out] \param manuChannel This is filled with the MANU channel ID of the digit.
 [out] \param adc         This is filled with the ADC signal value of the digit.
 [in] \param skipParityErrors If this is kTRUE, we'll skip the buspatches that
                              have some parity errors
 \return kTRUE if we read another digit and kFALSE if we have read all the
    digits already, i.e. at the end of the iteration.
AliMUONDDLTracker* GetDDLTracker() const
 Construct and return a pointer to the DDL payload object.
 \return Pointer to internally constructed AliMUONDDLTracker 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 AliMUONDDLTracker
 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 GetBlockHeader,
 GetDspHeader and GetBusPatch methods for example.
 Refer to the MUONRawStreamTracker.C macro to see how to use the fast
 decoder interface optimally.
void SetMaxBlock(Int_t blk)
 Set maximum number of blocks per DDL allowed.
void SetMaxDsp(Int_t dsp)
 Set maximum number of Dsp per block allowed.
void SetMaxBus(Int_t bus)
 Set maximum number of Buspatch per Dsp allowed.
void Swap(UInt_t* buffer, Int_t size) const
 swap from little to big endian
AliMUONRawStreamTrackerHP()
 Default constructor.
AliRawReader* GetReader()
 Get object for reading the raw data
{ return fRawReader; }
void SetReader(AliRawReader* reader)
 Set the raw reader
{ fRawReader = reader; }
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.
const AliBusPatch* Next()
 Returns the next batch of decoded channel data.
Int_t GetMaxBlock() const
 Return maximum number of blocks per DDL allowed.
{ return (Int_t) fDecoder.MaxBlocks(); }
Int_t GetMaxDsp() const
 Return maximum number of Dsp per block allowed.
{ return (Int_t) fDecoder.MaxDSPs(); }
Int_t GetMaxBus() const
 Return maximum number of Buspatch per Dsp allowed.
{ return (Int_t) fDecoder.MaxBusPatches(); }
Int_t GetDDL() const
 Return number of the current DDL being processed in the range [0..19] or -1 if no DDL set.
{ return fDDL - 1; }
Bool_t IsErrorMessage() const
 check error/Warning presence
{ return fHadError; }
Int_t GetParityErrors() const
 Get number of parity errors in the DDL last decoded.
Int_t GetGlitchErrors() const
 Get number of glitch errors in the DDL last decoded.
Int_t GetPaddingErrors() const
 Get number of padding word errors in the DDL last decoded.
Int_t GetTokenLostErrors() const
 Get number of token lost errors in the DDL last decoded.
void DisableWarnings()
 Set warnings flag to disable warnings on data errors.
void EnableWarnings()
 Set warnings flag to enable warnings on data errors.
Bool_t IsWarningsEnabled() const
 Returns the flag indicating if we should generate a warning for errors.
{ return fWarnings; }
Bool_t TryRecover() const
 Returns the "try to recover from errors" flag.
{ return Bool_t(fDecoder.TryRecover()); }
void TryRecover(Bool_t value)
 Sets the "try to recover from errors" flag.
 i.e. should the decoder try to recover from errors found in the
 payload headers.
{ fDecoder.TryRecover(bool(value)); }
Bool_t AutoDetectTrailer() const
 Returns the auto-detect trailer words flag.
void AutoDetectTrailer(Bool_t value)
 Sets the auto-detect trailer words flag.
 When set to true the decoder will try to detect if the end of DDL
 keys are in the trailer words or not. These are generated by the
 detector but not the older versions of AliRoot simulations.
{ fDecoder.AutoDetectTrailer(bool(value)); }
Bool_t CheckForTrailer() const
 Returns the flag indicating if the data is expected to have the
 end of DDL keys in the trailer. This flag is ignored if AutoDetectTrailer()
 was set to true.
void CheckForTrailer(Bool_t value)
 Sets the flag indicating if the trailer words should contain the
 end of DDL key.
{ fDecoder.CheckForTrailer(bool(value)); }
UInt_t GetDspCount()
 Returns the number of DSPs within this block.
{ return fDspCount; }
const AliDspHeader* GetDspHeader(UInt_t i)
 Return the i'th DSP in this block.
const AliBlockHeader* GetBlockHeader()
 Return the parent block header.
{ return fBlock; }
UInt_t GetBusPatchCount()
 Returns the number of bus patches within this DSP.
{ return fBusPatchCount; }
const AliBusPatch* GetBusPatch(UInt_t i)
 Return the i'th bus patch in this DSP.
UInt_t GetBlockCount() const
 Return the number of blocks in the DDL payload.
const AliBlockHeader* GetFirstBlockHeader() const
 Return the first block header.
const AliBusPatch* CurrentBusPatch() const
 Returns the current bus patch being decoded or NULL if none found.
const AliDspHeader* CurrentDspHeader() const
 Returns the current DSP being decoded or NULL if none found.
const AliBlockHeader* CurrentBlockHeader() const
 Returns the current block header being decoded or NULL if none found.
void EnabbleErrorLogger()
 Enable error logging to the raw reader. \note Kept for backward compatibility.
void EnableMUONErrorLogger()
 Enable error info logging to AliMUONLogger.
void DisableMUONErrorLogger()
 Disable logging to AliMUONLogger.
void EnableRawReaderErrorLogger()
 Enable error info logging to raw reader.
void DisableRawReaderErrorLogger()
 Disable logging to the raw reader.
Bool_t IsMUONErrorLoggerEnabled() const
 Check if the AliMUONLogger is enabled for error logging.
Bool_t IsRawReaderErrorLoggerEnabled() const
 Check if the AliMUONLogger is enabled for error logging.
const AliMUONLogger* GetMUONErrorLogger() const
 Returns the logger object. (constant version)
{ return fLogger; }
AliMUONLogger* GetMUONErrorLogger()
 Returns the logger object.
{ return fLogger; }
void SetMUONErrorLogger(AliMUONLogger* logger)
 Sets the logger object to use. Ownership of the logger object remains with the caller.
{ fLogger = logger; }
EDetailLevel GetLoggingDetailLevel() const
 Returns the level of detail used in the error messages.
{ return fDetailLevel; }
void SetLoggingDetailLevel(AliMUONRawStreamTrackerHP::EDetailLevel level)
 Sets the level of detail used in the error messages.
{ fDetailLevel = level; }
UInt_t NumberOfGlitchErrors() const
 Number of glitch errors since First() was called
UInt_t NumberOfPaddingErrors() const
 Number of padding errors since First() was called
UInt_t NumberOfParityErrors() const
 Number of parity errors since First() was called
UInt_t NumberOfTokenLostErrors() const
 Number of token lost errors since First() was called
Bool_t HasGlitchError() const
 Whether we got glitch errors or not
{ return NumberOfGlitchErrors() > 0; }
Bool_t HasPaddingError() const
 Whether we got padding errors or not
{ return NumberOfPaddingErrors() > 0; }
Bool_t HasParityError() const
 Whether we got parity errors or not
{ return NumberOfParityErrors() > 0; }
Bool_t HasTokenLostError() const
 Whether we got token lost errors or not
{ return NumberOfTokenLostErrors() > 0; }
Int_t GetMaxDDL() const
 Return max number of tracker DDLs
{ return fgkMaxDDL; }