+ /**
+ * Fill AliHLTComponentBlockData structure with default values.
+ * @param blockData reference to data structure
+ */
+ static void FillBlockData( AliHLTComponentBlockData& blockData );
+
+ /**
+ * Fill AliHLTComponentShmData structure with default values.
+ * @param shmData reference to data structure
+ */
+ static void FillShmData( AliHLTComponentShmData& shmData );
+
+ /**
+ * Fill AliHLTComponentDataType structure with default values.
+ * @param dataType reference to data structure
+ */
+ static void FillDataType( AliHLTComponentDataType& dataType );
+
+ /**
+ * Copy data type structure
+ * Copies the value an AliHLTComponentDataType structure to another one
+ * @param [out] tgtdt target structure
+ * @param [in] srcdt source structure
+ */
+ static void CopyDataType(AliHLTComponentDataType& tgtdt, const AliHLTComponentDataType& srcdt);
+
+ /**
+ * Set the ID and Origin of an AliHLTComponentDataType structure.
+ * The function sets the fStructureSize member and copies the strings
+ * to the ID and Origin. Only characters from the valid part of the string
+ * are copied, the rest is filled with 0's. <br>
+ * Please note that the fID and fOrigin members are not strings, just arrays of
+ * chars of size @ref kAliHLTComponentDataTypefIDsize and
+ * @ref kAliHLTComponentDataTypefOriginSize respectively and not necessarily with
+ * a terminating zero. <br>
+ * It is possible to pass NULL pointers as id or origin argument, in that case they
+ * are just ignored.
+ * @param tgtdt target data type structure
+ * @param id ID string
+ * @param origin Origin string
+ */
+ static void SetDataType(AliHLTComponentDataType& tgtdt, const char* id, const char* origin);
+
+ /**
+ * Set the ID and Origin of an AliHLTComponentDataType structure.
+ * Given the fact that the data type ID is 64bit wide and origin 32, this helper
+ * function sets the data type from those two parameters.
+ * @param dt target data type structure
+ * @param id 64bit id
+ * @param orig 32bit origin
+ */
+ static void SetDataType(AliHLTComponentDataType& dt, AliHLTUInt64_t id, AliHLTUInt32_t orig);
+
+ /**
+ * Extract a component table entry from the payload buffer.
+ * The entry consists of the AliHLTComponentTableEntry structure, the array of
+ * parents and a description string of the format 'chain-id{component-id:component-args}'.
+ * The function fills all the variables after a consistency check.
+ */
+ static int ExtractComponentTableEntry(const AliHLTUInt8_t* pBuffer, AliHLTUInt32_t size,
+ string& chainId, string& compId, string& compParam,
+ vector<AliHLTUInt32_t>& parents) {
+ int dummy=0;
+ return ExtractComponentTableEntry(pBuffer, size, chainId, compId, compParam, parents, dummy);
+ }
+
+ static int ExtractComponentTableEntry(const AliHLTUInt8_t* pBuffer, AliHLTUInt32_t size,
+ string& chainId, string& compId, string& compParam,
+ vector<AliHLTUInt32_t>& parents, int& level);
+
+ /**
+ * Extracts the different data parts from the trigger data structure.
+ * @param [in] trigData The trigger data as passed to the DoProcessing method.
+ * @param [out] attributes The data block attributes given by the HLT framework.
+ * @param [out] status The HLT status bits given by the HLT framework.
+ * @param [out] cdh The common data header received from DDL links.
+ * @param [out] readoutlist The readout list to fill with readout list bits
+ * passed on by the HLT framework.
+ * @param [in] printErrors If true then error messages are generated as necessary
+ * and suppressed otherwise.
+ * @note If any of the output parameters are set to NULL then the field is not set.
+ * For example, the following line will only fill the CDH pointer.
+ * \code
+ * AliRawDataHeader* cdh;
+ * ExtractTriggerData(trigData, NULL, NULL, &cdh, NULL);
+ * \endcode
+ * @return zero on success or one of the following error codes on failure.
+ * if a non-zero error code is returned then none of the output parameters are
+ * modified.
+ * \li -ENOENT The <i>trigData</i> structure size is wrong.
+ * \li -EBADF The <i>trigData</i> data size is wrong.
+ * \li -EBADMSG The common data header (CDH) in the trigger data has the wrong
+ * number of words indicated.
+ * \li -EPROTO The readout list structure in the trigger data has the wrong
+ * number of words indicated.
+ */
+ static int ExtractTriggerData(
+ const AliHLTComponentTriggerData& trigData,
+ const AliHLTUInt8_t (**attributes)[gkAliHLTBlockDAttributeCount],
+ AliHLTUInt64_t* status,
+ const AliRawDataHeader** cdh,
+ AliHLTReadoutList* readoutlist,
+ bool printErrors = false
+ );
+
+ /**
+ * Extracts the readout list from a trigger data structure.
+ * @param [in] trigData The trigger data as passed to the DoProcessing method.
+ * @param [out] list The output readout list to fill.
+ * @param [in] printErrors If true then error messages are generated as necessary
+ * and suppressed otherwise.
+ * @return zero on success or one of the error codes returned by ExtractTriggerData.
+ */
+ static int GetReadoutList(
+ const AliHLTComponentTriggerData& trigData, AliHLTReadoutList& list,
+ bool printErrors = false
+ )
+ {
+ return ExtractTriggerData(trigData, NULL, NULL, NULL, &list, printErrors);
+ }
+
+ /**
+ * Extracts the event type from the given Common Data Header.
+ * @param [in] cdh The Common Data Header to extract the event type from.
+ * @return the event type code from the CDH.
+ */
+ static AliHLTUInt32_t ExtractEventTypeFromCDH(const AliRawDataHeader* cdh);
+