ROOT logo
AliRoot » RAW » AliAltroRawStreamV3

class AliAltroRawStreamV3: public TObject


 This is a base class for reading raw data digits in Altro format.
 The class is able to read the RCU v3 and above formats.
 The main difference between the format V3 and older ones is in
 the coding of the 10-bit Altro payload words. In V3 3 10-bit words
 are coded in one 32-bit word. The bits 30 and 31 are used to identify
 the payload, altro header and RCU trailer contents.


 cvetan.cheshkov@cern.ch 1/04/2009

Function Members (Methods)

public:
AliAltroRawStreamV3(AliRawReader* rawReader)
AliAltroRawStreamV3(const AliAltroRawStreamV3& stream)
virtual~AliAltroRawStreamV3()
voidTObject::AbstractMethod(const char* method) const
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_tGetBunchLength() const
Int_tGetChannel() const
const UChar_t*GetChannelPayload() const
Int_tGetChannelPayloadSize() const
Int_tGetDDLNumber() const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
UInt_tGetEndTimeBin() const
UShort_tGetERRREG2() const
Int_tGetFEC() const
UInt_tGetFECERRA() const
UInt_tGetFECERRB() const
UChar_tGetFormatVersion() 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_tGetRCUId() const
UChar_t*GetRCUPayloadInSOD() const
Int_tGetRCUPayloadSizeInSOD() const
Bool_tGetRCUTrailerData(UChar_t*& data) const
Int_tGetRCUTrailerSize() const
Bool_tGetSecondBaselineCorr() const
const UShort_t*GetSignals() const
Bool_tGetSparseRO() const
UInt_tGetStartTimeBin() 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
voidHexDumpChannel() 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
Bool_tIsChannelBad() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
Bool_tIsOldStream() 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_tNextBunch()
virtual Bool_tNextChannel()
virtual Bool_tNextDDL()
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)
AliAltroRawStreamV3&operator=(const AliAltroRawStreamV3& stream)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidTObject::Print(Option_t* option = "") 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)
voidSetCheckAltroPayload(Bool_t check)
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:
voidAddMappingErrorLog(const char* message = NULL)
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
voidTObject::MakeZombie()
private:
UInt_tGet32bitWord(Int_t index) const
Bool_tReadRCUTrailer(UChar_t rcuVer)

Data Members

public:
enum EAltroRawStreamV3Error { kRCUTrailerErr
kRCUVerErr
kRCUTrailerSizeErr
kAltroBunchHeadErr
kBunchLengthErr
kAltroPayloadErr
kBadAltroMapping
};
enum { kMaxNTimeBins
};
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
Bool_tfBadChannel
UShort_tfBunchData[1024]cache for the decoded altro payload
Int_tfBunchDataIndexcurrent position in the payload
UShort_t*fBunchDataPointerpointer to the current bunch samples
Int_tfBunchLength
Int_tfChannelPayloadSize
Int_tfChannelStartPosstart index of the current channel
Bool_tfCheckAltroPayloadcheck altro payload correctness or not?
Int_tfCount
Int_tfDDLNumberindex of current DDL number
UChar_t*fDataraw data
UShort_tfERRREG2contains errors related to ALTROBUS transactions or trailer of ALTRO channel block
UInt_tfERRREG3contains number of altro channels skipped due to an address mismatch
UInt_tfFECERRAcontains errors related to ALTROBUS transactions
UInt_tfFECERRBcontains errors related to ALTROBUS transactions
UChar_tfFormatVersion
Short_tfHWAddresscurrent hardware address
AliAltroRawStream*fOldStreamstreamer for old altro format
Int_tfPayloadSize
Int_tfPositioncurrent position (32-bit words) in fData
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_tfStartTimeBin

Class Charts

Inheritance Chart:
TObject
AliAltroRawStreamV3
AliCaloRawStreamV3
AliTPCRawStreamV3

Function documentation

AliAltroRawStreamV3(AliRawReader* rawReader)
 Constructor
 Create an object to read Altro raw digits in
 RCU version 3 and beyond format
~AliAltroRawStreamV3()
 destructor
 delete old stream object if one exists
AliAltroRawStreamV3(const AliAltroRawStreamV3& stream)
 Copy constructor
 Copy the bunch data array
void Reset()
 Complete reset of raw stream params
 Reset of the raw-reader as well
Bool_t NextDDL()
 Read the next DDL payload (CDH + RCU trailer)
 Updates the information which is coming from these
 two sources
Bool_t NextChannel()
 Read the next Altro channel from the
 raw-data stream
 Updates the channel hardware address member and
 channel data size. Sets the error flag in case
 RCU signals readout error in this channel
Bool_t NextBunch()
 Read next altro bunch from the
 raw-data stream.
 Updates the start/end time-bins
 and the array with altro samples
const UChar_t * GetChannelPayload() const
returns raw channel data, length 4+(fChannelPayloadSize+2)/3*4
UInt_t Get32bitWord(Int_t index) const
 This method returns the 32 bit word at a given
 position inside the raw data payload.
 The 'index' points to the beginning of the word.
 The method is supposed to be endian (platform)
 independent.
Bool_t ReadRCUTrailer(UChar_t rcuVer)
 Read the RCU trailer according
 to the RCU formware version
 specified in CDH
 Cross-check with version found in the
 trailer
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
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 PrintRCUTrailer() const
 Prints the contents of
 the RCU trailer data
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
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 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
UChar_t * GetRCUPayloadInSOD() const
 Get a pointer to the data in case
 of SOD events
Int_t GetRCUPayloadSizeInSOD() const
 Get the size of the RCU data in case
 of SOD events
void HexDumpChannel() const
 Print of the Hex Data of the current channel
 to decipher read-out warnings and errors
Int_t GetDDLNumber() const
{ return fDDLNumber; }
Int_t GetHWAddress() const
{ return fHWAddress; }
Int_t GetRCUId() const
{ return fRCUId; }
UInt_t GetStartTimeBin() const
{ return fStartTimeBin; }
UInt_t GetEndTimeBin() const
Int_t GetBunchLength() const
{ return fBunchLength; }
const UShort_t* GetSignals() const
{ return fBunchDataPointer; }
Bool_t IsChannelBad() const
{ return fBadChannel; }
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 & 0xFFF); }
UShort_t GetNChLengthMismatch() const
{ return ((fERRREG3 >> 12) & 0x1FFF); }
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; }
Bool_t IsOldStream() const
{ return fOldStream != 0; }
UChar_t GetFormatVersion() const
{ return fFormatVersion; }
void SetShortDataHeader(Bool_t flag)
{ fIsShortDataHeader = flag; }
void SetCheckAltroPayload(Bool_t check)
{ fCheckAltroPayload = check; }