]>
Commit | Line | Data |
---|---|---|
1b41ab20 | 1 | //-*- Mode: C++ -*- |
2 | // $Id$ | |
3 | ||
ab38011b | 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 | **************************************************************************/ | |
209a4703 | 18 | #ifndef ALIHLTPHOSDIGITMAKERCOMPONENT_H |
19 | #define ALIHLTPHOSDIGITMAKERCOMPONENT_H | |
20 | ||
2374af72 | 21 | /** @file AliHLTPHOSDigitMakerComponent.h |
22 | @author Oystein Djuvsland | |
23 | @date | |
24 | @brief A digit maker component for PHOS 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 | |
209a4703 | 32 | |
bc304d87 | 33 | |
34 | #include "AliHLTPHOSDefinitions.h" // PTH | |
35 | #include "AliHLTCaloProcessor.h" | |
c1e4a18c | 36 | #include "AliHLTCaloConstantsHandler.h" |
209a4703 | 37 | |
ad44d760 | 38 | |
f137c3c5 | 39 | class AliHLTCaloDigitMaker; |
94cd0c06 | 40 | struct AliHLTCaloDigitContainerDataStruct; |
c1e4a18c | 41 | class AliPHOSEmcBadChannelsMap; |
42 | class AliPHOSEmcCalibData; | |
2374af72 | 43 | /** |
44 | * @class AliHLTPHOSDigitMakerComponent | |
18af2efc | 45 | * |
46 | * Creates the digit used for the clusterizer. Digits are equivalent to the ones in | |
47 | * offline reconstruction | |
48 | * | |
49 | * <h2>General properties:</h2> | |
50 | * | |
51 | * Component ID: \b PhosDigitMaker <br> | |
52 | * Library: \b libAliHLTPHOS.so <br> | |
53 | * Input Data Types: @ref AliHLTPHOSDefinitions::fkgChannelDataType<br> | |
54 | * Output Data Types: @ref AliHLTPHOSDefinitions::fgkDigitDataType<br> | |
55 | * | |
56 | * <h2>Mandatory arguments:</h2> | |
57 | * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting --> | |
58 | * \li No mandatory arguments for component <br> | |
59 | * | |
60 | * <h2>Optional arguments:</h2> | |
61 | * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting --> | |
62 | * \li -lowgainfactor <i> value </i> <br> | |
63 | * sets a global low gain factor | |
64 | * \li -highgainfactor <i> value </i> <br> | |
65 | * sets a global high gain factor | |
66 | * \li -reverseorder <br> | |
67 | * set if one expects the low gain channels to come before the high gain ones | |
68 | * | |
69 | * <h2>Configuration:</h2> | |
70 | * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting --> | |
71 | * \li No configuration arguments | |
72 | * | |
73 | * <h2>Default CDB entries:</h2> | |
74 | * \li No CDB entry yet, will come. | |
75 | * | |
76 | * <h2>Performance:</h2> | |
77 | * Pretty good | |
78 | * | |
79 | * <h2>Memory consumption:</h2> | |
80 | * Pretty low | |
2374af72 | 81 | * |
18af2efc | 82 | * <h2>Output size:</h2> |
83 | * Depends on the event... | |
2374af72 | 84 | * |
18af2efc | 85 | * More detailed description. (Soon) |
2374af72 | 86 | * |
87 | * @ingroup alihlt_phos | |
18af2efc | 88 | */ |
209a4703 | 89 | |
bc304d87 | 90 | class AliHLTPHOSDigitMakerComponent : public AliHLTCaloProcessor, public AliHLTCaloConstantsHandler |
209a4703 | 91 | { |
92 | public: | |
2374af72 | 93 | |
94 | /** Constructor */ | |
209a4703 | 95 | AliHLTPHOSDigitMakerComponent(); |
2374af72 | 96 | |
25b7f84c | 97 | /** Destructor */ |
ab38011b | 98 | virtual ~AliHLTPHOSDigitMakerComponent(); |
25b7f84c | 99 | |
2374af72 | 100 | /** interface function, see @ref AliHLTComponent for description */ |
209a4703 | 101 | const char* GetComponentID(); |
102 | ||
2374af72 | 103 | /** interface function, see @ref AliHLTComponent for description */ |
209a4703 | 104 | void GetInputDataTypes(std::vector<AliHLTComponentDataType>& list); |
105 | ||
2374af72 | 106 | /** interface function, see @ref AliHLTComponent for description */ |
209a4703 | 107 | AliHLTComponentDataType GetOutputDataType(); |
108 | ||
2374af72 | 109 | /** interface function, see @ref AliHLTComponent for description */ |
209a4703 | 110 | void GetOutputDataSize(unsigned long& constBase, double& inputMultiplier); |
111 | ||
2374af72 | 112 | /** interface function, see @ref AliHLTComponent for description */ |
ab38011b | 113 | int DoEvent(const AliHLTComponentEventData& evtData, const AliHLTComponentBlockData* blocks, |
114 | AliHLTComponentTriggerData& trigData, AliHLTUInt8_t* outputPtr, AliHLTUInt32_t& size, | |
115 | std::vector<AliHLTComponentBlockData>& outputBlocks); | |
209a4703 | 116 | |
2374af72 | 117 | /** interface function, see @ref AliHLTComponent for description */ |
209a4703 | 118 | AliHLTComponent* Spawn(); |
119 | ||
120 | protected: | |
2374af72 | 121 | |
122 | /** interface function, see @ref AliHLTComponent for description */ | |
209a4703 | 123 | int DoInit(int argc, const char** argv); |
2374af72 | 124 | |
bc304d87 | 125 | using AliHLTCaloProcessor::DoEvent; |
2374af72 | 126 | |
127 | /** interface function, see @ref AliHLTComponent for description */ | |
209a4703 | 128 | virtual int Deinit(); ////////// PTH WARNING you should Define a class AliHLTPHOSModuleProcessor |
c1e4a18c | 129 | |
130 | /** Get bad channel map from CDB */ | |
131 | virtual int GetBCMFromCDB(); | |
132 | ||
133 | /** Get the ADC <-> Energy (GeV) gain factors */ | |
134 | virtual int GetGainsFromCDB(); | |
135 | ||
209a4703 | 136 | |
137 | private: | |
c1e4a18c | 138 | |
139 | /** Copy constructor, prohibited */ | |
140 | AliHLTPHOSDigitMakerComponent(const AliHLTPHOSDigitMakerComponent &); | |
141 | ||
142 | /** Assignment operator, prohibited */ | |
143 | AliHLTPHOSDigitMakerComponent & operator = (const AliHLTPHOSDigitMakerComponent); | |
144 | ||
17e40254 | 145 | /** Pointer to the digit maker itself */ |
f137c3c5 | 146 | AliHLTCaloDigitMaker *fDigitMakerPtr; //! transient |
2374af72 | 147 | |
148 | /** The output of the component, digits in a container */ | |
f137c3c5 | 149 | AliHLTCaloDigitContainerDataStruct *fDigitContainerPtr; //! transient |
c1e4a18c | 150 | |
151 | /** Bad channel map */ | |
152 | AliPHOSEmcBadChannelsMap *fBadChannelMap; //! transient | |
153 | ||
154 | // /** Temporary holder for bad channel map */ | |
155 | //Bool_t ***fBadChannelMap; //! transient | |
156 | ||
157 | /** Calibration data */ | |
158 | AliPHOSEmcCalibData *fCalibData; //! transient | |
159 | ||
160 | ||
161 | /** Is the bad map initialised? */ | |
162 | Bool_t fBCMInitialised; //! transient | |
163 | ||
164 | /** Are the gains initialised? */ | |
165 | Bool_t fGainsInitialised; //! transient | |
166 | ||
cc244597 | 167 | ClassDef(AliHLTPHOSDigitMakerComponent, 0); |
2374af72 | 168 | |
209a4703 | 169 | }; |
170 | #endif | |
171 |