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();
36 /** standard constructor prohibited */
38 /** copy constructor prohibited */
39 AliHLTOUTTask(const AliHLTOUTTask&);
40 /** assignment operator prohibited */
41 AliHLTOUTTask& operator=(const AliHLTOUTTask&);
44 * Custom initialization for child tasks.
45 * Create and init the dummy task.
47 int CustomInit(AliHLTComponentHandler* pCH);
50 * Custom clean up for child tasks.
55 * Generate the index of the HLTOUT data.
56 * Must be implemented by the child classes.
61 * Cleanup and reset the data input.
67 * @param index [in] index of the block
68 * @param pBuffer [out] buffer of the selected data block
69 * @param size [out] size of the selected data block
71 int GetDataBuffer(AliHLTUInt32_t index, const AliHLTUInt8_t* &pBuffer,
72 AliHLTUInt32_t& size);
75 * Check byte order of data block
77 AliHLTOUTByteOrder CheckBlockByteOrder(AliHLTUInt32_t index);
80 * Check alignment of data block
82 int CheckBlockAlignment(AliHLTUInt32_t index, AliHLTOUT::AliHLTOUTDataType type);
84 /** a dummy task to pretend existence of a consumer */
85 AliHLTTask* fpDummyTask; //!transient
87 /** the configuration for the dummy task */
88 AliHLTConfiguration* fpDummyConfiguration; //!transient
90 /** list of block descriptors of the output */
91 AliHLTComponentBlockDataList fBlockDescList;
93 ClassDef(AliHLTOUTTask, 0)