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