]>
Commit | Line | Data |
---|---|---|
64357c47 | 1 | /************************************************************************** |
2 | * This file is property of and copyright by the ALICE HLT Project * | |
3 | * All rights reserved. * | |
4 | * * | |
5 | * Primary Authors: Oystein Djuvsland * | |
6 | * * | |
7 | * Permission to use, copy, modify and distribute this software and its * | |
8 | * documentation strictly for non-commercial purposes is hereby granted * | |
9 | * without fee, provided that the above copyright notice appears in all * | |
10 | * copies and that both the copyright notice and this permission notice * | |
11 | * appear in the supporting documentation. The authors make no claims * | |
12 | * about the suitability of this software for any purpose. It is * | |
13 | * provided "as is" without express or implied warranty. * | |
14 | **************************************************************************/ | |
15 | ||
16 | ||
17 | #ifndef ALIHLTPHOSRCUDACOMPONENT_H | |
18 | #define ALIHLTPHOSRCUDACOMPONENT_H | |
19 | ||
20 | /** | |
21 | * Module calibration processor component for PHOS HLT | |
22 | * | |
23 | * @file AliHLTPHOSRcuDAComponent.h | |
24 | * @author Oystein Djuvsland | |
25 | * @date | |
26 | * @brief Module calibration processor component for PHOS HLT | |
27 | */ | |
28 | ||
29 | // see below for class documentation | |
30 | // or | |
31 | // refer to README to build package | |
32 | // or | |
33 | // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt | |
34 | ||
35 | #include "AliHLTCalibrationProcessor.h" | |
36 | #include "AliHLTPHOSConstants.h" | |
37 | #include "AliHLTPHOSRcuProperties.h" | |
38 | ||
39 | using namespace PhosHLTConst; | |
40 | ||
41 | class AliPHOSRcuDA1; | |
42 | class AliHLTPHOSSharedMemoryInterface; | |
43 | class TObjArray; | |
44 | ||
45 | //class AliHLTPHOSRcuDAComponent: public AliHLTCalibrationProcessor, public AliHLTPHOSRcuProcessor | |
46 | class AliHLTPHOSRcuDAComponent: public AliHLTPHOSRcuProperties, public AliHLTCalibrationProcessor | |
47 | { | |
48 | public: | |
49 | ||
50 | /** constructor */ | |
51 | AliHLTPHOSRcuDAComponent(); | |
52 | ||
53 | ||
54 | /** destructor */ | |
55 | virtual ~AliHLTPHOSRcuDAComponent(); | |
56 | ||
57 | /** not a valid copy constructor, defined according to effective C++ style */ | |
58 | AliHLTPHOSRcuDAComponent(const AliHLTPHOSRcuDAComponent&) : AliHLTPHOSRcuProperties(), | |
59 | AliHLTCalibrationProcessor(), | |
60 | fPHOSDAPtr(0), | |
61 | fShmPtr(0) | |
62 | { | |
63 | // AliHLTPHOSRcuProcessor::HLTFatal("Copy constructor not implemented"); | |
64 | // AliHLTLogging::HLTFatal("Copy constructor not implemented"); | |
65 | } | |
66 | ||
67 | /** not a valid assignment op, but defined according to effective C++ style */ | |
68 | AliHLTPHOSRcuDAComponent& operator=(const AliHLTPHOSRcuDAComponent&) | |
69 | { | |
70 | return *this; | |
71 | } | |
72 | ||
73 | /* virtual int Deinit(); */ | |
74 | /* virtual int DoInit(int, const char**); */ | |
75 | ||
76 | // Public functions to implement AliHLTComponent's interface. | |
77 | // These functions are required for the registration process | |
78 | ||
79 | const char* GetComponentID(); | |
80 | void GetInputDataTypes( vector<AliHLTComponentDataType>& list); | |
81 | AliHLTComponentDataType GetOutputDataType(); | |
82 | virtual void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier ); | |
83 | AliHLTComponent* Spawn(); | |
84 | ||
85 | protected: | |
86 | ||
87 | // Protected functions to implement AliHLTComponent's interface. | |
88 | // These functions provide initialization as well as the actual processing | |
89 | // capabilities of the component. | |
90 | ||
91 | /** Initialize the calibration component. */ | |
92 | Int_t InitCalibration(); | |
93 | ||
94 | /** Scan commandline arguments of the calibration component. */ | |
95 | Int_t ScanArgument( Int_t argc, const char** argv ); | |
96 | ||
97 | /** DeInitialize the calibration component. */ | |
98 | Int_t DeinitCalibration(); | |
99 | ||
100 | /** Process the data in the calibration component. */ | |
101 | using AliHLTCalibrationProcessor::ProcessCalibration; | |
102 | Int_t ProcessCalibration( const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData ); | |
103 | ||
104 | /** Ship the data to the FXS at end of run or eventmodulo. */ | |
105 | using AliHLTCalibrationProcessor::ShipDataToFXS; | |
106 | Int_t ShipDataToFXS( const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData ); | |
107 | ||
108 | /** Reset the energy and timing arrays */ | |
109 | void ResetArrays(Float_t e[N_XCOLUMNS_MOD][N_ZROWS_MOD][N_GAINS], Float_t t[N_XCOLUMNS_MOD][N_ZROWS_MOD][N_GAINS]); | |
110 | ||
111 | // int fCnt; ///TODO, remove this | |
112 | ||
113 | private: | |
114 | int fPhosEventCount; ///TODO, remove this | |
115 | ||
116 | ||
117 | /** Pointer to the DA */ | |
118 | AliPHOSRcuDA1* fPHOSDAPtr; //! transient | |
119 | ||
120 | /** Interface to read altro channel data from shared memory */ | |
121 | AliHLTPHOSSharedMemoryInterface *fShmPtr; //! transient | |
122 | ||
123 | }; | |
124 | ||
125 | #endif | |
126 |