Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DTAGHHit_factory_Calib.h
Go to the documentation of this file.
1 // $Id$
2 //
3 // File: DTAGHHit_factory_Calib.h
4 // Created: Wed Aug 3 12:55:19 EDT 2016
5 // Creator: nsparks (on Linux cua2.jlab.org 3.10.0-327.22.2.el7.x86_64 x86_64)
6 //
7 
8 #ifndef _DTAGHHit_factory_Calib_
9 #define _DTAGHHit_factory_Calib_
10 
11 #include <JANA/JFactory.h>
12 #include "DTAGHHit.h"
13 #include "DTAGHGeometry.h"
14 
15 class DTAGHHit_factory_Calib:public jana::JFactory<DTAGHHit>{
16  public:
19  const char* Tag(void){return "Calib";}
20 
21  static const int k_counter_dead = 0;
22  static const int k_counter_good = 1;
23  static const int k_counter_bad = 2;
24  static const int k_counter_noisy = 3;
25 
26  // config. parameters
28  double ADC_THRESHOLD;
29 
30  // overall scale factors
31  double fadc_a_scale; // pixels per fADC pulse integral count
32  double fadc_t_scale; // ns per fADC time count
33  double t_base;
34  double t_tdc_base;
35 
36  // calibration constants stored in row, column format
46 
47  bool load_ccdb_constants(std::string table_name,
48  std::string column_name,
49  double table[TAGH_MAX_COUNTER+1]);
50 
51  private:
52  jerror_t init(void); ///< Called once at program start.
53  jerror_t brun(jana::JEventLoop *eventLoop, int32_t runnumber); ///< Called everytime a new run number is detected.
54  jerror_t evnt(jana::JEventLoop *eventLoop, uint64_t eventnumber); ///< Called every event.
55  jerror_t erun(void); ///< Called everytime run number changes, provided brun has been called.
56  jerror_t fini(void); ///< Called after last event of last event source has been processed.
57 
59 };
60 
61 #endif // _DTAGHHit_factory_Calib_
jerror_t evnt(jana::JEventLoop *eventLoop, uint64_t eventnumber)
Called every event.
double fadc_time_offsets[TAGH_MAX_COUNTER+1]
jerror_t brun(jana::JEventLoop *eventLoop, int32_t runnumber)
Called everytime a new run number is detected.
#define TAGH_MAX_COUNTER
Definition: DTAGHGeometry.h:18
double tdc_twalk_c2[TAGH_MAX_COUNTER+1]
char string[256]
double fadc_gains[TAGH_MAX_COUNTER+1]
double counter_quality[TAGH_MAX_COUNTER+1]
double fadc_pedestals[TAGH_MAX_COUNTER+1]
jerror_t fini(void)
Called after last event of last event source has been processed.
double tdc_twalk_c0[TAGH_MAX_COUNTER+1]
double tdc_twalk_c3[TAGH_MAX_COUNTER+1]
bool load_ccdb_constants(std::string table_name, std::string column_name, double table[TAGH_MAX_COUNTER+1])
double tdc_twalk_c1[TAGH_MAX_COUNTER+1]
jerror_t erun(void)
Called everytime run number changes, provided brun has been called.
static const int k_counter_noisy
double tdc_time_offsets[TAGH_MAX_COUNTER+1]
jerror_t init(void)
Called once at program start.