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 */
10 /** @file AliHLTTPCDigitPublisherComponent.h
11 @author Matthias Richter
13 @brief TPC digit publisher component (input from offline).
16 // see below for class documentation
18 // refer to README to build package
20 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
22 #include "AliHLTOfflineDataSource.h"
24 class AliHLTTPCFileHandler;
27 * @class AliHLTTPCDigitPublisherComponent
28 * A digit publisher component for the TPC.
30 * Component ID: \b TPCDigitPublisher <br>
31 * Library: \b libAliHLTTPC.
33 * Mandatory arguments: <br>
34 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
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
40 * Optional arguments:<br>
43 * @ingroup alihlt_system
45 class AliHLTTPCDigitPublisherComponent : public AliHLTOfflineDataSource {
47 /** standard constructor */
48 AliHLTTPCDigitPublisherComponent();
50 virtual ~AliHLTTPCDigitPublisherComponent();
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)
58 const char* GetComponentID();
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
65 AliHLTComponentDataType GetOutputDataType();
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
72 * @param inputMultiplier <i>return</i>: multiplication ratio
73 * @return values in the reference variables
75 void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier );
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
83 virtual AliHLTComponent* Spawn();
87 using AliHLTOfflineDataSource::GetEvent;
92 int DoInit( int argc, const char** argv );
100 * Data source method.
101 * @param evtData event data structure
102 * @param trigData trigger data structure
103 * @param outputPtr pointer to target buffer
104 * @param size <i>input</i>: size of target buffer
105 * <i>output</i>:size of produced data
106 * @param outputBlocks list to receive output block descriptors
107 * @return neg. error code if failed
109 int GetEvent( const AliHLTComponentEventData& evtData,
110 AliHLTComponentTriggerData& trigData,
111 AliHLTUInt8_t* outputPtr,
112 AliHLTUInt32_t& size,
113 vector<AliHLTComponentBlockData>& outputBlocks );
116 /** copy constructor prohibited */
117 AliHLTTPCDigitPublisherComponent(const AliHLTTPCDigitPublisherComponent&);
118 /** assignment operator prohibited */
119 AliHLTTPCDigitPublisherComponent& operator=(const AliHLTTPCDigitPublisherComponent&);
121 /** max output block size, estimate during DoInit */
122 UInt_t fMaxSize; //!transient
124 /** first slice (range of slices currently not implemented) */
125 int fMinSlice; //!transient
127 /** first partition (range of partitions currently not implemented) */
128 int fMinPart; //!transient
130 /** instance of the file handler */
131 static AliHLTTPCFileHandler* fgpFileHandler; //!transient
133 /** no of file handler instances */
134 static int fgFileHandlerInstances; //!transient
136 /** event no the file handler is currently initialized for */
137 static int fgCurrEvent; //!transient
139 ClassDef(AliHLTTPCDigitPublisherComponent, 0);