// $Id$ // // File: DBCAL_ADCHit_factory.h // Created: Thu Aug 10 14:43:29 EDT 2006 // Creator: davidl (on Darwin swire-b241.jlab.org 8.7.0 powerpc) // #ifndef _DBCAL_ADCHit_factory_ #define _DBCAL_ADCHit_factory_ #include #include "DBCAL_ADCHit.h" class DBCAL_ADCHit_factory:public JFactory{ public: DBCAL_ADCHit_factory(){}; ~DBCAL_ADCHit_factory(){}; const string toString(void); inline void GetPedGains( const int* &ped_slot18, const int* &ped_slot19, const float* &gain_slot18, const float* &gain_slot19, float &ADC_TO_GEV); private: jerror_t init(void); jerror_t brun(JEventLoop *eventLoop, int runnumber); jerror_t evnt(JEventLoop *loop, int eventnumber); ///< Invoked via JEventProcessor virtual method int ped_slot18[32]; int ped_slot19[32]; float gain_slot18[32]; float gain_slot19[32]; float ADC_TO_GEV; int runnumber; }; //------------------ // GetPedGains //------------------ inline void DBCAL_ADCHit_factory::GetPedGains(const int* &ped_slot18, const int* &ped_slot19, const float* &gain_slot18, const float* &gain_slot19, float &ADC_TO_GEV) { // Copy the pointers to the pedestals, gains, and conversion // factor being used by this factory into the variables that // are being passed. // // This is here solely for use by the DEventSourceROOT_mc // plugin so it can convert the MC generated energies into // ADC values in such a way that they will be converted back // into energy correctly. ped_slot18 = this->ped_slot18; ped_slot19 = this->ped_slot19; gain_slot18 = this->gain_slot18; gain_slot19 = this->gain_slot19; ADC_TO_GEV = this->ADC_TO_GEV; } #endif // _DBCAL_ADCHit_factory_