]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/BASE/AliHLTOUTTask.h
Implementation of kChain HLTOUT handler
[u/mrichter/AliRoot.git] / HLT / BASE / AliHLTOUTTask.h
CommitLineData
7131ea63 1//-*- Mode: C++ -*-
2// $Id$
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 *
8
9/** @file AliHLTOUTTask.h
10 @author Matthias Richter
11 @date
12 @brief A special HLTOUT sibling working as a data sink in chains
13*/
14
15#include "AliHLTOUT.h"
16#include "AliHLTTask.h"
17
18/**
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.
23 *
24 */
25class AliHLTOUTTask : public AliHLTOUT, public AliHLTTask {
26 public:
27 /** constructor */
28 AliHLTOUTTask(const char* chains);
29 /** standard destructor */
30 virtual ~AliHLTOUTTask();
31
32 protected:
33
34 private:
35 /** standard constructor prohibited */
36 AliHLTOUTTask();
37 /** copy constructor prohibited */
38 AliHLTOUTTask(const AliHLTOUTTask&);
39 /** assignment operator prohibited */
40 AliHLTOUTTask& operator=(const AliHLTOUTTask&);
41
42 /**
43 * Custom initialization for child tasks.
44 * Create and init the dummy task.
45 */
46 int CustomInit(AliHLTComponentHandler* pCH);
47
48 /**
49 * Custom clean up for child tasks.
50 */
51 int CustomCleanup();
52
53 /**
54 * Generate the index of the HLTOUT data.
55 * Must be implemented by the child classes.
56 */
57 int GenerateIndex();
58
59 /**
60 * Cleanup and reset the data input.
61 */
62 int ResetInput();
63
64 /**
65 * Get the data buffer
66 * @param index [in] index of the block
67 * @param pBuffer [out] buffer of the selected data block
68 * @param size [out] size of the selected data block
69 */
70 int GetDataBuffer(AliHLTUInt32_t index, const AliHLTUInt8_t* &pBuffer,
71 AliHLTUInt32_t& size);
72
73 /**
74 * Check byte order of data block
75 */
76 AliHLTOUTByteOrder CheckBlockByteOrder(AliHLTUInt32_t index);
77
78 /**
79 * Check alignment of data block
80 */
81 int CheckBlockAlignment(AliHLTUInt32_t index, AliHLTOUT::AliHLTOUTDataType type);
82
83 /** a dummy task to pretend existence of a consumer */
84 AliHLTTask* fpDummyTask; //!transient
85
86 /** the configuration for the dummy task */
87 AliHLTConfiguration* fpDummyConfiguration; //!transient
88
89 /** list of block descriptors of the output */
90 AliHLTComponentBlockDataList fBlockDescList;
91
92 ClassDef(AliHLTOUTTask, 0)
93};
94#endif