Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
hd_root/MyProcessor.h
Go to the documentation of this file.
1 // Author: David Lawrence June 25, 2004
2 //
3 //
4 // MyProcessor.h
5 //
6 /// Example program for a Hall-D analyzer which uses DANA
7 ///
8 
9 #include <JANA/JEventProcessor.h>
10 #include <JANA/JEventLoop.h>
11 using namespace jana;
12 
13 #include <TFile.h>
14 #include <TTree.h>
15 
16 extern vector<string> toprint;
17 extern bool ACTIVATE_ALL;
18 
19 class MyProcessor:public JEventProcessor
20 {
21  public:
22  MyProcessor();
23  ~MyProcessor();
24 
25  jerror_t init(void); ///< Called once at program start.
26  jerror_t brun(JEventLoop *eventLoop, int32_t runnumber); ///< Called everytime a new run number is detected.
27  jerror_t evnt(JEventLoop *eventLoop, uint64_t eventnumber); ///< Called every event.
28  jerror_t erun(void){return NOERROR;}; ///< Called everytime run number changes, provided brun has been called.
29  jerror_t fini(void); ///< Called after last event of last event source has been processed.
30 
31  typedef struct{
32  string dataClassName;
33  string tag;
34  }factory_info_t;
35  vector<factory_info_t> fac_info;
36 
37  TFile *ROOTfile;
38 };
jerror_t erun(void)
bool ACTIVATE_ALL
set< string > toprint