adding component for monitoring the TPC data compression
[u/mrichter/AliRoot.git] / HLT / TPCLib / comp / AliHLTTPCDataCompressionMonitorComponent.h
CommitLineData
76c437dc 1//-*- Mode: C++ -*-
2// $Id$
3#ifndef ALIHLTTPCDATACOMPRESSIONMONITORCOMPONENT_H
4#define ALIHLTTPCDATACOMPRESSIONMONITORCOMPONENT_H
5//* This file is property of and copyright by the ALICE HLT Project *
6//* ALICE Experiment at CERN, All rights reserved. *
7//* See cxx source for full Copyright notice *
8
9/// @file AliHLTTPCDataCompressionMonitorComponent.h
10/// @author Matthias Richter
11/// @date 2011-09-12
12/// @brief TPC component for monitoring of data compression
13///
14
15#include "AliHLTProcessor.h"
16#include "TString.h"
17
18class AliHLTTPCHWCFData;
19class TH1;
20class TH2;
21
22/**
23 * @class AliHLTTPCDataCompressionMonitorComponent
24 *
25 * <h2>General properties:</h2>
26 *
27 * Component ID: \b TPCDataCompressorMonitor <br>
28 * Library: \b libAliHLTTPC.so <br>
29 * Input Data Types: <br>
30 * Output Data Types: <br>
31 *
32 * <h2>Mandatory arguments:</h2>
33 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
34 *
35 * <h2>Optional arguments:</h2>
36 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
37
38 * <h2>Configuration:</h2>
39 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
40 *
41 * <h2>Default CDB entries:</h2>
42 *
43 * <h2>Performance:</h2>
44 *
45 * <h2>Memory consumption:</h2>
46 *
47 * <h2>Output size:</h2>
48 *
49 *
50 * @ingroup alihlt_tpc
51 */
52class AliHLTTPCDataCompressionMonitorComponent : public AliHLTProcessor {
53public:
54 /// standard constructor
55 AliHLTTPCDataCompressionMonitorComponent();
56 /// destructor
57 ~AliHLTTPCDataCompressionMonitorComponent();
58
59 /// inherited from AliHLTComponent: id of the component
60 virtual const char* GetComponentID();
61
62 /// inherited from AliHLTComponent: list of data types in the vector reference
63 void GetInputDataTypes( AliHLTComponentDataTypeList& );
64
65 /// inherited from AliHLTComponent: output data type of the component.
66 AliHLTComponentDataType GetOutputDataType();
67
68 /// inherited from AliHLTComponent: multiple output data types of the component.
69 int GetOutputDataTypes(AliHLTComponentDataTypeList& tgtList);
70
71 /// inherited from AliHLTComponent: output data size estimator
72 void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier );
73
74 /// inherited from AliHLTComponent: spawn function.
75 virtual AliHLTComponent* Spawn();
76
77 enum {
78 kHaveRawData = 0x1,
79 kHaveHWClusters = 0x2
80 };
81
82protected:
83 /// inherited from AliHLTProcessor: data processing
84 int DoEvent( const AliHLTComponentEventData& evtData,
85 const AliHLTComponentBlockData* blocks,
86 AliHLTComponentTriggerData& trigData,
87 AliHLTUInt8_t* outputPtr,
88 AliHLTUInt32_t& size,
89 AliHLTComponentBlockDataList& outputBlocks );
90 using AliHLTProcessor::DoEvent;
91
92 /// inherited from AliHLTComponent: component initialisation and argument scan.
93 int DoInit( int argc, const char** argv );
94
95 /// inherited from AliHLTComponent: component cleanup
96 int DoDeinit();
97
98 /// inherited from AliHLTComponent: argument scan
99 int ScanConfigurationArgument(int argc, const char** argv);
100
101private:
102 AliHLTTPCDataCompressionMonitorComponent(const AliHLTTPCDataCompressionMonitorComponent&);
103 AliHLTTPCDataCompressionMonitorComponent& operator=(const AliHLTTPCDataCompressionMonitorComponent&);
104
105 AliHLTTPCHWCFData* fpHWClusterDecoder; //! data decoder for HW clusters
106
107 TH2* fHistoHWCFDataSize; //! hwcf data size vs. event size
108 TH2* fHistoHWCFReductionFactor; //! reduction factor vs. event size
109 TH2* fHistoNofClusters; //! number of clusters vs. event size
110 TString fHistogramFile; //! file to save histogram
111
112 /// verbosity
113 int fVerbosity; //! verbosity for debug printout
114 unsigned fFlags; //! flags to indicate various conditions
115
116 ClassDef(AliHLTTPCDataCompressionMonitorComponent, 0)
117};
118
119#endif //ALIHLTTPCDATACOMPRESSIONMONITORCOMPONENT_H