4 #ifndef ALIHLTPROCESSOR_H
5 #define ALIHLTPROCESSOR_H
6 ///* This file is property of and copyright by the *
7 ///* ALICE Experiment at CERN, All rights reserved. *
8 ///* See cxx source for full Copyright notice *
10 /// @file AliHLTProcessor.h
11 /// @author Matthias Richter, Timm Steinbeck
13 /// @brief Base class declaration for HLT analysis components.
16 #include "AliHLTComponent.h"
19 * @class AliHLTProcessor
20 * Base class of HLT data analysis components.
21 * The class provides a common interface for the implementation of HLT data
22 * analysis components. The child class must implement the functions:
23 * - @ref DoInit (optional)
24 * - @ref DoDeinit (optional)
26 * - @ref GetComponentID
27 * - @ref GetInputDataTypes
28 * - @ref GetOutputDataType
29 * - @ref GetOutputDataSize
32 * @ingroup alihlt_component
34 class AliHLTProcessor : public AliHLTComponent {
36 /** standard constructor */
38 /** standard destructor */
39 virtual ~AliHLTProcessor();
42 * Event processing function.
43 * The method is called by the framework to process one event. After
44 * preparation of data structures. The call is redirected to DoEvent.
45 * @return neg. error code if failed
47 int DoProcessing( const AliHLTComponentEventData& evtData,
48 const AliHLTComponentBlockData* blocks,
49 AliHLTComponentTriggerData& trigData,
50 AliHLTUInt8_t* outputPtr,
52 AliHLTComponentBlockDataList& outputBlocks,
53 AliHLTComponentEventDoneData*& edd );
55 // Information member functions for registration.
58 * Return @ref AliHLTComponent::kProcessor type as component type.
59 * @return component type id
61 TComponentType GetComponentType() { return AliHLTComponent::kProcessor;}
65 * The low-level data processing method for the component.
66 * This is the custom processing method and can be overloaded by
68 * @param [in] evtData event data structure
69 * @param [in] blocks input data block descriptors
70 * @param [in] trigData trigger data structure
71 * @param [in] outputPtr pointer to target buffer
72 * @param [in,out] size <i>input</i>: size of target buffer
73 * <i>output</i>:size of produced data
74 * @param [in] outputBlocks list to receive output block descriptors
75 * @return neg. error code if failed <br>
76 * -ENOSPC output buffer too small
78 virtual int DoEvent( const AliHLTComponentEventData& evtData,
79 const AliHLTComponentBlockData* blocks,
80 AliHLTComponentTriggerData& trigData,
81 AliHLTUInt8_t* outputPtr,
83 AliHLTComponentBlockDataList& outputBlocks );
86 * The high-level data processing method.
87 * This is the default processing method; the method is called
88 * if no low level @ref DoEvent method is overloaded by the component.
89 * @param evtData event data structure
90 * @param trigData trigger data structure
91 * @return neg. error code if failed
93 virtual int DoEvent( const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData);
95 // collection of debug counters
96 struct AliHLTProcessorCounters {
97 AliHLTProcessorCounters() : fReadoutFilter(0), fMonitoringFilter(0), fMonitoringEvent(0), fMismatch(0) {}
98 int fReadoutFilter; // counter for the EDD readout filter
99 int fMonitoringFilter; // counter for the EDD monitoring filter
100 int fMonitoringEvent; // counter for the EDD monitoring event
101 int fMismatch; // counter for EDD format mismatch
105 /// copy contructor prohibited
106 AliHLTProcessor(const AliHLTProcessor&);
107 /// assignment operator prohibited
108 AliHLTProcessor& operator=(const AliHLTProcessor&);
110 AliHLTProcessorCounters* fpDebugCounters; // optional debugging counters
112 ClassDef(AliHLTProcessor, 2)