3 #ifndef ALIHLTOUTTASK_H
4 #define ALIHLTOUTTASK_H
5 //* This file is property of and copyright by the ALICE HLT Project *
6 //* ALICE Experiment at CERN, All rights reserved. *
7 //* See cxx source for full Copyright notice *
9 /** @file AliHLTOUTTask.h
10 @author Matthias Richter
12 @brief A special HLTOUT sibling working as a data sink in chains
15 #include "AliHLTOUT.h"
16 #include "AliHLTTask.h"
19 * @class AliHLTOUTTask
20 * A special HLTOUT sibling implementing AliHLTDataSink functionality in
21 * order to be run at the end of a reconstruction chain and generation of
22 * an HLTOUT sub-collection.
24 * The constructor takes the chains as a blank separated list of chain ids.
26 class AliHLTOUTTask : public AliHLTOUT, public AliHLTTask {
29 AliHLTOUTTask(const char* chains);
30 /** standard destructor */
31 virtual ~AliHLTOUTTask();
34 * Get string of the source chains.
36 const char* GetSourceChains() const;
41 /** standard constructor prohibited */
43 /** copy constructor prohibited */
44 AliHLTOUTTask(const AliHLTOUTTask&);
45 /** assignment operator prohibited */
46 AliHLTOUTTask& operator=(const AliHLTOUTTask&);
49 * Custom initialization for child tasks.
50 * Create and init the dummy task.
52 int CustomInit(AliHLTComponentHandler* pCH);
55 * Custom clean up for child tasks.
60 * Generate the index of the HLTOUT data.
61 * Must be implemented by the child classes.
66 * Cleanup and reset the data input.
72 * @param index [in] index of the block
73 * @param pBuffer [out] buffer of the selected data block
74 * @param size [out] size of the selected data block
76 int GetDataBuffer(AliHLTUInt32_t index, const AliHLTUInt8_t* &pBuffer,
77 AliHLTUInt32_t& size);
80 * Check byte order of data block
82 AliHLTOUTByteOrder CheckBlockByteOrder(AliHLTUInt32_t index);
85 * Check alignment of data block
87 int CheckBlockAlignment(AliHLTUInt32_t index, AliHLTOUT::AliHLTOUTDataType type);
89 /** a dummy task to pretend existence of a consumer */
90 AliHLTTask* fpDummyTask; //!transient
92 /** the configuration for the dummy task */
93 AliHLTConfiguration* fpDummyConfiguration; //!transient
95 /** list of block descriptors of the output */
96 AliHLTComponentBlockDataList fBlockDescList;
98 ClassDef(AliHLTOUTTask, 0)