3 #ifndef ALIHLTTPCDATACOMPRESSIONCOMPONENT_H
4 #define ALIHLTTPCDATACOMPRESSIONCOMPONENT_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 *
9 /// @file AliHLTTPCDataCompressionComponent.h
10 /// @author Matthias Richter
12 /// @brief TPC component for data compression
15 #include "AliHLTProcessor.h"
18 class AliHLTComponentBenchmark;
19 class AliHLTSpacePointContainer;
20 class AliHLTDataDeflater;
24 * @class AliHLTTPCDataCompressionComponent
25 * One single component to carry out different types and levels of compression
28 * <h2>General properties:</h2>
30 * Component ID: \b TPCDataCompressor <br>
31 * Library: \b libAliHLTTPC.so <br>
32 * Input Data Types: <br>
33 * - AliHLTTPCDefinitions::fgkHWClustersDataType
34 * - AliHLTTPCDefinitions::fgkClustersDataType
35 * - kAliHLTDataTypeTrack|kAliHLTDataOriginTPC
36 * Output Data Types: none <br>
38 * <h2>Mandatory arguments:</h2>
39 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
41 * <h2>Optional arguments:</h2>
42 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
43 * \li -mode <i> number </i> <br>
45 * \li -deflater-mode <i> number </i> <br>
47 * \li -histogram-file <i> file </i> <br>
48 * file to store internal histograms at the end
50 * <h2>Configuration:</h2>
51 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
53 * <h2>Default CDB entries:</h2>
55 * <h2>Performance:</h2>
57 * <h2>Memory consumption:</h2>
59 * <h2>Output size:</h2>
64 class AliHLTTPCDataCompressionComponent : public AliHLTProcessor {
66 /// standard constructor
67 AliHLTTPCDataCompressionComponent();
69 ~AliHLTTPCDataCompressionComponent();
71 /// inherited from AliHLTComponent: id of the component
72 virtual const char* GetComponentID();
74 /// inherited from AliHLTComponent: list of data types in the vector reference
75 void GetInputDataTypes( AliHLTComponentDataTypeList& );
77 /// inherited from AliHLTComponent: output data type of the component.
78 AliHLTComponentDataType GetOutputDataType();
80 /// inherited from AliHLTComponent: multiple output data types of the component.
81 int GetOutputDataTypes(AliHLTComponentDataTypeList& tgtList);
83 /// inherited from AliHLTComponent: output data size estimator
84 void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier );
86 /// inherited from AliHLTComponent: spawn function.
87 virtual AliHLTComponent* Spawn();
101 /// inherited from AliHLTProcessor: data processing
102 int DoEvent( const AliHLTComponentEventData& evtData,
103 const AliHLTComponentBlockData* blocks,
104 AliHLTComponentTriggerData& trigData,
105 AliHLTUInt8_t* outputPtr,
106 AliHLTUInt32_t& size,
107 AliHLTComponentBlockDataList& outputBlocks );
108 using AliHLTProcessor::DoEvent;
110 /// inherited from AliHLTComponent: component initialisation and argument scan.
111 int DoInit( int argc, const char** argv );
113 /// inherited from AliHLTComponent: component cleanup
116 /// inherited from AliHLTComponent: argument scan
117 int ScanConfigurationArgument(int argc, const char** argv);
120 AliHLTTPCDataCompressionComponent(const AliHLTTPCDataCompressionComponent&);
121 AliHLTTPCDataCompressionComponent& operator=(const AliHLTTPCDataCompressionComponent&);
123 int InitDeflater(int mode);
125 AliHLTComponentBenchmark* GetBenchmarkInstance() const {return fpBenchmark;}
128 int fDeflaterMode; //! deflater mode
130 /// input raw cluster handler
131 AliHLTSpacePointContainer* fRawInputClusters; //! input raw cluster handler
132 /// input cluster handler
133 AliHLTSpacePointContainer* fInputClusters; //! input cluster handler
136 AliHLTDataDeflater* fpDataDeflater; //! deflater for raw clusters
138 /// compression factor histogram
139 TH1F* fHistoCompFactor; //! histogram of compression factor
140 TString fHistogramFile; //! file to save histogram
143 AliHLTComponentBenchmark* fpBenchmark; //! benchmark instance
145 ClassDef(AliHLTTPCDataCompressionComponent, 0)
148 #endif //ALIHLTTPCDATACOMPRESSIONCOMPONENT_H