ROOT logo
AliRoot » HLT » BASE » AliHLTOUT

class AliHLTOUT

This file is property of and copyright by the
ALICE Experiment at CERN, All rights reserved.

Primary Authors: Matthias Richter <Matthias.Richter@ift.uib.no>
for The ALICE HLT Project.

Permission to use, copy, modify and distribute this software and its
documentation strictly for non-commercial purposes is hereby granted
without fee, provided that the above copyright notice appears in all
copies and that both the copyright notice and this permission notice
appear in the supporting documentation. The authors make no claims
about the suitability of this software for any purpose. It is
provided "as is" without express or implied warranty.

Function Members (Methods)

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

public:
virtual~AliHLTOUT()
intAddSubCollection(AliHLTOUT* pCollection)
static AliHLTUInt32_tByteSwap32(AliHLTUInt32_t src)
static AliHLTUInt64_tByteSwap64(AliHLTUInt64_t src)
intCheckAlignment(AliHLTOUT::AliHLTOUTDataType type)
AliHLTOUT::AliHLTOUTByteOrderCheckByteOrder()
static TClass*Class()
static voidDelete(AliHLTOUT* pInstance)
intDisableBlockSelection()
intEnableBlockSelection()
AliHLTUInt64_tEventId() const
intFillHandlerList(AliHLTOUT::AliHLTOUTHandlerListEntryVector& list, AliHLTModuleAgent::AliHLTOUTHandlerType handlerType)
static intFindHandler(AliHLTOUT::AliHLTOUTHandlerListEntryVector& list, const AliHLTModuleAgent::AliHLTOUTHandlerDesc desc)
AliHLTModuleAgent*GetAgent()
intGetDataBlockDescription(AliHLTComponentDataType& dt, AliHLTUInt32_t& spec)
const AliHLTOUT::AliHLTOUTHandlerListEntry&GetDataBlockHandlerDesc()
AliHLTModuleAgent::AliHLTOUTHandlerTypeGetDataBlockHandlerType()
AliHLTUInt32_tGetDataBlockIndex()
intGetDataBuffer(AliHLTComponentBlockData& desc)
intGetDataBuffer(const AliHLTUInt8_t*& pBuffer, AliHLTUInt32_t& size)
TObject*GetDataObject()
static AliHLTOUT*GetGlobalInstance()
AliHLTOUTHandler*GetHandler()
intGetNofDataBlocks()
intInit()
static intInsertHandler(AliHLTOUT::AliHLTOUTHandlerListEntryVector& list, const AliHLTOUT::AliHLTOUTHandlerListEntry& entry)
static intInvalidateBlocks(AliHLTOUT::AliHLTOUTHandlerListEntryVector& list)
virtual TClass*IsA() const
intMarkDataBlockProcessed()
intMarkDataBlocksProcessed(const AliHLTOUT::AliHLTOUTHandlerListEntry* pHandlerDesc)
static AliHLTOUT*New(AliRawReader* pRawReader)
static AliHLTOUT*New(TTree* pDigitTree, int event = -1)
static AliHLTOUT*New(const char* filename, int event = -1)
intReleaseDataBuffer(const AliHLTUInt8_t* pBuffer)
intReleaseDataObject(TObject* pObject)
intReleaseSubCollection(AliHLTOUT* pCollection)
static intRemoveEmptyDuplicateHandlers(AliHLTOUT::AliHLTOUTHandlerListEntryVector& list)
intReset()
intResetBlockSelection()
intSelectDataBlock()
intSelectDataBlocks(const AliHLTOUT::AliHLTOUTHandlerListEntry* pHandlerDesc)
intSelectFirstDataBlock(AliHLTComponentDataType dt = kAliHLTAnyDataType, AliHLTUInt32_t spec = kAliHLTVoidDataSpec, AliHLTModuleAgent::AliHLTOUTHandlerType handlerType = AliHLTModuleAgent::kUnknownOutput, bool skipProcessed = true)
intSelectNextDataBlock()
virtual voidShowMembers(TMemberInspector&)
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)
virtual intWriteESD(const AliHLTUInt8_t* pBuffer, AliHLTUInt32_t size, AliHLTComponentDataType dt, AliESDEvent* tgtesd = 0) const
protected:
intAddBlockDescriptor(const AliHLTOUT::AliHLTOUTBlockDescriptor desc)
boolBeVerbose() const
voidPrint(const char* option = "") const
voidSetEventId(AliHLTUInt64_t id)
voidSwitchVerbosity(bool verbose)
private:
virtual intCheckBlockAlignment(AliHLTUInt32_t index, AliHLTOUT::AliHLTOUTDataType type)
virtual AliHLTOUT::AliHLTOUTByteOrderCheckBlockByteOrder(AliHLTUInt32_t index)
intCheckStatusFlag(unsigned int flag) const
unsigned intClearStatusFlag(unsigned int flag)
intFindAndSelectDataBlock()
const AliHLTOUT::AliHLTOUTHandlerListEntry&FindHandlerDesc(AliHLTUInt32_t blockIndex)
virtual intGenerateIndex()
virtual intGetDataBuffer(AliHLTUInt32_t index, const AliHLTUInt8_t*& pBuffer, AliHLTUInt32_t& size)
intInitHandlers()
AliHLTOUT&operator=(const AliHLTOUT&)
virtual intResetInput()
virtual voidSetParam(AliRawReader* pRawReader)
virtual voidSetParam(TTree* pDigitTree, int event = -1)
virtual voidSetParam(const char* filename, int event = -1)
unsigned intSetStatusFlag(unsigned int flag)

Data Members

public:
enum { kVersion1
kVersion2
kSizeDecisionVersion1
kSizeDecisionVersion2
kCDHStatusWord
kCDHStatusFlagsOffset
kCDHFlagsHLTDecision
kCDHFlagsHLTPayload
};
enum AliHLTOUTByteOrder { kInvalidByteOrder
kUnknownByteOrder
kLittleEndian
kBigEndian
};
enum AliHLTOUTDataType { kUint64
kUint32
kUint16
kUint8
kDouble
kFloat
};
enum { kLocked
kCollecting
kByteOrderChecked
kByteOrderWarning
kAlignmentChecked
kAlignmentWarning
kBlockSelection
kSkipProcessed
kIsSubCollection
};
private:
vector<AliHLTOUT::AliHLTOUTBlockDescriptor,allocator<AliHLTOUT::AliHLTOUTBlockDescriptor> >fBlockDescList!transient
unsigned intfCurrent!transient
AliHLTUInt64_tfCurrentEventId!
vector<AliHLTOUT::AliHLTOUTHandlerListEntry,allocator<AliHLTOUT::AliHLTOUTHandlerListEntry> >fDataHandlers!transient
unsigned intfFlags!transient
AliHLTLoggingfLog! transient
AliHLTUInt32_tfObjectBufferSize!
AliHLTComponentDataTypefSearchDataType!transient
AliHLTModuleAgent::AliHLTOUTHandlerTypefSearchHandlerType!transient
AliHLTUInt32_tfSearchSpecification!transient
boolfbVerbose!transient
static AliHLTOUT*fgGlobalInstance! transient
unsigned char*fpBuffer!transient
TObject*fpDataObject!
unsigned char*fpObjectBuffer!

Class Charts

Inheritance Chart:
AliHLTOUT
AliHLTOUTHomerBuffer
AliHLTOUTTask

Function documentation

~AliHLTOUT()
 destructor
int Init()
 see header file for class documentation
int GetNofDataBlocks()
 get number of data blocks
int SelectFirstDataBlock(AliHLTComponentDataType dt = kAliHLTAnyDataType, AliHLTUInt32_t spec = kAliHLTVoidDataSpec, AliHLTModuleAgent::AliHLTOUTHandlerType handlerType = AliHLTModuleAgent::kUnknownOutput, bool skipProcessed = true)
 select the first data block according to data type, specification and
 handler type
int SelectNextDataBlock()
 select next data block according to selection criteria specified
 for SelectFirstDataBlock
int FindAndSelectDataBlock()
 Select data block according to data type and specification, internal function
 invoked by SelectFirstDataBlock/SelectNextDataBlock
int GetDataBlockDescription(AliHLTComponentDataType& dt, AliHLTUInt32_t& spec)
 fill data type and specification
AliHLTModuleAgent::AliHLTOUTHandlerType GetDataBlockHandlerType()
 Get handler type of the selected data block.
AliHLTUInt32_t GetDataBlockIndex()
 Get the index of the current data block.
int GetDataBuffer(AliHLTComponentBlockData& desc)
 fill block data descriptor and select the current data buffer
 buffer has to be released using ReleaseDataBuffer
int GetDataBuffer(const AliHLTUInt8_t*& pBuffer, AliHLTUInt32_t& size)
 select and return the current data buffer
 buffer has to be released using ReleaseDataBuffer
int ReleaseDataBuffer(const AliHLTUInt8_t* pBuffer)
 release data buffer, previously returned by GetDataBuffer
AliHLTModuleAgent* GetAgent()
 get module agent of the selected data block
AliHLTOUTHandler* GetHandler()
 get HLTOUT handler of the selected data block
int WriteESD(const AliHLTUInt8_t* pBuffer, AliHLTUInt32_t size, AliHLTComponentDataType dt, AliESDEvent* tgtesd = 0) const
 default function, child must overload
int AddBlockDescriptor(const AliHLTOUT::AliHLTOUTBlockDescriptor desc)
 add new block descriptor
int CheckAlignment(AliHLTOUT::AliHLTOUTDataType type)
 check alignment of the current data block
 NOTE: this functionality has not been tested and development was hardly finished
int InitHandlers()
 init handlers for all registered blocks
int InsertHandler(AliHLTOUT::AliHLTOUTHandlerListEntryVector& list, const AliHLTOUT::AliHLTOUTHandlerListEntry& entry)
 insert handler into list, called from child implementations
int FillHandlerList(AliHLTOUT::AliHLTOUTHandlerListEntryVector& list, AliHLTModuleAgent::AliHLTOUTHandlerType handlerType)
 fill a list according to specified handler type
int RemoveEmptyDuplicateHandlers(AliHLTOUT::AliHLTOUTHandlerListEntryVector& list)
 remove empty handlers from list
int FindHandler(AliHLTOUT::AliHLTOUTHandlerListEntryVector& list, const AliHLTModuleAgent::AliHLTOUTHandlerDesc desc)
 find handler according to descriptor
int InvalidateBlocks(AliHLTOUT::AliHLTOUTHandlerListEntryVector& list)
 invalidate all handlers in a list
AliHLTUInt64_t ByteSwap64(AliHLTUInt64_t src)
 swap a 64 bit number
AliHLTUInt32_t ByteSwap32(AliHLTUInt32_t src)
 swap a 32 bit number
AliHLTOUT* New(AliRawReader* pRawReader)
 transparently create HLTOUT implementation for AliRawReader
AliHLTOUT* New(TTree* pDigitTree, int event = -1)
 transparently create HLTOUT implementation for digit tree
AliHLTOUT* New(const char* filename, int event = -1)
 transparently create HLTOUT implementation for raw file
void Delete(AliHLTOUT* pInstance)
 delete the HLTOUT instance
 check if the library is still there in order to have the
 destructor available
void SetParam(AliRawReader* pRawReader)
 see header file for class documentation
 default implementation, we should never get here
 this function can only be called from the class itsself and
 is intended to be used with the New functions. If we get into
 the default implementation there is a class mismatch.
void SetParam(TTree* pDigitTree, int event = -1)
 see header file for class documentation
 default implementation, we should never get here
 this function can only be called from the class itsself and
 is intended to be used with the New functions. If we get into
 the default implementation there is a class mismatch.
void SetParam(const char* filename, int event = -1)
 see header file for class documentation
 default implementation, we should never get here
 this function can only be called from the class itsself and
 is intended to be used with the New functions. If we get into
 the default implementation there is a class mismatch.
int SelectDataBlock()
 mark the current data block for processing
int SelectDataBlocks(const AliHLTOUT::AliHLTOUTHandlerListEntry* pHandlerDesc)
 mark all data blocks served by specified handler for processing
int EnableBlockSelection()
 enable block selection, in this mode only the blocks marked for
 processing can be accessed
int DisableBlockSelection()
 disable block selection
int ResetBlockSelection()
 reset the 'selected' flag for all blocks
int MarkDataBlockProcessed()
 mark the current data block as 'processed'
int MarkDataBlocksProcessed(const AliHLTOUT::AliHLTOUTHandlerListEntry* pHandlerDesc)
 mark all data blocks served by handler as processed
int AddSubCollection(AliHLTOUT* pCollection)
 add a sub-collection to the HLTOUT instance
 all blocks of the sub-collection are accessed transparently through the master instance
int ReleaseSubCollection(AliHLTOUT* pCollection)
 release a sub-collection
int Reset()
 reset HLTOUT instance
 clears all blocks and handler descriptions
int ResetInput()
 default implementation, nothing to do
TObject* GetDataObject()
 check if the current block encodes a ROOT object and expand it
int ReleaseDataObject(TObject* pObject)
 release a ROOT object previously expanded from the currentr data block
void SetEventId(AliHLTUInt64_t id)
 set event id
void Print(const char* option = "") const
 print info
AliHLTOUT* GetGlobalInstance()
   * Get the global instance.
   * The global instance is set temporarily by the AliHLTOUTGlobalInstanceGuard
   * mainly for the sake of data input to an analysis chain. The
   * AliHLTOUTPublisherComponent objects can access the global instance.

AliHLTOUTLockGuard& operator=(const AliHLTOUT& )
 assignment operator prohibited 
int GetDataBuffer(const AliHLTUInt8_t*& pBuffer, AliHLTUInt32_t& size)
     * Get the data buffer
     * @param [out] pBuffer buffer of the selected data block
     * @param [out] size    size of the selected data block

AliHLTUInt64_t EventId() const
   * Get the current event id

{return fCurrentEventId;}
const AliHLTOUTHandlerListEntry& GetDataBlockHandlerDesc()
   * Get handler description of the current data block.

AliHLTOUTByteOrder CheckByteOrder()
   * Check byte order of selected block

bool BeVerbose() const
   * Print output or suppress.

{return fbVerbose;}
void SwitchVerbosity(bool verbose)
   * Switch output.

{fbVerbose=verbose;}
int GenerateIndex()
   * Generate the index of the HLTOUT data.
   * Must be implemented by the child classes.

AliHLTOUTByteOrder CheckBlockByteOrder(AliHLTUInt32_t index)
   * Check byte order of data block

int CheckBlockAlignment(AliHLTUInt32_t index, AliHLTOUT::AliHLTOUTDataType type)
   * Check alignment of data block

unsigned int SetStatusFlag(unsigned int flag)
   * Set status flag.
   * @param flag     flag to set
   * @return current status flags

{return fFlags|=flag;}
unsigned int ClearStatusFlag(unsigned int flag)
   * Clear status flag.
   * @param flag     flag to clear
   * @return current status flags

{return fFlags&=~flag;}
int CheckStatusFlag(unsigned int flag) const
   * Check status flag.
   * @param flag     flag to check
   * @return 1 if flag is set

{return (fFlags&flag)==flag;}
const AliHLTOUTHandlerListEntry& FindHandlerDesc(AliHLTUInt32_t blockIndex)
   * Find handler description for a certain block index.