4 #ifndef ALIHLTALTROTIMEBINAVERAGECOMPONENT_H
5 #define ALIHLTALTROTIMEBINAVERAGECOMPONENT_H
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 *
10 /** @file AliHLTAltroTimebinAverageComponent.h
11 @author Kalliopi Kanaki, Oystein Djuvsland, Matthias Richter
16 #include "AliHLTProcessor.h"
19 * @class AliHLTAltroTimebin Averager Component
20 * The component reduces the RCU/ALTRO raw data by averaging adjacent
21 * timebins. By default, two timebins are averaged.
25 class AliHLTAltroTimebinAverageComponent : public AliHLTProcessor {
27 /** default constructor */
28 AliHLTAltroTimebinAverageComponent();
30 virtual ~AliHLTAltroTimebinAverageComponent();
33 * The id of the component.
34 * @return component id (string)
36 virtual const char* GetComponentID();
39 * Get the input data types of the component.
40 * @return list of data types in the vector reference
42 void GetInputDataTypes( AliHLTComponentDataTypeList& );
45 * Get the output data type of the component.
46 * If kAliHLTMultipleDataType is returned, the framework invokes
47 * @ref GetOutputDataTypes.
48 * @return output data type
50 AliHLTComponentDataType GetOutputDataType();
53 * Get the output data types of the component.
54 * The function can be implemented to indicate multiple output data types
55 * in the target array.
56 * @ref GetOutputDataType must return kAliHLTMultipleDataType in order
57 * to invoke this method.
58 * @param tgtList list to receive the data types
59 * @return no of output data types, data types in the target list
61 int GetOutputDataTypes(AliHLTComponentDataTypeList& tgtList);
64 * Get a ratio by how much the data volume is shrinked or enhanced.
65 * @param constBase <i>return</i>: additive part, independent of the
67 * @param inputMultiplier <i>return</i>: multiplication ratio
68 * @return values in the reference variables
70 void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier );
74 * @return new class instance
76 virtual AliHLTComponent* Spawn();
81 * Data processing method for the component.
82 * Filters the incoming data descriptors according to the rules and forwards
83 * them into the output.
84 * @return neg. error code if failed
86 int DoEvent( const AliHLTComponentEventData& evtData,
87 const AliHLTComponentBlockData* blocks,
88 AliHLTComponentTriggerData& trigData,
89 AliHLTUInt8_t* outputPtr,
91 AliHLTComponentBlockDataList& outputBlocks );
93 using AliHLTProcessor::DoEvent;
96 * Component initialisation and argument scan.
98 int DoInit( int argc, const char** argv );
106 /** copy constructor prohibited */
107 AliHLTAltroTimebinAverageComponent(const AliHLTAltroTimebinAverageComponent&);
108 /** assignment operator prohibited */
109 AliHLTAltroTimebinAverageComponent& operator=(const AliHLTAltroTimebinAverageComponent&);
111 /** First timebin to include in zerosuppression */
112 Int_t fStartTimeBin; //! transient
114 /** Lasr timebin to include in zerosuppression */
115 Int_t fEndTimeBin; //! transient
117 /** Number of timebins */
118 Int_t fNTimeBins; //! transient
120 ClassDef(AliHLTAltroTimebinAverageComponent, 0);