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 */
8 /** @file AliHLTDummyComponent.h
9 @author Timm Steinbeck, Matthias Richter
11 @brief Declaration of a dummy component. */
13 // see below for class documentation
15 // refer to README to build package
17 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
19 #include "AliHLTProcessor.h"
22 * @class AliHLTDummyComponent
23 * @brief A dummy HLT processing component.
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.
27 * <h2>General properties:</h2>
29 * Component ID: \b Dummy <br>
30 * Library: \b libAliHLTSample.so <br>
31 * Input Data Types: @ref kAliHLTAnyDataType <br>
33 * Output Data Types: depending on input blocks
35 * <h2>Mandatory arguments:</h2>
36 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
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
43 * <h2>Configuration:</h2>
44 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
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>
51 * <h2>Performance:</h2>
52 * The component does not have any event data processing.
54 * <h2>Memory consumption:</h2>
55 * The component does not have any event data processing.
57 * <h2>Output size:</h2>
58 * Output multiplier determined by option -output_percentage
60 * @ingroup alihlt_tutorial
62 class AliHLTDummyComponent : public AliHLTProcessor
65 AliHLTDummyComponent();
66 virtual ~AliHLTDummyComponent();
68 // Public functions to implement AliHLTComponent's interface.
69 // These functions are required for the registration process
71 const char* GetComponentID();
72 void GetInputDataTypes( vector<AliHLTComponentDataType>& list);
73 AliHLTComponentDataType GetOutputDataType();
74 virtual void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier );
75 AliHLTComponent* Spawn();
79 // Protected functions to implement AliHLTComponent's interface.
80 // These functions provide initialization as well as the actual processing
81 // capabilities of the component.
83 int DoInit( int argc, const char** argv );
85 int DoEvent( const AliHLTComponentEventData& evtData, const AliHLTComponentBlockData* blocks,
86 AliHLTComponentTriggerData& trigData, AliHLTUInt8_t* outputPtr,
87 AliHLTUInt32_t& size, vector<AliHLTComponentBlockData>& outputBlocks );
89 using AliHLTProcessor::DoEvent;
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
97 ClassDef(AliHLTDummyComponent, 0)