4 #ifndef ALIHLTVZEROAGENT_H
5 #define ALIHLTVZEROAGENT_H
7 /* This file is property of and copyright by the ALICE HLT Project *
8 * ALICE Experiment at CERN, All rights reserved. *
9 * See cxx source for full Copyright notice */
11 /** @file AliHLTVZEROAgent.h
12 @author Jochen Thaeder <jochen@thaeder.de>
13 @brief Agent of the libAliHLTVZERO library
16 // see below for class documentation
18 // refer to README to build package
20 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
22 #include "AliHLTModuleAgent.h"
25 * @class AliHLTVZEROAgent
26 * This is the agent for the AliHLTVZERO library.<br>
28 * The sample agent implements all interface function provided by @ref
30 * - CreateConfigurations() <br>
31 * The method gets an instance of the AliHLTConfigurationHanler to add
32 * configurations, e.g.
34 * handler->CreateConfiguration("my-puplisher" , "FilePublisher", NULL , "data.bin");
36 * handler->CreateConfiguration("my-analysis-chain" , "FileWriter", "my-processor" , "my arguments");
38 * - GetReconstructionChains() <br>
39 * returns a string of blank separated configurations to be run during
40 * local event reconstruction.
42 * return "my-data-sink my-analysis-chain";
44 * - GetRequiredComponentLibraries() <br>
45 * returns a string of blank separated libraries which have to be loaded
46 * in addition in order to load all required components. <br>
47 * @note Not the right place for library dependencies.
49 * return "libAliHLTUtil.so";
51 * - RegisterComponents() <br>
52 * registers the components: AliHLTDummyComponent, AliHLTSampleComponent1,
53 * AliHLTSampleComponent2, and AliHLTSampleMonitoringComponent<br>
54 * - GetHandlerDescription() <br>
55 * Handles HLTOUT data blocks of type {DDL_RAW,SMPL}
57 * if (dt==(kAliHLTDataTypeDDLRaw|kAliHLTDataOriginSample)) {
58 * desc=AliHLTOUTHandlerDesc(kRawReader, dt, GetModuleId());
62 * - GetOutputHandler() <br>
63 * Returns handler AliHLTOUTHandlerEquId for HLTOUT data blocks of
66 * if (dt==(kAliHLTDataTypeDDLRaw|kAliHLTDataOriginSample)) {
67 * return new AliHLTOUTHandlerEquId;
70 * - DeleteOutputHandler() <br>
71 * Deletes the output handler. In this case there is no special handling
74 * In order to hook the sample library up to the HLT system on global object
75 * @ref gAliHLTVZEROAgent of the agent is defined in the source code.
77 * @ingroup alihlt_system
79 class AliHLTVZEROAgent : public AliHLTModuleAgent {
83 * ---------------------------------------------------------------------------------
84 * Constructor / Destructor
85 * ---------------------------------------------------------------------------------
89 * standard constructor. The agent is automatically registered in the
90 * global agent manager
95 virtual ~AliHLTVZEROAgent();
98 * ---------------------------------------------------------------------------------
99 * Public functions to implement AliHLTModuleAgent's interface.
100 * These functions are required for the registration process
101 * ---------------------------------------------------------------------------------
104 UInt_t GetDetectorMask() const;
107 * Register all configurations belonging to the VZERO library with the
108 * AliHLTConfigurationHandler.
109 * @param handler [in] the configuration handler
110 * @param rawReader [in] AliRoot RawReader instance
111 * @param runloader [in] AliRoot runloader
112 * @return neg. error code if failed
114 Int_t CreateConfigurations(AliHLTConfigurationHandler* handler,
115 AliRawReader* rawReader=NULL,
116 AliRunLoader* runloader=NULL) const;
119 * Get the top configurations for local event reconstruction.
120 * A top configuration describes a processing chain. It can simply be
121 * described by the last configuration(s) in the chain.
122 * @param rawReader [in] AliRoot RawReader instance
123 * @param runloader [in] AliRoot runloader
124 * @return string containing the top configurations separated by blanks
126 const Char_t* GetReconstructionChains(AliRawReader* rawReader=NULL,
127 AliRunLoader* runloader=NULL) const;
130 * Component libraries which the configurations of this agent depend on.
131 * @return list of component libraries as a blank-separated string.
133 const Char_t* GetRequiredComponentLibraries() const;
136 * Register components for the AliHLTVZERO library.
137 * @param pHandler [in] instance of the component handler
139 Int_t RegisterComponents(AliHLTComponentHandler* pHandler) const;
141 /** interface function, see @ref AliHLTModuleAgent for description */
142 Int_t GetHandlerDescription(AliHLTComponentDataType dt, AliHLTUInt32_t spec,
143 AliHLTOUTHandlerDesc& desc) const;
145 /** interface function, see @ref AliHLTModuleAgent for description */
146 AliHLTOUTHandler* GetOutputHandler(AliHLTComponentDataType dt, AliHLTUInt32_t spec);
148 /** interface function, see @ref AliHLTModuleAgent for description */
149 Int_t DeleteOutputHandler(AliHLTOUTHandler* pInstance);
151 /** interface function, see @ref AliHLTModuleAgent for description */
152 AliHLTModulePreprocessor* GetPreprocessor();
156 ///////////////////////////////////////////////////////////////////////////////////
161 * ---------------------------------------------------------------------------------
162 * Private functions to implement AliHLTModuleAgent's interface.
163 * These functions provide initialization as well as the actual processing
164 * capabilities of the component.
165 * ---------------------------------------------------------------------------------
168 /** copy constructor prohibited */
169 AliHLTVZEROAgent(const AliHLTVZEROAgent&);
171 /** assignment operator prohibited */
172 AliHLTVZEROAgent& operator=(const AliHLTVZEROAgent&);
175 * ---------------------------------------------------------------------------------
177 * ---------------------------------------------------------------------------------
180 /** ROOT specific member definition */
181 ClassDef(AliHLTVZEROAgent, 0);