]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/CALO/offline/AliHLTCaloDigitPublisherComponent.h
end-of-line normalization
[u/mrichter/AliRoot.git] / HLT / CALO / offline / AliHLTCaloDigitPublisherComponent.h
CommitLineData
868a198e 1//-*- Mode: C++ -*-
2// @(#) $Id$
3
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 */
9
10/** @file AliHLTCaloDigitPublisherComponent.h
11 @author Matthias Richter
12 @date
13 @brief TPC digit publisher component (input from offline).
14*/
15
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
22#include "AliHLTOfflineDataSource.h"
23
24class AliHLTCaloDigitHandler;
25class AliHLTTPCFileHandler;
26
27/**
28 * @class AliHLTCaloDigitPublisherComponent
29 * A digit publisher component for the TPC.
30 *
31 * Component ID: \b CaloDigitPublisher <br>
32 * Library: \b libAliHLTCalo.
33 *
34 * Mandatory arguments: <br>
35 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
36 *
37 * Optional arguments:<br>
38 *
39 *
40 * @ingroup alihlt_system
41 */
42class AliHLTCaloDigitPublisherComponent : public AliHLTOfflineDataSource {
43 public:
44 /** standard constructor */
45 AliHLTCaloDigitPublisherComponent();
46 /** destructor */
47 virtual ~AliHLTCaloDigitPublisherComponent();
48
49 /**
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)
54 */
55 const char* GetComponentID();
56
57 /**
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
61 */
62 AliHLTComponentDataType GetOutputDataType();
63
64 /**
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
70 */
71 void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier );
72
73 /**
74 * Spawn function.
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
78 */
79 virtual AliHLTComponent* Spawn();
80
81 protected:
82
83 using AliHLTOfflineDataSource::GetEvent;
84
85 /**
86 * Init method.
87 */
88 int DoInit( int argc, const char** argv );
89
90 /**
91 * Deinit method.
92 */
93 int DoDeinit();
94
95 /**
96 * Data source method.
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
104 */
105 int GetEvent( const AliHLTComponentEventData& evtData,
106 AliHLTComponentTriggerData& trigData,
107 AliHLTUInt8_t* outputPtr,
108 AliHLTUInt32_t& size,
109 vector<AliHLTComponentBlockData>& outputBlocks );
110
111 private:
112
113 /** Digit handler */
114 AliHLTCaloDigitHandler *fDigitHandler;
115
116 /** Data specification */
117 AliHLTUInt32_t fSpecification;
118
119 /** Data type */
120 AliHLTComponentDataType fDataType;
121
122 /** Module number */
123 Int_t fModule;
124
125 /** copy constructor prohibited */
126 AliHLTCaloDigitPublisherComponent(const AliHLTCaloDigitPublisherComponent&);
127 /** assignment operator prohibited */
128 AliHLTCaloDigitPublisherComponent& operator=(const AliHLTCaloDigitPublisherComponent&);
129
130 ClassDef(AliHLTCaloDigitPublisherComponent, 0);
131};
132
133#endif