]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/TPCLib/tracking-ca/AliHLTTPCCAInputDataCompressorComponent.h
Now the TPC clusterfinder produces a special compressed input for the CA tracker,
[u/mrichter/AliRoot.git] / HLT / TPCLib / tracking-ca / AliHLTTPCCAInputDataCompressorComponent.h
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 class AliHLTTPCClusterData;
14
15 /**
16  * @class AliHLTTPCCAInputDataCompressorComponent
17  *
18  * The component produces a compressed TPC data for the Cellular Automaton tracker.
19  * Can be optionally used after the clusterfinder.
20  * It extracts from HLT clusters information needed by the tracker, and skips the rest.
21  * The compress ratio is about 4.7 times
22  * 
23  */
24 class AliHLTTPCCAInputDataCompressorComponent : public AliHLTProcessor
25 {
26   public:
27     /** standard constructor */
28     AliHLTTPCCAInputDataCompressorComponent();
29
30     /** dummy copy constructor, defined according to effective C++ style */
31     AliHLTTPCCAInputDataCompressorComponent( const AliHLTTPCCAInputDataCompressorComponent& );
32
33     /** dummy assignment op, but defined according to effective C++ style */
34     AliHLTTPCCAInputDataCompressorComponent& operator=( const AliHLTTPCCAInputDataCompressorComponent& );
35
36     /** standard destructor */
37     virtual ~AliHLTTPCCAInputDataCompressorComponent();
38
39     // Public functions to implement AliHLTComponent's interface.
40     // These functions are required for the registration process
41
42     /** @see component interface @ref AliHLTComponent::GetComponentID */
43     const char* GetComponentID() ;
44
45     /** @see component interface @ref AliHLTComponent::GetInputDataTypes */
46     void GetInputDataTypes( vector<AliHLTComponentDataType>& list )  ;
47
48     /** @see component interface @ref AliHLTComponent::GetOutputDataType */
49     AliHLTComponentDataType GetOutputDataType() ;
50
51     /** @see component interface @ref AliHLTComponent::GetOutputDataSize */
52     virtual void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier ) ;
53
54     /** @see component interface @ref AliHLTComponent::Spawn */
55     AliHLTComponent* Spawn() ;
56
57   static int Compress( AliHLTTPCClusterData* inputPtr,
58                        AliHLTUInt32_t maxBufferSize,
59                        AliHLTUInt8_t* outputPtr,
60                        AliHLTUInt32_t& outputSize
61                        );
62
63   protected:
64
65     // Protected functions to implement AliHLTComponent's interface.
66     // These functions provide initialization as well as the actual processing
67     // capabilities of the component.
68
69     /** @see component interface @ref AliHLTComponent::DoInit */
70     int DoInit( int argc, const char** argv );
71
72     /** @see component interface @ref AliHLTComponent::DoDeinit */
73     int DoDeinit();
74
75     /** reconfigure **/
76     int Reconfigure( const char* cdbEntry, const char* chainId );
77
78     /** @see component interface @ref AliHLTProcessor::DoEvent */
79     int DoEvent( const AliHLTComponentEventData& evtData, const AliHLTComponentBlockData* blocks,
80                  AliHLTComponentTriggerData& trigData, AliHLTUInt8_t* outputPtr,
81                  AliHLTUInt32_t& size, vector<AliHLTComponentBlockData>& outputBlocks );
82
83   private:
84
85     double fTotalTime; //* total time for DoEvent() [s]
86     double fTotalInputSize; //* total input size in [bytes]
87     double fTotalOutputSize; //* total output size in [bytes]
88     Long_t fNEvents;  //* number of reconstructed events
89
90     ClassDef( AliHLTTPCCAInputDataCompressorComponent, 0 );
91 };
92 #endif