]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/SampleLib/AliHLTDummyComponent.h
Cleanup: hardcoded bit operations with TPC cluster ID's removed. Instead static...
[u/mrichter/AliRoot.git] / HLT / SampleLib / AliHLTDummyComponent.h
CommitLineData
b22e91eb 1// $Id$
71d7c760 2
3#ifndef ALIHLTDUMMYCOMPONENT_H
4#define ALIHLTDUMMYCOMPONENT_H
5/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
6 * See cxx source for full Copyright notice */
7
b22e91eb 8/** @file AliHLTDummyComponent.h
9 @author Timm Steinbeck, Matthias Richter
10 @date
11 @brief Declaration of a dummy component. */
12
f32b83e1 13// see below for class documentation
14// or
15// refer to README to build package
16// or
17// visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
71d7c760 18
19#include "AliHLTProcessor.h"
20
b22e91eb 21/**
22 * @class AliHLTDummyComponent
23 * @brief A dummy HLT processing component.
24 *
25 * An implementiation of a dummy component that just copies its input data
26 * as a test, demonstration, and example of the HLT component scheme.
833b3167 27 * <h2>General properties:</h2>
28 *
29 * Component ID: \b Dummy <br>
30 * Library: \b libAliHLTSample.so <br>
31 * Input Data Types: @ref kAliHLTAnyDataType <br>
32 *
33 * Output Data Types: depending on input blocks
34 *
35 * <h2>Mandatory arguments:</h2>
36 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
37 *
38 * <h2>Optional arguments:</h2>
39 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
40 * \li -output_percentage <br>
41 * The fraction (%) of the input data to be copied to the output
42 *
43 * <h2>Configuration:</h2>
44 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
45 *
46 * <h2>Default CDB entries:</h2>
47 * The component has no default CDB entry.
48 * It does not load any configuration from the global <tt>ConfigHLT</tt>
49 * folder.
50 *
51 * <h2>Performance:</h2>
52 * The component does not have any event data processing.
53 *
54 * <h2>Memory consumption:</h2>
55 * The component does not have any event data processing.
56 *
57 * <h2>Output size:</h2>
58 * Output multiplier determined by option -output_percentage
59 *
b22e91eb 60 * @ingroup alihlt_tutorial
61 */
71d7c760 62class AliHLTDummyComponent : public AliHLTProcessor
63 {
64 public:
65 AliHLTDummyComponent();
66 virtual ~AliHLTDummyComponent();
67
68 // Public functions to implement AliHLTComponent's interface.
69 // These functions are required for the registration process
70
71 const char* GetComponentID();
8ede8717 72 void GetInputDataTypes( vector<AliHLTComponentDataType>& list);
73 AliHLTComponentDataType GetOutputDataType();
71d7c760 74 virtual void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier );
75 AliHLTComponent* Spawn();
76
77 protected:
78
79 // Protected functions to implement AliHLTComponent's interface.
80 // These functions provide initialization as well as the actual processing
81 // capabilities of the component.
82
83 int DoInit( int argc, const char** argv );
84 int DoDeinit();
8ede8717 85 int DoEvent( const AliHLTComponentEventData& evtData, const AliHLTComponentBlockData* blocks,
86 AliHLTComponentTriggerData& trigData, AliHLTUInt8_t* outputPtr,
87 AliHLTUInt32_t& size, vector<AliHLTComponentBlockData>& outputBlocks );
71d7c760 88
d76bc02a 89 using AliHLTProcessor::DoEvent;
90
71d7c760 91 private:
92
c7500dae 93 /** The size of the output data produced, as a percentage of the input data's size.
94 Can be greater than 100 (%) */
95 unsigned fOutputPercentage; // see above
71d7c760 96
97 ClassDef(AliHLTDummyComponent, 0)
98
99 };
100#endif