1 /**************************************************************************
2 * This file is property of and copyright by the ALICE HLT Project *
3 * All rights reserved. *
5 * Primary Authors: Oystein Djuvsland *
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 **************************************************************************/
17 #ifndef ALIHLTPHOSRCUDACOMPONENT_H
18 #define ALIHLTPHOSRCUDACOMPONENT_H
21 * Module calibration processor component for PHOS HLT
23 * @file AliHLTPHOSRcuDAComponent.h
24 * @author Oystein Djuvsland
26 * @brief Module calibration processor component for PHOS HLT
29 // see below for class documentation
31 // refer to README to build package
33 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
35 #include "AliHLTCalibrationProcessor.h"
36 #include "AliHLTPHOSConstants.h"
37 #include "AliHLTPHOSRcuProperties.h"
39 using namespace PhosHLTConst;
42 class AliHLTPHOSSharedMemoryInterface;
45 //class AliHLTPHOSRcuDAComponent: public AliHLTCalibrationProcessor, public AliHLTPHOSRcuProcessor
46 class AliHLTPHOSRcuDAComponent: public AliHLTPHOSRcuProperties, public AliHLTCalibrationProcessor
51 AliHLTPHOSRcuDAComponent();
55 virtual ~AliHLTPHOSRcuDAComponent();
57 /** not a valid copy constructor, defined according to effective C++ style */
58 AliHLTPHOSRcuDAComponent(const AliHLTPHOSRcuDAComponent&) : AliHLTPHOSRcuProperties(),
59 AliHLTCalibrationProcessor(),
63 // AliHLTPHOSRcuProcessor::HLTFatal("Copy constructor not implemented");
64 // AliHLTLogging::HLTFatal("Copy constructor not implemented");
67 /** not a valid assignment op, but defined according to effective C++ style */
68 AliHLTPHOSRcuDAComponent& operator=(const AliHLTPHOSRcuDAComponent&)
73 /* virtual int Deinit(); */
74 /* virtual int DoInit(int, const char**); */
76 // Public functions to implement AliHLTComponent's interface.
77 // These functions are required for the registration process
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();
87 // Protected functions to implement AliHLTComponent's interface.
88 // These functions provide initialization as well as the actual processing
89 // capabilities of the component.
91 /** Initialize the calibration component. */
92 Int_t InitCalibration();
94 /** Scan commandline arguments of the calibration component. */
95 Int_t ScanArgument( Int_t argc, const char** argv );
97 /** DeInitialize the calibration component. */
98 Int_t DeinitCalibration();
100 /** Process the data in the calibration component. */
101 using AliHLTCalibrationProcessor::ProcessCalibration;
102 Int_t ProcessCalibration( const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData );
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 );
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]);
111 // int fCnt; ///TODO, remove this
114 int fPhosEventCount; ///TODO, remove this
117 /** Pointer to the DA */
118 AliPHOSRcuDA1* fPHOSDAPtr; //! transient
120 /** Interface to read altro channel data from shared memory */
121 AliHLTPHOSSharedMemoryInterface *fShmPtr; //! transient