]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/SampleLib/AliHLTSampleComponent1.h
fixes in MC labels,extra debug output
[u/mrichter/AliRoot.git] / HLT / SampleLib / AliHLTSampleComponent1.h
CommitLineData
5045badf 1//-*- Mode: C++ -*-
289c6c1a 2// $Id$
c5318542 3#ifndef ALIHLTSAMPLECOMPONENT1_H
4#define ALIHLTSAMPLECOMPONENT1_H
5045badf 5
6//* This file is property of and copyright by the ALICE HLT Project *
7//* ALICE Experiment at CERN, All rights reserved. *
8//* See cxx source for full Copyright notice */
c5318542 9
289c6c1a 10// @file AliHLTSampleComponent1.h
11// @author Matthias Richter, Timm Steinbeck
12// @date
13// @brief A sample processing component for the HLT.
14//
c5318542 15
16#include "AliHLTProcessor.h"
17
b22e91eb 18/**
19 * @class AliHLTSampleComponent1
5045badf 20 * An HLT sample component.
aa7f26de 21 * This component does not any data processing at all. It just
22 * illustrates the existence of several components in ine library and
23 * allows to set up a very simple chain with different components.
289c6c1a 24 * Component illustrates the basic functionality and component initialization.
25 * See @ref sample-component1.C
5045badf 26 *
8f30c1ea 27 * <h2>General properties:</h2>
28 *
5045badf 29 * Component ID: \b Sample-component1 <br>
8f30c1ea 30 * Library: \b libAliHLTSample.so <br>
31 * Input Data Types: @ref kAliHLTAnyDataType <br>
32 * Output Data Types: none <br>
5045badf 33 *
8f30c1ea 34 * <h2>Mandatory arguments:</h2>
1ac82ce6 35 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
5045badf 36 * \li -mandatory1 <i> teststring </i> <br>
37 * an argument with one parameter
38 * \li -mandatory2 <br>
39 * an argument without parameters
40 *
289c6c1a 41 * <h2>Optional configuration arguments:</h2>
1ac82ce6 42 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
5045badf 43 * \li -config1 <i> teststring </i> <br>
44 * a configuration argument with one parameter
45 * \li -config2 <br>
46 * a configuration argument without parameters
47 *
8f30c1ea 48 * <h2>Default CDB entries:</h2>
49 * The component has just one default CDB entry in
50 * <tt>HLT/ConfigSample/SampleComponent1</tt>.
51 * It does not load any configuration from the global <tt>ConfigHLT</tt>
52 * folder.
53 * \li -TObjString object holding a string with the configuration parameters
54 * explained above
55 *
56 * <h2>Performance:</h2>
57 * The component does not any event data processing.
58 *
59 * <h2>Memory consumption:</h2>
60 * The component does not any event data processing.
61 *
62 * <h2>Output size:</h2>
63 * The component has no output data.
64 *
5045badf 65 * Furthermore it illustrates the component argument scanning and the
66 * component configuration. There are actually two methods to init/
67 * configure a component:
68 * - via command line arguments. The arguments are specified in the HLT
69 * chain configuration and are passed to the component during
70 * initialization in @ref DoInit()
71 * - from a CDB entry. The CDB can contain configuration objects for a
72 * component and the component can implement the handling
73 *
74 * The component implements the @ref alihltcomponent-low-level-interface.
75 * for data processing.
76 *
77 * Using the latter case, a component can also be reconfigured. Special
78 * events are propageted through the chain in order to trigger the re-
79 * configuration. The component needs to implement the function
80 * @ref Reconfigure(). The simplest version of a configuration object is
81 * a string object (TObjString) containing configuration arguments.
82 *
b22e91eb 83 * @ingroup alihlt_tutorial
84 */
c5318542 85class AliHLTSampleComponent1 : public AliHLTProcessor {
86public:
87 AliHLTSampleComponent1();
88 virtual ~AliHLTSampleComponent1();
89
5045badf 90 // AliHLTComponent interface functions
289c6c1a 91 const char* GetComponentID();
92 void GetInputDataTypes( vector<AliHLTComponentDataType>& list);
93 AliHLTComponentDataType GetOutputDataType();
94 virtual void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier );
95 void GetOCDBObjectDescription( TMap* const targetArray);
c5318542 96
97 // Spawn function, return new class instance
289c6c1a 98 AliHLTComponent* Spawn();
c5318542 99
100 protected:
5045badf 101 // AliHLTComponent interface functions
c5318542 102 int DoInit( int argc, const char** argv );
103 int DoDeinit();
8ede8717 104 int DoEvent( const AliHLTComponentEventData& evtData, const AliHLTComponentBlockData* blocks,
105 AliHLTComponentTriggerData& trigData, AliHLTUInt8_t* outputPtr,
106 AliHLTUInt32_t& size, vector<AliHLTComponentBlockData>& outputBlocks );
289c6c1a 107 int ScanConfigurationArgument(int argc, const char** argv);
5045badf 108 int Reconfigure(const char* cdbEntry, const char* chainId);
b543e186 109 int ReadPreprocessorValues(const char* modules);
c5318542 110
d76bc02a 111 using AliHLTProcessor::DoEvent;
112
c5318542 113private:
c5318542 114
289c6c1a 115 int fArgument1; //!transient
116 int fArgument2; //!transient
117
118 // version no 0 -> no streamer for member variables
119 ClassDef(AliHLTSampleComponent1, 0)
c5318542 120};
121#endif