ROOT logo
AliRoot » RAW » AliRawReader

class AliRawReader: public TObject


 This is the base class for reading raw data.

 The derived classes, which operate on concrete raw data formats,
 should implement
 - ReadHeader to read the next (data/equipment) header
 - ReadNextData to read the next raw data block (=1 DDL)
 - ReadNext to read a given number of bytes
 - several getters like GetType

 Sequential access to the raw data is provided by the methods
 ReadHeader, ReadNextData, ReadNextInt, ReadNextShort, ReadNextChar

 If only data from a specific detector (and a given range of DDL numbers)
 should be read, this can be achieved by the Select method.
 Several getters provide information about the current event and the
 current type of raw data.


Function Members (Methods)

 
    This is an abstract class, constructors will not be documented.
    Look at the header to check for available constructors.

public:
virtual~AliRawReader()
voidTObject::AbstractMethod(const char* method) const
voidAddErrorLog(AliRawDataErrorLog::ERawDataErrorLevel level, Int_t code, const char* message = NULL)
voidAddFatalErrorLog(Int_t code, const char* message = NULL)
voidAddMajorErrorLog(Int_t code, const char* message = NULL)
voidAddMinorErrorLog(Int_t code, const char* message = NULL)
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
virtual Int_tCheckData() const
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTObject::Clear(Option_t* = "")
virtual TObject*TObject::Clone(const char* newname = "") const
virtual AliRawReader*CloneSingleEvent() const
virtual Int_tTObject::Compare(const TObject* obj) const
virtual voidTObject::Copy(TObject& object) const
static AliRawReader*Create(const char* uri)
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
voidDumpData(Int_t limit = -1)
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
const TClonesArray&GetAllErrorLogs() const
virtual const UInt_t*GetAttributes() const
UShort_tGetBCID() const
UChar_tGetBlockAttributes() const
virtual TChain*GetChain() const
ULong64_tGetClassMask() const
ULong64_tGetClassMaskNext50() const
const AliRawDataHeader*GetDataHeader() const
const AliRawDataHeaderV3*GetDataHeaderV3() const
Int_tGetDataSize() const
Int_tGetDDLID() const
Int_tGetDetectorID() const
virtual const UInt_t*GetDetectorPattern() const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
virtual const UInt_t*GetEquipmentAttributes() const
virtual Int_tGetEquipmentElementSize() const
virtual Int_tGetEquipmentHeaderSize() const
virtual Int_tGetEquipmentId() const
virtual Int_tGetEquipmentSize() const
virtual Int_tGetEquipmentType() const
Int_tGetErrorCode() const
AliRawDataErrorLog*GetErrorLog(Int_t i) const
virtual const AliRawVEvent*GetEvent() const
virtual const AliRawEventHeaderBase*GetEventHeader() const
virtual const UInt_t*GetEventId() const
ULong64_tGetEventIdAsLong() const
virtual Int_tGetEventIndex() const
virtual UInt_tGetGDCId() const
virtual const char*TObject::GetIconName() const
virtual UInt_tGetLDCId() const
Int_tGetMappedEquipmentId() const
virtual const char*TObject::GetName() const
Int_tGetNumberOfErrorLogs() const
virtual Int_tGetNumberOfEvents() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
UInt_tGetOrbitID() const
UInt_tGetPeriod() const
virtual UInt_tGetRunNumber() const
UInt_tGetStatusBits() const
virtual const UInt_t*GetSubEventAttributes() const
virtual UInt_tGetTimestamp() const
virtual const char*TObject::GetTitle() const
virtual const UInt_t*GetTriggerPattern() const
virtual UInt_tGetType() const
virtual UInt_tTObject::GetUniqueID() const
Int_tGetVersion() const
virtual Bool_tGotoEvent(Int_t event)
virtual Bool_tGotoEventWithID(Int_t event, UInt_t period, UInt_t orbitID, UShort_t bcID)
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
Bool_tIsCompressed() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
Bool_tTObject::IsOnHeap() const
Bool_tIsRawReaderValid() const
virtual Bool_tTObject::IsSortable() const
Bool_tIsValid() const
Bool_tTObject::IsZombie() const
Bool_tLoadEquipmentIdsMap(const char* fileName)
voidLoadTriggerAlias(const THashList* lst)
voidLoadTriggerClass(const char* name, Int_t index)
virtual voidTObject::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
virtual Bool_tNextEvent()
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)
AliRawReader&operator=(const AliRawReader& rawReader)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidTObject::Print(Option_t* option = "") const
virtual Int_tTObject::Read(const char* name)
virtual Bool_tReadHeader()
virtual Bool_tReadNext(UChar_t* data, Int_t size)
virtual Bool_tReadNextChar(UChar_t& data)
virtual Bool_tReadNextData(UChar_t*& data)
virtual Bool_tReadNextInt(UInt_t& data)
virtual Bool_tReadNextShort(UShort_t& data)
virtual voidTObject::RecursiveRemove(TObject* obj)
virtual voidRequireHeader(Bool_t required)
virtual Bool_tReset()
voidTObject::ResetBit(UInt_t f)
virtual Bool_tRewindEvents()
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(basic_ostream<char,char_traits<char> >& out, Option_t* option = "")
virtual voidSelect(Int_t detectorID, Int_t minDDLID = -1, Int_t maxDDLID = -1)
virtual voidSelect(const char* detectorName, Int_t minDDLID = -1, Int_t maxDDLID = -1)
virtual voidSelectEquipment(Int_t equipmentType, Int_t minEquipmentId = -1, Int_t maxEquipmentId = -1)
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)
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidShowMembers(TMemberInspector&)
virtual voidSkipInvalid(Bool_t skip = kTRUE)
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_tTestBlockAttribute(Int_t index) const
virtual Bool_tUseAutoSaveESD() 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
Bool_tIsEventSelected() const
Bool_tIsSelected() const
voidTObject::MakeZombie()
virtual voidSelectEvents(Int_t type, ULong64_t triggerMask = 0, const char* triggerExpr = NULL)
UShort_tSwapShort(UShort_t x) const
UInt_tSwapWord(UInt_t x) const

Data Members

public:
enum { kErrMagic
kErrNoDataHeader
kErrSize
kErrOutOfBounds
};
enum TObject::EStatusBits { kCanDelete
kMustCleanup
kObjInCanvas
kIsReferenced
kHasUUID
kCannotPick
kNoContextMenu
kInvalidObject
};
enum TObject::[unnamed] { kIsOnHeap
kNotDeleted
kZombie
kBitMask
kSingleKey
kOverwrite
kWriteDelete
};
protected:
Int_tfCountcounter of bytes to be read for current DDL
TArrayI*fEquipmentIdsInarray of equipment Ids to be mapped
TArrayI*fEquipmentIdsOutarray of mapped equipment Ids
Int_tfErrorCodecode of last error
TClonesArrayfErrorLogsraw data decoding errors
Int_tfEventNumbercurrent event number
AliRawDataHeader*fHeadercurrent data header
AliRawDataHeader*fHeaderSwappedtemporary buffer for swapping header on PowerPC
AliRawDataHeaderV3*fHeaderSwappedV3temporary buffer for swapping header on PowerPC
AliRawDataHeaderV3*fHeaderV3current data header
Bool_tfIsTriggerClassLoadedflags the call to LoadTriggerClass
Bool_tfIsValidis raw-reader created successfully
Bool_tfRequireHeaderif false, data without header is accepted
Int_tfSelectEquipmentTypetype of selected equipment (<0 = no selection)
Int_tfSelectEventTypetype of selected events (<0 = no selection)
Int_tfSelectMaxEquipmentIdmaximal index of selected equipment (<0 = no selection)
Int_tfSelectMinEquipmentIdminimal index of selected equipment (<0 = no selection)
TStringfSelectTriggerExprtrigger expression for selecting events (empty = no selection)
ULong64_tfSelectTriggerMasktrigger mask for selecting events (0 = no selection)
Bool_tfSkipInvalidskip invalid data

Class Charts

Inheritance Chart:
TObject
AliRawReader
AliRawReaderDate
AliRawReaderFile
AliRawReaderMemory
AliRawReaderRoot
AliRawReaderChain

Function documentation

Bool_t LoadEquipmentIdsMap(const char* fileName)
 Open the mapping file
 and load the mapping data
~AliRawReader()
 destructor
 delete the mapping arrays if
 initialized
AliRawReader* Create(const char* uri)
 RawReader's factory
 It instantiate corresponding raw-reader implementation class object
 depending on the URI provided
 Normal URIs point to files, while the URI starting with
 'mem://:' or 'mem://<filename>' will create
 AliRawReaderDateOnline object which is supposed to be used
 in the online reconstruction
Int_t GetMappedEquipmentId() const
Int_t GetDetectorID() const
 Get the detector ID
 The list of detector IDs
 can be found in AliDAQ.h
Int_t GetDDLID() const
 Get the DDL ID (within one sub-detector)
 The list of detector IDs
 can be found in AliDAQ.h
void Select(const char* detectorName, Int_t minDDLID = -1, Int_t maxDDLID = -1)
 read only data of the detector with the given name and in the given
 range of DDLs (minDDLID <= DDLID <= maxDDLID).
 no selection is applied if a value < 0 is used.
void Select(Int_t detectorID, Int_t minDDLID = -1, Int_t maxDDLID = -1)
 read only data of the detector with the given ID and in the given
 range of DDLs (minDDLID <= DDLID <= maxDDLID).
 no selection is applied if a value < 0 is used.
void SelectEquipment(Int_t equipmentType, Int_t minEquipmentId = -1, Int_t maxEquipmentId = -1)
 read only data of the equipment with the given type and in the given
 range of IDs (minEquipmentId <= EquipmentId <= maxEquipmentId).
 no selection is applied if a value < 0 is used.
void SelectEvents(Int_t type, ULong64_t triggerMask = 0, const char* triggerExpr = NULL)
 read only events with the given type and optionally
 trigger mask.
 no selection is applied if value = 0 is used.
 Trigger selection can be done via string (triggerExpr)
 which defines the trigger logic to be used. It works only
 after LoadTriggerClass() method is called for all involved
 trigger classes.
void LoadTriggerClass(const char* name, Int_t index)
 Loads the list of trigger classes defined.
 Used in conjunction with IsEventSelected in the
 case when the trigger selection is given by
 fSelectedTriggerExpr
void LoadTriggerAlias(const THashList* lst)
 Loads the list of trigger aliases defined.
 Replaces the alias by the OR of the triggers included in it.
 The subsiquent call to LoadTriggerClass is needed
 to obtain the final expression in
 fSelectedTriggerExpr
Bool_t IsSelected() const
 apply the selection (if any)
Bool_t IsEventSelected() const
 apply the event selection (if any)
UInt_t SwapWord(UInt_t x) const
 Swap the endianess of the integer value 'x'
UShort_t SwapShort(UShort_t x) const
 Swap the endianess of the short value 'x'
Bool_t ReadNextInt(UInt_t& data)
 reads the next 4 bytes at the current position
 returns kFALSE if the data could not be read
Bool_t ReadNextShort(UShort_t& data)
 reads the next 2 bytes at the current position
 returns kFALSE if the data could not be read
Bool_t ReadNextChar(UChar_t& data)
 reads the next 1 byte at the current stream position
 returns kFALSE if the data could not be read
Bool_t GotoEvent(Int_t event)
 Random access to certain
 event index. Could be very slow
 for some non-root raw-readers.
 So it should be reimplemented there.
Int_t CheckData() const
 check the consistency of the data
 derived classes should overwrite the default method which returns 0 (no err)
void DumpData(Int_t limit = -1)
 print the raw data
 if limit is not negative, only the first and last "limit" lines of raw data
 are printed
void AddErrorLog(AliRawDataErrorLog::ERawDataErrorLevel level, Int_t code, const char* message = NULL)
 Add a raw data error message to the list
 of raw-data decoding errors
Bool_t GotoEventWithID(Int_t event, UInt_t period, UInt_t orbitID, UShort_t bcID)
 Go to certain event number by
 checking the event ID.
 Useful in case event-selection
 is applied and the 'event' is
 relative
void SkipInvalid(Bool_t skip = kTRUE)
{fSkipInvalid = skip;}
void RequireHeader(Bool_t required)
{fRequireHeader = required;}
const AliRawEventHeaderBase* GetEventHeader() const
{return NULL;}
const AliRawVEvent* GetEvent() const
{return NULL;}
UInt_t GetType() const
UInt_t GetRunNumber() const
const UInt_t* GetEventId() const
UInt_t GetPeriod() const
UInt_t GetOrbitID() const
UShort_t GetBCID() const
ULong64_t GetEventIdAsLong() const
const UInt_t* GetTriggerPattern() const
ULong64_t GetClassMask() const
ULong64_t GetClassMaskNext50() const
const UInt_t* GetDetectorPattern() const
const UInt_t* GetAttributes() const
const UInt_t* GetSubEventAttributes() const
UInt_t GetLDCId() const
UInt_t GetGDCId() const
UInt_t GetTimestamp() const
Int_t GetEquipmentSize() const
Int_t GetEquipmentType() const
Int_t GetEquipmentId() const
const UInt_t* GetEquipmentAttributes() const
Int_t GetEquipmentElementSize() const
Int_t GetEquipmentHeaderSize() const
Int_t GetDataSize() const
Int_t GetVersion() const
Bool_t IsValid() const
Bool_t IsCompressed() const
Bool_t TestBlockAttribute(Int_t index) const
UChar_t GetBlockAttributes() const
UInt_t GetStatusBits() const
const AliRawDataHeader* GetDataHeader() const
{return fHeader;}
const AliRawDataHeaderV3* GetDataHeaderV3() const
{return fHeaderV3;}
Bool_t ReadHeader()
Bool_t ReadNextData(UChar_t*& data)
Bool_t ReadNext(UChar_t* data, Int_t size)
Bool_t Reset()
Bool_t NextEvent()
Bool_t RewindEvents()
Int_t GetEventIndex() const
{ return -1; }
Int_t GetNumberOfEvents() const
{ return -1; }
Int_t GetErrorCode() const
{return fErrorCode;}
void AddMinorErrorLog(Int_t code, const char* message = NULL)
void AddMajorErrorLog(Int_t code, const char* message = NULL)
void AddFatalErrorLog(Int_t code, const char* message = NULL)
Int_t GetNumberOfErrorLogs() const
{ return fErrorLogs.GetEntriesFast(); }
const TClonesArray & GetAllErrorLogs() const
{ return fErrorLogs; }
AliRawDataErrorLog * GetErrorLog(Int_t i) const
Bool_t UseAutoSaveESD() const
 Method which can be used in order to force the auto-save on
 ESD tree inside AliReconstruction. For the moment it will be
 activated only for AliRawReaderDateOnline.
{ return kFALSE; }
TChain* GetChain() const
{ return NULL; }
Bool_t IsRawReaderValid() const
{ return fIsValid; }
AliRawReader* CloneSingleEvent() const
{ return NULL; }