Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
JEventProcessor_cdc_emu.h
Go to the documentation of this file.
1 // $Id$
2 //
3 // File: JEventProcessor_cdc_emu.h
4 // Created: Thu Apr 21 10:38:27 EDT 2016
5 // Creator: njarvis (on Linux egbert 2.6.32-573.3.1.el6.x86_64 x86_64)
6 //
7 
8 #ifndef _JEventProcessor_cdc_emu_
9 #define _JEventProcessor_cdc_emu_
10 
11 #include <JANA/JEventProcessor.h>
12 
13 #include <JANA/JApplication.h>
14 #include <JANA/JFactory.h>
15 
16 #include <stdint.h>
17 #include <vector>
18 #include <thread>
19 
20 #include <string>
21 #include <iostream>
22 #include <map>
23 #include <set>
24 
25 
26 
27 using namespace std;
28 using namespace jana;
29 
31 
32 #include "CDC/DCDCHit.h"
33 #include "CDC/DCDCDigiHit.h"
34 #include "DAQ/Df125WindowRawData.h"
35 #include "DAQ/Df125CDCPulse.h"
36 #include "DAQ/Df125Config.h"
37 #include "DAQ/Df125TriggerTime.h"
38 
39 //#include "DAQ/DCODAEventInfo.h"
40 
41 #include "fa125fns.h"
42 
43 
44 
45 
46 class JEventProcessor_cdc_emu:public jana::JEventProcessor{
47  public:
50  const char* className(void){return "JEventProcessor_cdc_emu";}
51 
52  private:
53  jerror_t init(void); ///< Called once at program start.
54  jerror_t brun(jana::JEventLoop *eventLoop, int32_t runnumber); ///< Called everytime a new run number is detected.
55  jerror_t evnt(jana::JEventLoop *eventLoop, uint64_t eventnumber); ///< Called every event.
56  jerror_t erun(void); ///< Called everytime run number changes, provided brun has been called.
57  jerror_t fini(void); ///< Called after last event of last event source has been processed.
58 
59  //TREE
61 
62  //thread_local: Each thread has its own object: no lock needed
63  //important: manages it's own data internally: don't want to call new/delete every event!
64 
65  static thread_local DTreeFillData dTreeFillData;
66 
67  protected:
68 
69  int RUN_CONFIG; //run number to take config files from
70  int DIFFS_ONLY; //record (0) all events or (1) only events with diffs
71 
72 };
73 
74 #endif // _JEventProcessor_cdc_emu_
75 
static thread_local DTreeFillData dTreeFillData