Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DRFTime_factory_TAGH.h
Go to the documentation of this file.
1 // $Id$
2 //
3 // File: DRFTime_factory_TAGH.h
4 // Created: Mon Mar 30 10:51:29 EDT 2015
5 // Creator: pmatt (on Linux pmattdesktop.jlab.org 2.6.32-504.12.2.el6.x86_64 x86_64)
6 //
7 
8 #ifndef _DRFTime_factory_TAGH_
9 #define _DRFTime_factory_TAGH_
10 
11 #include <limits>
12 #include <iostream>
13 
14 #include <JANA/JFactory.h>
15 #include "TTAB/DTTabUtilities.h"
16 
17 #include "DRFTime.h"
18 #include "DRFDigiTime.h"
19 #include "DRFTDCDigiTime.h"
20 
21 using namespace std;
22 using namespace jana;
23 
24 class DRFTime_factory_TAGH : public jana::JFactory<DRFTime>
25 {
26  public:
29  const char* Tag(void){return "TAGH";}
30 
31  double Step_TimeToNearInputTime(double locTimeToStep, double locTimeToStepTo) const;
32  double Step_TimeToNearInputTime(double locTimeToStep, double locTimeToStepTo, double locPeriod) const;
33 
34  double Convert_TDCToTime(const DRFTDCDigiTime* locRFTDCDigiTime, const DTTabUtilities* locTTabUtilities) const;
35 
36  jerror_t brun(jana::JEventLoop *eventLoop, int32_t runnumber); ///< Called everytime a new run number is detected.
37 
38  private:
39  jerror_t init(void); ///< Called once at program start.
40  jerror_t evnt(jana::JEventLoop *eventLoop, uint64_t eventnumber); ///< Called every event.
41  jerror_t erun(void); ///< Called everytime run number changes, provided brun has been called.
42  jerror_t fini(void); ///< Called after last event of last event source has been processed.
43 
44  double Calc_WeightedAverageRFTime(vector<double>& locRFTimes, double& locRFTimeVariance) const;
45 
48 
49  double dTimeOffset;
52 };
53 
54 #endif // _DRFTime_factory_TAGH_
55 
DetectorSystem_t
Definition: GlueX.h:15
DetectorSystem_t dSourceSystem
const char * Tag(void)