macros to add AOD and MC handler
[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;
6776da52 19class AliHLTDataInflater;
eb51a006 20class AliHLTTPCTrackGeometry;
76c437dc 21class TH1;
22class TH2;
23
24/**
25 * @class AliHLTTPCDataCompressionMonitorComponent
26 *
27 * <h2>General properties:</h2>
28 *
29 * Component ID: \b TPCDataCompressorMonitor <br>
30 * Library: \b libAliHLTTPC.so <br>
31 * Input Data Types: <br>
32 * Output Data Types: <br>
33 *
34 * <h2>Mandatory arguments:</h2>
35 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
36 *
37 * <h2>Optional arguments:</h2>
38 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
39
40 * <h2>Configuration:</h2>
41 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
42 *
43 * <h2>Default CDB entries:</h2>
44 *
45 * <h2>Performance:</h2>
46 *
47 * <h2>Memory consumption:</h2>
48 *
49 * <h2>Output size:</h2>
50 *
51 *
52 * @ingroup alihlt_tpc
53 */
54class AliHLTTPCDataCompressionMonitorComponent : public AliHLTProcessor {
55public:
56 /// standard constructor
57 AliHLTTPCDataCompressionMonitorComponent();
58 /// destructor
59 ~AliHLTTPCDataCompressionMonitorComponent();
60
61 /// inherited from AliHLTComponent: id of the component
62 virtual const char* GetComponentID();
63
64 /// inherited from AliHLTComponent: list of data types in the vector reference
65 void GetInputDataTypes( AliHLTComponentDataTypeList& );
66
67 /// inherited from AliHLTComponent: output data type of the component.
68 AliHLTComponentDataType GetOutputDataType();
69
70 /// inherited from AliHLTComponent: multiple output data types of the component.
71 int GetOutputDataTypes(AliHLTComponentDataTypeList& tgtList);
72
73 /// inherited from AliHLTComponent: output data size estimator
74 void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier );
75
76 /// inherited from AliHLTComponent: spawn function.
77 virtual AliHLTComponent* Spawn();
78
79 enum {
80 kHaveRawData = 0x1,
81 kHaveHWClusters = 0x2
82 };
83
84protected:
85 /// inherited from AliHLTProcessor: data processing
86 int DoEvent( const AliHLTComponentEventData& evtData,
87 const AliHLTComponentBlockData* blocks,
88 AliHLTComponentTriggerData& trigData,
89 AliHLTUInt8_t* outputPtr,
90 AliHLTUInt32_t& size,
91 AliHLTComponentBlockDataList& outputBlocks );
92 using AliHLTProcessor::DoEvent;
93
94 /// inherited from AliHLTComponent: component initialisation and argument scan.
95 int DoInit( int argc, const char** argv );
96
97 /// inherited from AliHLTComponent: component cleanup
98 int DoDeinit();
99
100 /// inherited from AliHLTComponent: argument scan
101 int ScanConfigurationArgument(int argc, const char** argv);
102
103private:
104 AliHLTTPCDataCompressionMonitorComponent(const AliHLTTPCDataCompressionMonitorComponent&);
105 AliHLTTPCDataCompressionMonitorComponent& operator=(const AliHLTTPCDataCompressionMonitorComponent&);
106
6776da52 107 int ReadRemainingClustersCompressed(const AliHLTUInt8_t* pData, int dataSize, AliHLTUInt32_t specification);
108 int ReadRemainingClustersCompressed(AliHLTDataInflater* pInflater, int nofClusters, AliHLTUInt32_t specification);
109
eb51a006 110 int ReadTrackModelClustersCompressed(const AliHLTUInt8_t* pData, int dataSize, AliHLTUInt32_t specification);
111 int ReadTrackClustersCompressed(AliHLTDataInflater* pInflater, AliHLTTPCTrackGeometry* pTrackPoints);
112
113 AliHLTDataInflater* CreateInflater(int deflater, int mode) const;
6776da52 114
76c437dc 115 AliHLTTPCHWCFData* fpHWClusterDecoder; //! data decoder for HW clusters
116
117 TH2* fHistoHWCFDataSize; //! hwcf data size vs. event size
118 TH2* fHistoHWCFReductionFactor; //! reduction factor vs. event size
119 TH2* fHistoNofClusters; //! number of clusters vs. event size
120 TString fHistogramFile; //! file to save histogram
121
122 /// verbosity
123 int fVerbosity; //! verbosity for debug printout
124 unsigned fFlags; //! flags to indicate various conditions
125
126 ClassDef(AliHLTTPCDataCompressionMonitorComponent, 0)
127};
128
129#endif //ALIHLTTPCDATACOMPRESSIONMONITORCOMPONENT_H