Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DCDCHit_factory.h
Go to the documentation of this file.
1 // $Id$
2 //
3 // File: DCDCHit_factory.h
4 // Created: Tue Aug 6 11:29:56 EDT 2013
5 // Creator: davidl (on Darwin harriet.jlab.org 11.4.2 i386)
6 //
7 
8 #ifndef _DCDCHit_factory_
9 #define _DCDCHit_factory_
10 
11 #include <JANA/JFactory.h>
12 #include <DAQ/Df125CDCPulse.h>
13 #include <TTAB/DTranslationTable.h>
14 
15 #include "DCDCHit.h"
16 
17 using namespace std;
18 using namespace jana;
19 
20 class DCDCHit_factory: public jana::JFactory<DCDCHit>{
21  public:
24 
25  // we need to store information on the hits with respect to their readout channels in order to look for correlated hits
26  struct cdchit_info_t{
27  uint32_t rocid;
28  uint32_t slot;
29  uint32_t connector;
30 
31  double time;
32  double max;
33 
34  inline bool operator==(const struct cdchit_info_t &rhs) const {
35  return (rocid==rhs.rocid) && (slot==rhs.slot) && (connector==rhs.connector);
36  }
37  };
38 
39 
44 
45  // timing cut limits
46  double LowTCut;
47  double HighTCut;
48 
49  private:
50  jerror_t init(void); ///< Called once at program start.
51  jerror_t brun(jana::JEventLoop *eventLoop, int32_t runnumber); ///< Called everytime a new run number is detected.
52  jerror_t evnt(jana::JEventLoop *eventLoop, uint64_t eventnumber); ///< Called every event.
53  jerror_t erun(void); ///< Called everytime run number changes, provided brun has been called.
54  jerror_t fini(void); ///< Called after last event of last event source has been processed.
55 
56  vector<const DTranslationTable *> ttab;
57 };
58 
59 #endif // _DCDCHit_factory_
60 
bool operator==(const struct cdchit_info_t &rhs) const
vector< const DTranslationTable * > ttab
double CorrelationHitsCut
double CorrelatedHitPeak