4 #ifndef ALIHLTPROCESSOR_H
5 #define ALIHLTPROCESSOR_H
6 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
7 * See cxx source for full Copyright notice */
9 /** @file AliHLTProcessor.h
10 @author Matthias Richter, Timm Steinbeck
12 @brief Base class declaration for HLT analysis components. */
14 #include "AliHLTComponent.h"
17 * @class AliHLTProcessor
18 * Base class of HLT data analysis components.
19 * The class provides a common interface for the implementation of HLT data
20 * analysis components. The child class must implement the functions:
21 * - @ref DoInit (optional)
22 * - @ref DoDeinit (optional)
24 * - @ref GetComponentID
25 * - @ref GetInputDataTypes
26 * - @ref GetOutputDataType
27 * - @ref GetOutputDataSize
30 * @ingroup alihlt_component
32 class AliHLTProcessor : public AliHLTComponent {
34 /** standard constructor */
36 /** standard destructor */
37 virtual ~AliHLTProcessor();
40 int Init( AliHLTComponentEnvironment* environ, void* environParam, int argc, const char** argv );
45 * Event processing function.
46 * The method is called by the framework to process one event. After
47 * preparation of data structures. The call is redirected to DoEvent.
48 * @return neg. error code if failed
50 int DoProcessing( const AliHLTComponentEventData& evtData,
51 const AliHLTComponentBlockData* blocks,
52 AliHLTComponentTriggerData& trigData,
53 AliHLTUInt8_t* outputPtr,
55 vector<AliHLTComponentBlockData>& outputBlocks,
56 AliHLTComponentEventDoneData*& edd );
58 // Information member functions for registration.
61 * Return @ref AliHLTComponent::kProcessor type as component type.
62 * @return component type id
64 TComponentType GetComponentType() { return AliHLTComponent::kProcessor;}
68 * The low-level data processing method for the component.
69 * This is the custom processing method and can be overloaded by
71 * @param evtData event data structure
72 * @param blocks input data block descriptors
73 * @param trigData trigger data structure
74 * @param outputPtr pointer to target buffer
75 * @param size <i>input</i>: size of target buffer
76 * <i>output</i>:size of produced data
77 * @param outputBlocks list to receive output block descriptors
78 * @return neg. error code if failed
80 virtual int DoEvent( const AliHLTComponentEventData& evtData,
81 const AliHLTComponentBlockData* blocks,
82 AliHLTComponentTriggerData& trigData,
83 AliHLTUInt8_t* outputPtr,
85 vector<AliHLTComponentBlockData>& outputBlocks );
88 * The high-level data processing method.
89 * This is the default processing method; the method is called
90 * if no low level @ref DoEvent method is overloaded by the component.
91 * @param evtData event data structure
92 * @param trigData trigger data structure
93 * @return neg. error code if failed
95 virtual int DoEvent( const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData);
97 ClassDef(AliHLTProcessor, 1)