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

#include <DBeamCurrent_factory.h>

+ Inheritance diagram for DBeamCurrent_factory:

Classes

struct  Boundary
 

Public Member Functions

 DBeamCurrent_factory ()
 
 ~DBeamCurrent_factory ()
 
double IntegratedFiducialTime (double t_start=0.0, double t_end=0.0)
 
double IntegratedTime (void)
 
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...
 

Public Attributes

double BEAM_ON_MIN_nA
 
double BEAM_TRIP_MIN_T
 
vector< Boundaryboundaries
 
vector< double > trip
 
vector< double > recover
 
double ticks_per_sec
 
uint64_t rcdb_250MHz_offset_tics
 
uint32_t rcdb_start_time
 

Detailed Description

Definition at line 14 of file DBeamCurrent_factory.h.

Constructor & Destructor Documentation

DBeamCurrent_factory::DBeamCurrent_factory ( )
inline

Definition at line 16 of file DBeamCurrent_factory.h.

DBeamCurrent_factory::~DBeamCurrent_factory ( )
inline

Definition at line 17 of file DBeamCurrent_factory.h.

Member Function Documentation

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

Called everytime a new run number is detected.

Definition at line 43 of file DBeamCurrent_factory.cc.

References BEAM_ON_MIN_nA, mtx, and t_max.

Referenced by JEventProcessor_randomtrigger_skim::brun(), and main().

jerror_t DBeamCurrent_factory::erun ( void  )

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

Definition at line 193 of file DBeamCurrent_factory.cc.

jerror_t DBeamCurrent_factory::fini ( void  )

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

Definition at line 201 of file DBeamCurrent_factory.cc.

jerror_t DBeamCurrent_factory::init ( void  )

Called once at program start.

Definition at line 25 of file DBeamCurrent_factory.cc.

References BEAM_ON_MIN_nA, and BEAM_TRIP_MIN_T.

Referenced by JEventProcessor_randomtrigger_skim::brun(), and main().

double DBeamCurrent_factory::IntegratedFiducialTime ( double  t_start = 0.0,
double  t_end = 0.0 
)

Loop over all boundaries to find the total fiducial time between the two given times. Both t_start and t_end should be in seconds and relative to the start of the run (NOT the start of this particular file!) The value returned is in seconds. The fraction of the time the beam was on for the entire run can be obtained with:

IntegratedFiducialTime()/IntegratedTime()

Definition at line 209 of file DBeamCurrent_factory.cc.

References BEAM_TRIP_MIN_T, and t1.

Referenced by main().

double DBeamCurrent_factory::IntegratedTime ( void  )

Return total integrated time for this run. WARNING: This is NOT the time of only the current file. See IntegratedFiducialTime for more details.

Definition at line 294 of file DBeamCurrent_factory.cc.

Referenced by main().

Member Data Documentation

double DBeamCurrent_factory::BEAM_ON_MIN_nA

Definition at line 26 of file DBeamCurrent_factory.h.

double DBeamCurrent_factory::BEAM_TRIP_MIN_T

Definition at line 27 of file DBeamCurrent_factory.h.

vector<Boundary> DBeamCurrent_factory::boundaries

Definition at line 29 of file DBeamCurrent_factory.h.

Referenced by main().

uint64_t DBeamCurrent_factory::rcdb_250MHz_offset_tics

Definition at line 34 of file DBeamCurrent_factory.h.

uint32_t DBeamCurrent_factory::rcdb_start_time

Definition at line 35 of file DBeamCurrent_factory.h.

vector<double> DBeamCurrent_factory::recover

Definition at line 31 of file DBeamCurrent_factory.h.

Referenced by main().

double DBeamCurrent_factory::ticks_per_sec

Definition at line 33 of file DBeamCurrent_factory.h.

vector<double> DBeamCurrent_factory::trip

Definition at line 30 of file DBeamCurrent_factory.h.

Referenced by main().


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