4 /**************************************************************************
5 * This file is property of and copyright by the ALICE HLT Project *
6 * All rights reserved. *
8 * Primary Authors: Oystein Djuvsland *
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
21 /** @file AliHLTEMCALDigitMakerComponent.h
22 @author Oystein Djuvsland
24 @brief A digit maker component for EMCAL HLT
27 // see below for class documentation
29 // refer to README to build package
31 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
33 #include "AliHLTCaloProcessor.h"
34 #include "AliHLTCaloConstantsHandler.h"
36 class AliEMCALCalibData;
37 class AliCaloCalibPedestal;
39 class AliHLTCaloDigitMaker;
40 class AliHLTCaloDigitContainerDataStruct;
43 * @class AliHLTEMCALDigitMakerComponent
45 * Creates the digit used for the clusterizer. Digits are equivalent to the ones in
46 * offline reconstruction
48 * <h2>General properties:</h2>
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>
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>
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
68 * <h2>Configuration:</h2>
69 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
70 * \li No configuration arguments
72 * <h2>Default CDB entries:</h2>
73 * \li No CDB entry yet, will come.
75 * <h2>Performance:</h2>
78 * <h2>Memory consumption:</h2>
81 * <h2>Output size:</h2>
82 * Depends on the event...
84 * More detailed description. (Soon)
86 * @ingroup alihlt_emcal
89 class AliHLTEMCALDigitMakerComponent : public AliHLTCaloProcessor, public AliHLTCaloConstantsHandler
94 AliHLTEMCALDigitMakerComponent();
97 virtual ~AliHLTEMCALDigitMakerComponent();
99 /** interface function, see @ref AliHLTComponent for description */
100 const char* GetComponentID();
102 /** interface function, see @ref AliHLTComponent for description */
103 void GetInputDataTypes(std::vector<AliHLTComponentDataType>& list);
105 /** interface function, see @ref AliHLTComponent for description */
106 AliHLTComponentDataType GetOutputDataType();
108 /** interface function, see @ref AliHLTComponent for description */
109 void GetOutputDataSize(unsigned long& constBase, double& inputMultiplier);
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);
116 /** interface function, see @ref AliHLTComponent for description */
117 AliHLTComponent* Spawn();
121 /** interface function, see @ref AliHLTComponent for description */
122 virtual int DoInit(int argc, const char** argv);
124 using AliHLTCaloProcessor::DoEvent;
126 /** interface function, see @ref AliHLTComponent for description */
127 virtual int Deinit(); ////////// PTH WARNING you should Define a class AliHLTEMCALModuleProcessor
129 // virtual int DoInit(int, const char**) {;}
130 virtual int DoDeinit(){return 0;}
132 /** Get bad channel map from CDB */
133 virtual int GetBCMFromCDB();
135 /** Get the ADC <-> Energy (GeV) gain factors */
136 virtual int GetGainsFromCDB();
141 /** Copy constructor, prohibited */
142 AliHLTEMCALDigitMakerComponent(const AliHLTEMCALDigitMakerComponent &);
144 /** Assignment operator, prohibited */
145 AliHLTEMCALDigitMakerComponent & operator = (const AliHLTEMCALDigitMakerComponent);
147 /** Pointer to the digit maker itself */
148 AliHLTCaloDigitMaker *fDigitMakerPtr; //! transient
150 /** The output of the component, digits in a container */
151 AliHLTCaloDigitContainerDataStruct *fDigitContainerPtr; //! transient
153 /** Pedestal data (contains BCM) */
154 AliCaloCalibPedestal *fPedestalData;
156 /** Calib data (contains gain factors) */
157 AliEMCALCalibData *fCalibData;
159 /** Is the bad map initialised? */
160 Bool_t fBCMInitialised; //! transient
162 /** Are the gains initialised? */
163 Bool_t fGainsInitialised; //! transient
165 ClassDef(AliHLTEMCALDigitMakerComponent, 1);