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 #include "AliHLTOfflineDataSource.h"
18 class AliHLTTPCFileHandler;
21 * @class AliHLTTPCDigitPublisherComponent
22 * A digit publisher component for the TPC.
24 * Component ID: \b TPCDigitPublisher <br>
25 * Library: \b libAliHLTTPC.
27 * Mandatory arguments: <br>
28 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formating -->
29 * \li -slice <i> no </i> <br>
30 * TPC slice no (slice = inner + outer sector)
31 * \li -partition <i> no </i> <br>
32 * readout partition no
34 * Optional arguments:<br>
37 * @ingroup alihlt_system
39 class AliHLTTPCDigitPublisherComponent : public AliHLTOfflineDataSource {
41 /** standard constructor */
42 AliHLTTPCDigitPublisherComponent();
44 virtual ~AliHLTTPCDigitPublisherComponent();
47 * Get the id of the component.
48 * Each component is identified by a unique id.
49 * The function is pure virtual and must be implemented by the child class.
50 * @return component id (string)
52 const char* GetComponentID();
55 * Get the output data type of the component.
56 * The function is pure virtual and must be implemented by the child class.
57 * @return output data type
59 AliHLTComponentDataType GetOutputDataType();
62 * Get a ratio by how much the data volume is shrinked or enhanced.
63 * The function is pure virtual and must be implemented by the child class.
64 * @param constBase <i>return</i>: additive part, independent of the
66 * @param inputMultiplier <i>return</i>: multiplication ratio
67 * @return values in the reference variables
69 void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier );
73 * Each component must implement a spawn function to create a new instance of
74 * the class. Basically the function must return <i>new <b>my_class_name</b></i>.
75 * @return new class instance
77 virtual AliHLTComponent* Spawn();
83 int DoInit( int argc, const char** argv );
92 * @param evtData event data structure
93 * @param trigData trigger data structure
94 * @param outputPtr pointer to target buffer
95 * @param size <i>input</i>: size of target buffer
96 * <i>output</i>:size of produced data
97 * @param outputBlocks list to receive output block descriptors
98 * @return neg. error code if failed
100 int GetEvent( const AliHLTComponentEventData& evtData,
101 AliHLTComponentTriggerData& trigData,
102 AliHLTUInt8_t* outputPtr,
103 AliHLTUInt32_t& size,
104 vector<AliHLTComponentBlockData>& outputBlocks );
107 /** copy constructor prohibited */
108 AliHLTTPCDigitPublisherComponent(const AliHLTTPCDigitPublisherComponent&);
109 /** assignment operator prohibited */
110 AliHLTTPCDigitPublisherComponent& operator=(const AliHLTTPCDigitPublisherComponent&);
112 /** max output block size, estimate during DoInit */
113 Int_t fMaxSize; //!transient
115 /** first slice (range of slices currently not implemented) */
116 int fMinSlice; //!transient
118 /** first partition (range of partitions currently not implemented) */
119 int fMinPart; //!transient
121 /** instance of the file handler */
122 static AliHLTTPCFileHandler* fpFileHandler; //!transient
124 /** no of file handler instances */
125 static int fFileHandlerInstances; //!transient
127 /** event no the file handler is currently initialized for */
128 static int fCurrEvent; //!transient
130 ClassDef(AliHLTTPCDigitPublisherComponent, 0);