]>
Commit | Line | Data |
---|---|---|
ca071d0a | 1 | //-*- Mode: C++ -*- |
2 | // $Id$ | |
3 | ||
4 | /************************************************************************** | |
5 | * This file is property of and copyright by the ALICE HLT Project * | |
6 | * All rights reserved. * | |
7 | * * | |
8 | * Primary Authors: Oystein Djuvsland * | |
9 | * * | |
10 | * Permission to use, copy, modify and distribute this software and its * | |
11 | * documentation strictly for non-commercial purposes is hereby granted * | |
12 | * without fee, provided that the above copyright notice appears in all * | |
13 | * copies and that both the copyright notice and this permission notice * | |
14 | * appear in the supporting documentation. The authors make no claims * | |
15 | * about the suitability of this software for any purpose. It is * | |
16 | * provided "as is" without express or implied warranty. * | |
17 | **************************************************************************/ | |
18 | #ifndef ALIHLTEMCALDIGITMAKERCOMPONENT_H | |
19 | #define ALIHLTEMCALDIGITMAKERCOMPONENT_H | |
20 | ||
21 | /** @file AliHLTEMCALDigitMakerComponent.h | |
22 | @author Oystein Djuvsland | |
23 | @date | |
24 | @brief A digit maker component for EMCAL HLT | |
25 | */ | |
26 | ||
27 | // see below for class documentation | |
28 | // or | |
29 | // refer to README to build package | |
30 | // or | |
31 | // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt | |
32 | ||
33 | #include "AliHLTCaloProcessor.h" | |
7b3a0a0e | 34 | #include "AliHLTCaloConstantsHandler.h" |
ca071d0a | 35 | |
7b3a0a0e | 36 | class AliEMCALCalibData; |
37 | class AliCaloCalibPedestal; | |
ca071d0a | 38 | |
39 | class AliHLTCaloDigitMaker; | |
40 | class AliHLTCaloDigitContainerDataStruct; | |
41 | ||
42 | /** | |
43 | * @class AliHLTEMCALDigitMakerComponent | |
44 | * | |
45 | * Creates the digit used for the clusterizer. Digits are equivalent to the ones in | |
46 | * offline reconstruction | |
47 | * | |
48 | * <h2>General properties:</h2> | |
49 | * | |
50 | * Component ID: \b PhosDigitMaker <br> | |
51 | * Library: \b libAliHLTEMCAL.so <br> | |
52 | * Input Data Types: @ref AliHLTEMCALDefinitions::fkgChannelDataType<br> | |
53 | * Output Data Types: @ref AliHLTEMCALDefinitions::fgkDigitDataType<br> | |
54 | * | |
55 | * <h2>Mandatory arguments:</h2> | |
56 | * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting --> | |
57 | * \li No mandatory arguments for component <br> | |
58 | * | |
59 | * <h2>Optional arguments:</h2> | |
60 | * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting --> | |
61 | * \li -lowgainfactor <i> value </i> <br> | |
62 | * sets a global low gain factor | |
63 | * \li -highgainfactor <i> value </i> <br> | |
64 | * sets a global high gain factor | |
65 | * \li -reverseorder <br> | |
66 | * set if one expects the low gain channels to come before the high gain ones | |
67 | * | |
68 | * <h2>Configuration:</h2> | |
69 | * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting --> | |
70 | * \li No configuration arguments | |
71 | * | |
72 | * <h2>Default CDB entries:</h2> | |
73 | * \li No CDB entry yet, will come. | |
74 | * | |
75 | * <h2>Performance:</h2> | |
76 | * Pretty good | |
77 | * | |
78 | * <h2>Memory consumption:</h2> | |
79 | * Pretty low | |
80 | * | |
81 | * <h2>Output size:</h2> | |
82 | * Depends on the event... | |
83 | * | |
84 | * More detailed description. (Soon) | |
85 | * | |
86 | * @ingroup alihlt_emcal | |
87 | */ | |
88 | ||
7b3a0a0e | 89 | class AliHLTEMCALDigitMakerComponent : public AliHLTCaloProcessor, public AliHLTCaloConstantsHandler |
ca071d0a | 90 | { |
91 | public: | |
92 | ||
93 | /** Constructor */ | |
94 | AliHLTEMCALDigitMakerComponent(); | |
95 | ||
96 | /** Destructor */ | |
97 | virtual ~AliHLTEMCALDigitMakerComponent(); | |
98 | ||
ca071d0a | 99 | /** interface function, see @ref AliHLTComponent for description */ |
100 | const char* GetComponentID(); | |
101 | ||
102 | /** interface function, see @ref AliHLTComponent for description */ | |
103 | void GetInputDataTypes(std::vector<AliHLTComponentDataType>& list); | |
104 | ||
105 | /** interface function, see @ref AliHLTComponent for description */ | |
106 | AliHLTComponentDataType GetOutputDataType(); | |
107 | ||
108 | /** interface function, see @ref AliHLTComponent for description */ | |
109 | void GetOutputDataSize(unsigned long& constBase, double& inputMultiplier); | |
110 | ||
111 | /** interface function, see @ref AliHLTComponent for description */ | |
112 | int DoEvent(const AliHLTComponentEventData& evtData, const AliHLTComponentBlockData* blocks, | |
113 | AliHLTComponentTriggerData& trigData, AliHLTUInt8_t* outputPtr, AliHLTUInt32_t& size, | |
114 | std::vector<AliHLTComponentBlockData>& outputBlocks); | |
115 | ||
116 | /** interface function, see @ref AliHLTComponent for description */ | |
117 | AliHLTComponent* Spawn(); | |
118 | ||
119 | protected: | |
120 | ||
121 | /** interface function, see @ref AliHLTComponent for description */ | |
122 | virtual int DoInit(int argc, const char** argv); | |
123 | ||
124 | using AliHLTCaloProcessor::DoEvent; | |
125 | ||
126 | /** interface function, see @ref AliHLTComponent for description */ | |
127 | virtual int Deinit(); ////////// PTH WARNING you should Define a class AliHLTEMCALModuleProcessor | |
128 | ||
129 | // virtual int DoInit(int, const char**) {;} | |
c22f5996 | 130 | virtual int DoDeinit(){return 0;} |
f05c2d17 | 131 | |
132 | /** Get bad channel map from CDB */ | |
133 | virtual int GetBCMFromCDB(); | |
ca071d0a | 134 | |
f05c2d17 | 135 | /** Get the ADC <-> Energy (GeV) gain factors */ |
136 | virtual int GetGainsFromCDB(); | |
137 | ||
7b3a0a0e | 138 | |
ca071d0a | 139 | private: |
140 | ||
a6f9f2c0 | 141 | /** Copy constructor, prohibited */ |
142 | AliHLTEMCALDigitMakerComponent(const AliHLTEMCALDigitMakerComponent &); | |
143 | ||
144 | /** Assignment operator, prohibited */ | |
145 | AliHLTEMCALDigitMakerComponent & operator = (const AliHLTEMCALDigitMakerComponent); | |
146 | ||
ca071d0a | 147 | /** Pointer to the digit maker itself */ |
148 | AliHLTCaloDigitMaker *fDigitMakerPtr; //! transient | |
149 | ||
150 | /** The output of the component, digits in a container */ | |
151 | AliHLTCaloDigitContainerDataStruct *fDigitContainerPtr; //! transient | |
152 | ||
7b3a0a0e | 153 | /** Pedestal data (contains BCM) */ |
154 | AliCaloCalibPedestal *fPedestalData; | |
155 | ||
156 | /** Calib data (contains gain factors) */ | |
157 | AliEMCALCalibData *fCalibData; | |
158 | ||
159 | /** Is the bad map initialised? */ | |
160 | Bool_t fBCMInitialised; //! transient | |
161 | ||
162 | /** Are the gains initialised? */ | |
163 | Bool_t fGainsInitialised; //! transient | |
164 | ||
8daca632 | 165 | ClassDef(AliHLTEMCALDigitMakerComponent, 1); |
166 | ||
ca071d0a | 167 | }; |
168 | #endif | |
169 |