4 #ifndef ALIHLTCALODIGITPUBLISHERCOMPONENT_H
5 #define ALIHLTCALODIGITPUBLISHERCOMPONENT_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 AliHLTCaloDigitPublisherComponent.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 AliHLTCaloDigitHandler;
25 class AliHLTTPCFileHandler;
28 * @class AliHLTCaloDigitPublisherComponent
29 * A digit publisher component for the TPC.
31 * Component ID: \b CaloDigitPublisher <br>
32 * Library: \b libAliHLTCalo.
34 * Mandatory arguments: <br>
35 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
37 * Optional arguments:<br>
40 * @ingroup alihlt_system
42 class AliHLTCaloDigitPublisherComponent : public AliHLTOfflineDataSource {
44 /** standard constructor */
45 AliHLTCaloDigitPublisherComponent();
47 virtual ~AliHLTCaloDigitPublisherComponent();
50 * Get the id of the component.
51 * Each component is identified by a unique id.
52 * The function is pure virtual and must be implemented by the child class.
53 * @return component id (string)
55 const char* GetComponentID();
58 * Get the output data type of the component.
59 * The function is pure virtual and must be implemented by the child class.
60 * @return output data type
62 AliHLTComponentDataType GetOutputDataType();
65 * Get a ratio by how much the data volume is shrinked or enhanced.
66 * The function is pure virtual and must be implemented by the child class.
67 * @param [out] constBase Additive part, independent of the input data volume.
68 * @param [out] inputMultiplier Multiplication ratio.
69 * @return values in the reference variables
71 void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier );
75 * Each component must implement a spawn function to create a new instance of
76 * the class. Basically the function must return <i>new <b>my_class_name</b></i>.
77 * @return new class instance
79 virtual AliHLTComponent* Spawn();
83 using AliHLTOfflineDataSource::GetEvent;
88 int DoInit( int argc, const char** argv );
97 * @param [in] evtData event data structure
98 * @param [in] trigData trigger data structure
99 * @param [in] outputPtr pointer to target buffer
100 * @param [in,out] size <i>input</i>: size of target buffer
101 * <i>output</i>:size of produced data
102 * @param [in] outputBlocks list to receive output block descriptors
103 * @return neg. error code if failed
105 int GetEvent( const AliHLTComponentEventData& evtData,
106 AliHLTComponentTriggerData& trigData,
107 AliHLTUInt8_t* outputPtr,
108 AliHLTUInt32_t& size,
109 vector<AliHLTComponentBlockData>& outputBlocks );
114 AliHLTCaloDigitHandler *fDigitHandler;
116 /** Data specification */
117 AliHLTUInt32_t fSpecification;
120 AliHLTComponentDataType fDataType;
125 /** copy constructor prohibited */
126 AliHLTCaloDigitPublisherComponent(const AliHLTCaloDigitPublisherComponent&);
127 /** assignment operator prohibited */
128 AliHLTCaloDigitPublisherComponent& operator=(const AliHLTCaloDigitPublisherComponent&);
130 ClassDef(AliHLTCaloDigitPublisherComponent, 0);