Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DPSHit_factory Class Reference

#include <DPSHit_factory.h>

+ Inheritance diagram for DPSHit_factory:

Public Member Functions

 DPSHit_factory ()
 
 ~DPSHit_factory ()
 
const double GetConstant (const ps_digi_constants_t &the_table, const DPSGeometry::Arm in_arm, const int in_column, const DPSGeometry &psGeom) const
 
const double GetConstant (const ps_digi_constants_t &the_table, const DPSDigiHit *the_digihit, const DPSGeometry &psGeom) const
 
const double GetConstant (const ps_digi_constants_t &the_table, const DPSHit *the_hit, const DPSGeometry &psGeom) const
 

Public Attributes

double ADC_THRESHOLD
 
double a_scale
 
double t_scale
 
double t_base
 
ps_digi_constants_t adc_gains
 
ps_digi_constants_t adc_pedestals
 
ps_digi_constants_t adc_time_offsets
 

Private Member Functions

jerror_t init (void)
 Called once at program start. More...
 
jerror_t brun (jana::JEventLoop *eventLoop, int32_t runnumber)
 Called everytime a new run number is detected. More...
 
jerror_t evnt (jana::JEventLoop *eventLoop, uint64_t eventnumber)
 Called every event. More...
 
jerror_t erun (void)
 Called everytime run number changes, provided brun has been called. More...
 
jerror_t fini (void)
 Called after last event of last event source has been processed. More...
 
void FillCalibTable (ps_digi_constants_t &table, string table_name, const DPSGeometry &psGeom)
 

Private Attributes

bool CHECK_FADC_ERRORS
 

Detailed Description

Definition at line 21 of file DPSHit_factory.h.

Constructor & Destructor Documentation

DPSHit_factory::DPSHit_factory ( )
inline

Definition at line 23 of file DPSHit_factory.h.

DPSHit_factory::~DPSHit_factory ( )
inline

Definition at line 24 of file DPSHit_factory.h.

Member Function Documentation

jerror_t DPSHit_factory::brun ( jana::JEventLoop *  eventLoop,
int32_t  runnumber 
)
private

Called everytime a new run number is detected.

Read in calibration constants

Definition at line 41 of file DPSHit_factory.cc.

References adc_time_offsets, t_base, and t_scale.

jerror_t DPSHit_factory::erun ( void  )
private

Called everytime run number changes, provided brun has been called.

Definition at line 199 of file DPSHit_factory.cc.

jerror_t DPSHit_factory::evnt ( jana::JEventLoop *  eventLoop,
uint64_t  eventnumber 
)
private

Called every event.

Generate DPSHit object for each DPSDigiHit object. This is where the first set of calibration constants is applied to convert from digitzed units into natural units.

Note that this code does NOT get called for simulated data in HDDM format. The HDDM event source will copy the precalibrated values directly into the _data vector.

Definition at line 98 of file DPSHit_factory.cc.

References adc_time_offsets, DPSDigiHit::arm, DPSHit::arm, DTTabUtilities::CheckFADC250_NoErrors(), DTTabUtilities::CheckFADC250_PedestalOK(), DPSDigiHit::column, DPSGeometry::getEhigh(), DPSGeometry::getElow(), if(), DPSDigiHit::nsamples_integral, DPSDigiHit::nsamples_pedestal, DPSGeometry::NUM_ARMS, DPSGeometry::NUM_FINE_COLUMNS, DPSDigiHit::pedestal, pedestal, DPSDigiHit::pulse_integral, DPSDigiHit::pulse_peak, DPSDigiHit::pulse_time, DPSDigiHit::QF, sprintf(), str, t_base, and t_scale.

void DPSHit_factory::FillCalibTable ( ps_digi_constants_t table,
string  table_name,
const DPSGeometry psGeom 
)
private
jerror_t DPSHit_factory::fini ( void  )
private

Called after last event of last event source has been processed.

Definition at line 207 of file DPSHit_factory.cc.

const double DPSHit_factory::GetConstant ( const ps_digi_constants_t the_table,
const DPSGeometry::Arm  in_arm,
const int  in_column,
const DPSGeometry psGeom 
) const
const double DPSHit_factory::GetConstant ( const ps_digi_constants_t the_table,
const DPSDigiHit the_digihit,
const DPSGeometry psGeom 
) const
const double DPSHit_factory::GetConstant ( const ps_digi_constants_t the_table,
const DPSHit the_hit,
const DPSGeometry psGeom 
) const
jerror_t DPSHit_factory::init ( void  )
private

Called once at program start.

set the base conversion scales

Definition at line 21 of file DPSHit_factory.cc.

References t_base, and t_scale.

Member Data Documentation

double DPSHit_factory::a_scale

Definition at line 30 of file DPSHit_factory.h.

ps_digi_constants_t DPSHit_factory::adc_gains

Definition at line 35 of file DPSHit_factory.h.

ps_digi_constants_t DPSHit_factory::adc_pedestals

Definition at line 36 of file DPSHit_factory.h.

double DPSHit_factory::ADC_THRESHOLD

Definition at line 24 of file DPSHit_factory.h.

ps_digi_constants_t DPSHit_factory::adc_time_offsets

Definition at line 37 of file DPSHit_factory.h.

bool DPSHit_factory::CHECK_FADC_ERRORS
private

Definition at line 57 of file DPSHit_factory.h.

double DPSHit_factory::t_base

Definition at line 32 of file DPSHit_factory.h.

double DPSHit_factory::t_scale

Definition at line 31 of file DPSHit_factory.h.


The documentation for this class was generated from the following files: