Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
JEventProcessor_dumpthrowns.h
Go to the documentation of this file.
1 // $Id$
2 //
3 // File: JEventProcessor_dumpthrowns.h
4 // Created: Tue Feb 4 09:29:35 EST 2014
5 // Creator: davidl (on Linux ifarm1102 2.6.32-220.7.1.el6.x86_64 x86_64)
6 //
7 
8 #ifndef _JEventProcessor_dumpthrowns_
9 #define _JEventProcessor_dumpthrowns_
10 
11 #include <map>
12 #include <fstream>
13 using namespace std;
14 
15 #include <JANA/JEventProcessor.h>
16 #include <HDGEOMETRY/DGeometry.h>
17 
18 class JEventProcessor_dumpthrowns:public jana::JEventProcessor{
19  public:
22  const char* className(void){return "JEventProcessor_dumpthrowns";}
23 
24  private:
25  jerror_t init(void); ///< Called once at program start.
26  jerror_t brun(jana::JEventLoop *eventLoop, int32_t runnumber); ///< Called everytime a new run number is detected.
27  jerror_t evnt(jana::JEventLoop *eventLoop, uint64_t eventnumber); ///< Called every event.
28  jerror_t erun(void); ///< 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 
33  map<unsigned long, int> wireID;
34  ofstream *ofs;
35  unsigned int MAX_CANDIDATE_FILTER;
36  unsigned long events_written;
37  unsigned long events_discarded;
38 
39  unsigned long GetCDCWireID(const DCDCWire* w){ return w->ring*100 + w->straw;}
40  unsigned long GetFDCWireID(const DFDCWire* w){ return 100000 + w->layer*100 + w->wire;}
41  int GetWireIndex(unsigned long id){ return wireID[id]; }
42 };
43 
44 #endif // _JEventProcessor_dumpthrowns_
45 
unsigned long GetCDCWireID(const DCDCWire *w)
unsigned long GetFDCWireID(const DFDCWire *w)
int layer
1-24
Definition: DFDCWire.h:16
int straw
Definition: DCDCWire.h:81
int wire
1-N
Definition: DFDCWire.h:17
int ring
Definition: DCDCWire.h:80