]>
Commit | Line | Data |
---|---|---|
17cc93b4 | 1 | //-*- Mode: C++ -*- |
2 | // @(#) $Id$ | |
3 | ||
4 | #ifndef ALIHLTTPCDIGITPUBLISHERCOMPONENT_H | |
5 | #define ALIHLTTPCDIGITPUBLISHERCOMPONENT_H | |
6 | /* This file is property of and copyright by the ALICE HLT Project * | |
7 | * ALICE Experiment at CERN, All rights reserved. * | |
8 | * See cxx source for full Copyright notice */ | |
9 | ||
10 | /** @file AliHLTTPCDigitPublisherComponent.h | |
11 | @author Matthias Richter | |
12 | @date | |
13 | @brief TPC digit publisher component (input from offline). | |
14 | */ | |
15 | ||
6a8e0bb4 | 16 | // see below for class documentation |
17 | // or | |
18 | // refer to README to build package | |
19 | // or | |
20 | // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt | |
21 | ||
17cc93b4 | 22 | #include "AliHLTOfflineDataSource.h" |
23 | ||
24 | class AliHLTTPCFileHandler; | |
25 | ||
26 | /** | |
27 | * @class AliHLTTPCDigitPublisherComponent | |
28 | * A digit publisher component for the TPC. | |
29 | * | |
30 | * Component ID: \b TPCDigitPublisher <br> | |
31 | * Library: \b libAliHLTTPC. | |
32 | * | |
33 | * Mandatory arguments: <br> | |
1ac82ce6 | 34 | * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting --> |
17cc93b4 | 35 | * \li -slice <i> no </i> <br> |
36 | * TPC slice no (slice = inner + outer sector) | |
37 | * \li -partition <i> no </i> <br> | |
38 | * readout partition no | |
39 | * | |
40 | * Optional arguments:<br> | |
41 | * | |
42 | * | |
43 | * @ingroup alihlt_system | |
44 | */ | |
45 | class AliHLTTPCDigitPublisherComponent : public AliHLTOfflineDataSource { | |
46 | public: | |
47 | /** standard constructor */ | |
48 | AliHLTTPCDigitPublisherComponent(); | |
49 | /** destructor */ | |
50 | virtual ~AliHLTTPCDigitPublisherComponent(); | |
51 | ||
52 | /** | |
53 | * Get the id of the component. | |
54 | * Each component is identified by a unique id. | |
55 | * The function is pure virtual and must be implemented by the child class. | |
56 | * @return component id (string) | |
57 | */ | |
58 | const char* GetComponentID(); | |
59 | ||
60 | /** | |
61 | * Get the output data type of the component. | |
62 | * The function is pure virtual and must be implemented by the child class. | |
63 | * @return output data type | |
64 | */ | |
65 | AliHLTComponentDataType GetOutputDataType(); | |
66 | ||
67 | /** | |
68 | * Get a ratio by how much the data volume is shrinked or enhanced. | |
69 | * The function is pure virtual and must be implemented by the child class. | |
70 | * @param constBase <i>return</i>: additive part, independent of the | |
71 | * input data volume | |
72 | * @param inputMultiplier <i>return</i>: multiplication ratio | |
73 | * @return values in the reference variables | |
74 | */ | |
75 | void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier ); | |
76 | ||
77 | /** | |
78 | * Spawn function. | |
79 | * Each component must implement a spawn function to create a new instance of | |
80 | * the class. Basically the function must return <i>new <b>my_class_name</b></i>. | |
81 | * @return new class instance | |
82 | */ | |
83 | virtual AliHLTComponent* Spawn(); | |
84 | ||
85 | protected: | |
5d2abf3b | 86 | |
87 | using AliHLTOfflineDataSource::GetEvent; | |
88 | ||
17cc93b4 | 89 | /** |
90 | * Init method. | |
91 | */ | |
92 | int DoInit( int argc, const char** argv ); | |
93 | ||
94 | /** | |
95 | * Deinit method. | |
96 | */ | |
97 | int DoDeinit(); | |
98 | ||
99 | /** | |
100 | * Data source method. | |
f08578f1 | 101 | * @param [in] evtData event data structure |
102 | * @param [in] trigData trigger data structure | |
103 | * @param [in] outputPtr pointer to target buffer | |
104 | * @param [in,out] size <i>input</i>: size of target buffer | |
17cc93b4 | 105 | * <i>output</i>:size of produced data |
f08578f1 | 106 | * @param [in] outputBlocks list to receive output block descriptors |
17cc93b4 | 107 | * @return neg. error code if failed |
108 | */ | |
109 | int GetEvent( const AliHLTComponentEventData& evtData, | |
110 | AliHLTComponentTriggerData& trigData, | |
111 | AliHLTUInt8_t* outputPtr, | |
112 | AliHLTUInt32_t& size, | |
113 | vector<AliHLTComponentBlockData>& outputBlocks ); | |
114 | ||
115 | private: | |
116 | /** copy constructor prohibited */ | |
117 | AliHLTTPCDigitPublisherComponent(const AliHLTTPCDigitPublisherComponent&); | |
118 | /** assignment operator prohibited */ | |
119 | AliHLTTPCDigitPublisherComponent& operator=(const AliHLTTPCDigitPublisherComponent&); | |
120 | ||
121 | /** max output block size, estimate during DoInit */ | |
a1dbf058 | 122 | UInt_t fMaxSize; //!transient |
17cc93b4 | 123 | |
124 | /** first slice (range of slices currently not implemented) */ | |
125 | int fMinSlice; //!transient | |
126 | ||
127 | /** first partition (range of partitions currently not implemented) */ | |
128 | int fMinPart; //!transient | |
129 | ||
130 | /** instance of the file handler */ | |
6a8e0bb4 | 131 | static AliHLTTPCFileHandler* fgpFileHandler; //!transient |
cae431d0 | 132 | |
133 | /** no of file handler instances */ | |
6a8e0bb4 | 134 | static int fgFileHandlerInstances; //!transient |
cae431d0 | 135 | |
136 | /** event no the file handler is currently initialized for */ | |
6a8e0bb4 | 137 | static int fgCurrEvent; //!transient |
17cc93b4 | 138 | |
139 | ClassDef(AliHLTTPCDigitPublisherComponent, 0); | |
140 | }; | |
141 | ||
142 | #endif |