ROOT logo
AliRoot » RAW » AliAltroRawStream

class AliAltroRawStream: public TObject


 This class provides access to Altro digits in raw data.

 It loops over all Altro digits in the raw data given by the AliRawReader.
 The Next method goes to the next digit. If there are no digits left
 it returns kFALSE.
 Several getters provide information about the current digit.


Function Members (Methods)

public:
AliAltroRawStream(AliRawReader* rawReader)
AliAltroRawStream(const AliAltroRawStream& stream)
virtual~AliAltroRawStream()
voidTObject::AbstractMethod(const char* method) const
voidAddMappingErrorLog(const char* message = NULL)
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
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
virtual voidTObject::Delete(Option_t* option = "")MENU
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 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
UShort_tGetActiveFECsA() const
UShort_tGetActiveFECsB() const
Int_tGetAltro() const
UInt_tGetAltroCFG1() const
UInt_tGetAltroCFG2() const
UChar_tGetBaselineCorr() const
Int_tGetBranch() const
Int_tGetChannel() const
Int_tGetChannelPayloadSize() const
Int_tGetDDLNumber() const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
UShort_tGetERRREG2() const
Int_tGetFEC() const
UInt_tGetFECERRA() const
UInt_tGetFECERRB() const
UChar_tGetGlitchFilter() const
Int_tGetHWAddress() const
virtual const char*TObject::GetIconName() const
Double_tGetL1Phase() const
Bool_tGetNAltroBuffers() const
virtual const char*TObject::GetName() const
UShort_tGetNChAddrMismatch() const
UShort_tGetNChLengthMismatch() const
UChar_tGetNNonZSPostsamples() const
UChar_tGetNNonZSPresamples() const
UChar_tGetNPostsamples() const
UChar_tGetNPresamples() const
UChar_tGetNPretriggerSamples() const
UShort_tGetNSamplesPerCh() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
Bool_tGetPolarity() const
Int_tGetPrevDDLNumber() const
Int_tGetPrevHWAddress() const
Int_tGetPrevRCUId() const
Int_tGetPrevTime() const
Int_tGetRCUId() const
Int_tGetRCUPayloadSizeInSOD() const
Bool_tGetRCUTrailerData(UChar_t*& data) const
Int_tGetRCUTrailerSize() const
Bool_tGetSecondBaselineCorr() const
Int_tGetSignal() const
Bool_tGetSparseRO() const
Int_tGetTime() const
Int_tGetTimeLength() const
virtual const char*TObject::GetTitle() const
Double_tGetTSample() const
virtual UInt_tTObject::GetUniqueID() const
Bool_tGetZeroSupp() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTObject::Hash() 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_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
Bool_tIsNewDDLNumber() const
Bool_tIsNewHWAddress() const
Bool_tIsNewRCUId() const
Bool_tIsNewTime() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tTObject::IsSortable() const
Bool_tTObject::IsZombie() const
virtual voidTObject::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
virtual Bool_tNext()
virtual Bool_tNextBunch(UShort_t* bunchData, Int_t& bunchLength, Int_t& startTimeBin)
virtual Bool_tNextChannel()
virtual Bool_tNextDDL(UChar_t* data = NULL)
virtual Bool_tTObject::Notify()
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)
AliAltroRawStream&operator=(const AliAltroRawStream& stream)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidTObject::Print(Option_t* option = "") const
voidPrintDebug() const
voidPrintRCUTrailer() const
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
virtual voidReset()
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 = "")
voidSelectRawData(Int_t detId)
voidSelectRawData(const char* detName)
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)
static voidTObject::SetObjectStat(Bool_t stat)
voidSetShortDataHeader(Bool_t flag)
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
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 EAltroRawStreamError { kRCUTrailerSizeErr
kAltroTrailerErr
kBunchLengthReadErr
kTimeBinReadErr
kAmplitudeReadErr
k32bitWordReadErr
kBadAltroMapping
kRCUTrailerErr
};
enum TObject::EStatusBits { kCanDelete
kMustCleanup
kObjInCanvas
kIsReferenced
kHasUUID
kCannotPick
kNoContextMenu
kInvalidObject
};
enum TObject::[unnamed] { kIsOnHeap
kNotDeleted
kZombie
kBitMask
kSingleKey
kOverwrite
kWriteDelete
};
protected:
Bool_tfIsShortDataHeaderflag used to select between normal and short CDH format
private:
UShort_tfActiveFECsAbit pattern of active FECs in branch A
UShort_tfActiveFECsBbit pattern of active FECs in branch B
UInt_tfAltroCFG1ALTROCFG1 register
UInt_tfAltroCFG2ALTROCFG2 and ALTROIF registers
Int_tfBunchLengthremaining number of signal bins in the current bunch
Int_tfChannelPayloadSize
Int_tfCountcounter of words to be read for current trailer
Int_tfDDLNumberindex of current DDL number
UChar_t*fDataraw data
UShort_tfERRREG2contains errors related to ALTROBUS transactions or trailer of ALTRO channel block
UShort_tfERRREG3contains number of altro channels skipped due to an address mismatch
UShort_tfERRREG4contains number of altro channels skipped due to a block length mismatch
UInt_tfFECERRAcontains errors related to ALTROBUS transactions
UInt_tfFECERRBcontains errors related to ALTROBUS transactions
Short_tfHWAddresscurrent hardware address
Int_tfPositioncurrent (10 bit) position in fData
Int_tfPrevDDLNumberindex of previous DDL number
Short_tfPrevHWAddressprevious hardware address
Int_tfPrevRCUIdprevious RCU identifier
Int_tfPrevTimeindex of previous time bin
Int_tfRCUIdcurrent RCU identifier
UChar_t*fRCUTrailerDatapointer to RCU trailer data
Int_tfRCUTrailerSizesize of RCU trailer data in bytes
AliRawReader*fRawReaderobject for reading the raw data
Int_tfSignalsignal in ADC counts
Int_tfTimeindex of current time bin
Int_tfTimeBunchtotal length of the current time bunch

Class Charts

Inheritance Chart:
TObject
AliAltroRawStream
AliCaloRawStream
AliFMDRawStream

Function documentation

AliAltroRawStream(AliRawReader* rawReader)
 create an object to read Altro raw digits
AliAltroRawStream(const AliAltroRawStream& stream)
~AliAltroRawStream()
 clean up
void Reset()
 reset altro raw stream params
Bool_t Next()
 read the next raw digit
 returns kFALSE if there is no digit left
Bool_t NextDDL(UChar_t* data = NULL)
Bool_t NextChannel()
Bool_t NextBunch(UShort_t* bunchData, Int_t& bunchLength, Int_t& startTimeBin)
void SelectRawData(Int_t detId)
 Select the raw data for specific
 detector id
void SelectRawData(const char* detName)
 Select the raw data for specific
 detector name
UShort_t GetNextWord()
 Read the next 10 bit word in backward direction
 The input stream access is given by fData and fPosition
Bool_t ReadTrailer()
Read a trailer of 40 bits in the backward reading mode
First reading filling words
void ReadBunch()
 Read altro payload in
 backward direction
void ReadAmplitude()
 Read next time bin amplitude
Int_t GetPosition()
 Sets the position in the
 input stream
 Read the RCU trailer
 This includes the trailer size,
 RCU identifier and raw data payload.
 The RCU trailer format is described
 in details in the RCU manual.
UInt_t Get32bitWord(Int_t& index)
 This method returns the 32 bit word at a given
 position inside the raw data payload.
 The 'index' points to the beginning of the next word.
 The method is supposed to be endian (platform)
 independent.
Int_t ReadRCUTrailer(Int_t& index, Int_t trailerSize)
 The method decodes the RCU trailer data
 according to the RCU fw ver.2 specs
Double_t GetTSample() const
 Returns the sampling time
 in seconds. In case the rcu trailer
 was note read, return an invalid number (0)
Double_t GetL1Phase() const
 Returns the L1 phase w.r.t to the
 LHC clock
void PrintRCUTrailer() const
 Prints the contents of
 the RCU trailer data
Bool_t GetRCUTrailerData(UChar_t*& data) const
 Return a pointer to the RCU trailer
 data. Should be called always after
 the RCU trailer was already processed
 in the GetPosition() method
void PrintDebug() const
 The method prints all the available
 debug information.
 Its is used in case of decoding errors.
Int_t GetBranch() const
 The method provides the RCU branch index (0 or 1)
 for the current hardware address.
 In case the hardware address has not been yet
 initialized, the method returns -1
Int_t GetFEC() const
 The method provides the front-end card index
 for the current hardware address.
 In case the hardware address has not been yet
 initialized, the method returns -1
Int_t GetAltro() const
 The method provides the altro chip index
 for the current hardware address.
 In case the hardware address has not been yet
 initialized, the method returns -1
Int_t GetChannel() const
 The method provides the channel index
 for the current hardware address.
 In case the hardware address has not been yet
 initialized, the method returns -1
void AddMappingErrorLog(const char* message = NULL)
 Signal a mapping error
 The method can be used by the TPC,PHOS,EMCAL,FMD raw stream
 classes in order to log an error related to bad altro mapping
Int_t GetRCUPayloadSizeInSOD() const
 Get the size of the RCU data in case
 of SOD events
Int_t GetDDLNumber() const
{ return fDDLNumber; }
Int_t GetPrevDDLNumber() const
{ return fPrevDDLNumber; }
Bool_t IsNewDDLNumber() const
{return (fDDLNumber != fPrevDDLNumber);}
Int_t GetRCUId() const
{ return fRCUId; }
Int_t GetPrevRCUId() const
{ return fPrevRCUId; }
Bool_t IsNewRCUId() const
{return (fRCUId != fPrevRCUId);}
Int_t GetHWAddress() const
{ return fHWAddress; }
Int_t GetPrevHWAddress() const
{ return fPrevHWAddress; }
Bool_t IsNewHWAddress() const
Int_t GetTime() const
{ return fTime; }
Int_t GetPrevTime() const
{ return fPrevTime; }
Bool_t IsNewTime() const
{return (fTime != fPrevTime) || IsNewHWAddress();}
Int_t GetSignal() const
{ return fSignal; }
Int_t GetTimeLength() const
{ return fTimeBunch; }
Int_t GetChannelPayloadSize() const
Int_t GetRCUTrailerSize() const
{ return fRCUTrailerSize; }
UInt_t GetFECERRA() const
 RCU trailer related getters
{ return fFECERRA; }
UInt_t GetFECERRB() const
{ return fFECERRB; }
UShort_t GetERRREG2() const
{ return fERRREG2; }
UShort_t GetNChAddrMismatch() const
{ return fERRREG3; }
UShort_t GetNChLengthMismatch() const
{ return fERRREG4; }
UShort_t GetActiveFECsA() const
{ return fActiveFECsA; }
UShort_t GetActiveFECsB() const
{ return fActiveFECsB; }
UInt_t GetAltroCFG1() const
{ return fAltroCFG1; }
UChar_t GetBaselineCorr() const
{ return fAltroCFG1 & 0xF; }
Bool_t GetPolarity() const
{ return (fAltroCFG1 >> 4) & 0x1; }
UChar_t GetNPresamples() const
{ return (fAltroCFG1 >> 5) & 0x3; }
UChar_t GetNPostsamples() const
{ return (fAltroCFG1 >> 7) & 0xF; }
Bool_t GetSecondBaselineCorr() const
{ return (fAltroCFG1 >> 11) & 0x1; }
UChar_t GetGlitchFilter() const
{ return (fAltroCFG1 >> 12) & 0x3; }
UChar_t GetNNonZSPostsamples() const
{ return (fAltroCFG1 >> 14) & 0x7; }
UChar_t GetNNonZSPresamples() const
{ return (fAltroCFG1 >> 17) & 0x3; }
Bool_t GetZeroSupp() const
{ return (fAltroCFG1 >> 19) & 0x1; }
UInt_t GetAltroCFG2() const
{ return fAltroCFG2; }
Bool_t GetNAltroBuffers() const
{ return (fAltroCFG2 >> 24) & 0x1; }
UChar_t GetNPretriggerSamples() const
{ return (fAltroCFG2 >> 20) & 0xF; }
UShort_t GetNSamplesPerCh() const
{ return (fAltroCFG2 >> 10) & 0x3FF; }
Bool_t GetSparseRO() const
{ return (fAltroCFG2 >> 9) & 0x1; }
void SetShortDataHeader(Bool_t flag)
{ fIsShortDataHeader = flag; }