Line data Source code
1 : //-*- Mode: C++ -*-
2 : // ************************************************************************
3 : // This file is property of and copyright by the ALICE HLT Project *
4 : // ALICE Experiment at CERN, All rights reserved. *
5 : // See cxx source for full Copyright notice *
6 : // *
7 : //*************************************************************************
8 :
9 : #ifndef ALIHLTTPCCAINPUTDATACOMPRESSORCOMPONENT_H
10 : #define ALIHLTTPCCAINPUTDATACOMPRESSORCOMPONENT_H
11 :
12 : #include "AliHLTProcessor.h"
13 : #include "AliHLTComponentBenchmark.h"
14 :
15 : class AliHLTTPCClusterData;
16 :
17 : /**
18 : * @class AliHLTTPCCAInputDataCompressorComponent
19 : *
20 : * The component produces a compressed TPC data for the Cellular Automaton tracker.
21 : * Can be optionally used after the clusterfinder.
22 : * It extracts from HLT clusters information needed by the tracker, and skips the rest.
23 : * The compress ratio is about 4.7 times
24 : *
25 : */
26 : class AliHLTTPCCAInputDataCompressorComponent : public AliHLTProcessor
27 : {
28 : public:
29 : /** standard constructor */
30 : AliHLTTPCCAInputDataCompressorComponent();
31 :
32 : /** dummy copy constructor, defined according to effective C++ style */
33 : AliHLTTPCCAInputDataCompressorComponent( const AliHLTTPCCAInputDataCompressorComponent& );
34 :
35 : /** dummy assignment op, but defined according to effective C++ style */
36 : AliHLTTPCCAInputDataCompressorComponent& operator=( const AliHLTTPCCAInputDataCompressorComponent& );
37 :
38 : /** standard destructor */
39 : virtual ~AliHLTTPCCAInputDataCompressorComponent();
40 :
41 : // Public functions to implement AliHLTComponent's interface.
42 : // These functions are required for the registration process
43 :
44 : /** @see component interface @ref AliHLTComponent::GetComponentID */
45 : const char* GetComponentID() ;
46 :
47 : /** @see component interface @ref AliHLTComponent::GetInputDataTypes */
48 : void GetInputDataTypes( vector<AliHLTComponentDataType>& list ) ;
49 :
50 : /** @see component interface @ref AliHLTComponent::GetOutputDataType */
51 : AliHLTComponentDataType GetOutputDataType() ;
52 :
53 : /** @see component interface @ref AliHLTComponent::GetOutputDataSize */
54 : virtual void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier ) ;
55 :
56 : /** @see component interface @ref AliHLTComponent::Spawn */
57 : AliHLTComponent* Spawn() ;
58 :
59 : static int Compress( AliHLTTPCClusterData* inputPtr,
60 : AliHLTUInt32_t maxBufferSize,
61 : AliHLTUInt8_t* outputPtr,
62 : AliHLTUInt32_t& outputSize
63 : );
64 :
65 : protected:
66 :
67 : // Protected functions to implement AliHLTComponent's interface.
68 : // These functions provide initialization as well as the actual processing
69 : // capabilities of the component.
70 :
71 : /** @see component interface @ref AliHLTComponent::DoInit */
72 : int DoInit( int argc, const char** argv );
73 :
74 : /** @see component interface @ref AliHLTComponent::DoDeinit */
75 : int DoDeinit();
76 :
77 : /** reconfigure **/
78 : int Reconfigure( const char* cdbEntry, const char* chainId );
79 :
80 : /** @see component interface @ref AliHLTProcessor::DoEvent */
81 : int DoEvent( const AliHLTComponentEventData& evtData, const AliHLTComponentBlockData* blocks,
82 : AliHLTComponentTriggerData& trigData, AliHLTUInt8_t* outputPtr,
83 : AliHLTUInt32_t& size, vector<AliHLTComponentBlockData>& outputBlocks );
84 :
85 : private:
86 :
87 : AliHLTComponentBenchmark fBenchmark; // benchmarks
88 :
89 6 : ClassDef( AliHLTTPCCAInputDataCompressorComponent, 0 );
90 : };
91 : #endif
|