Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
JEventProcessor_DAQTreeBCAL.h
Go to the documentation of this file.
1 // $Id$
2 //
3 // File: JEventProcessor_DAQTreeBCAL.h
4 // Created: Mon May 5 15:20:49 EDT 2014
5 // Creator: davidl (on Darwin harriet.jlab.org 13.1.0 i386)
6 //
7 
8 #ifndef _JEventProcessor_DAQTreeBCAL_
9 #define _JEventProcessor_DAQTreeBCAL_
10 
11 #include <stdint.h>
12 
13 #include <JANA/JEventProcessor.h>
14 
15 #include <TTree.h>
16 
17 
18 class JEventProcessor_DAQTreeBCAL:public jana::JEventProcessor{
19  public:
22  const char* className(void){return "JEventProcessor_DAQTreeBCAL";}
23 
24  TTree *BCALdigi;
25  TTree *BCALTDCdigi;
26  uint32_t channelnum; ///< Arbitrary global channel number (sorted by crate, slot, channel)
27  uint32_t eventnum; ///< Event number
28  uint32_t rocid; ///< (from DDAQAddress) Crate number
29  uint32_t slot; ///< (from DDAQAddress) Slot number in crate
30  uint32_t channel; ///< (from DDAQAddress) Channel number in slot
31  uint32_t itrigger; ///< (from DDAQAddress) Trigger number for cases when this hit was read in a multi-event block (from DDAQAddress)
32  vector<uint32_t> waveform; ///< STL vector of samples in the waveform for the event
33  uint32_t nsamples; ///< Number of samples in the waveform
34  uint32_t w_integral; ///< Sum of all samples in the waveform
35  uint32_t w_min; ///< Minimum sample in the waveform
36  uint32_t w_max; ///< Maximum sample in the waveform
37  uint32_t w_samp1; ///< First sample in the waveform (for simple analysis in case the STL vector is difficult to access)
38 
39  uint32_t time;
40 
41  uint32_t module;
42  uint32_t layer;
43  uint32_t sector;
44  uint32_t end; // 0=upstream, 1=downstream
45 
46  private:
47  jerror_t init(void); ///< Called once at program start.
48  jerror_t brun(jana::JEventLoop *eventLoop, int32_t runnumber); ///< Called everytime a new run number is detected.
49  jerror_t evnt(jana::JEventLoop *eventLoop, uint64_t eventnumber); ///< Called every event.
50  jerror_t erun(void); ///< Called everytime run number changes, provided brun has been called.
51  jerror_t fini(void); ///< Called after last event of last event source has been processed.
52 };
53 
54 #endif // _JEventProcessor_DAQTreeBCAL_
55 
uint32_t channelnum
Arbitrary global channel number (sorted by crate, slot, channel)
jerror_t evnt(jana::JEventLoop *eventLoop, uint64_t eventnumber)
Called every event.
uint32_t itrigger
(from DDAQAddress) Trigger number for cases when this hit was read in a multi-event block (from DDAQA...
uint32_t w_min
Minimum sample in the waveform.
jerror_t erun(void)
Called everytime run number changes, provided brun has been called.
uint32_t w_max
Maximum sample in the waveform.
uint32_t nsamples
Number of samples in the waveform.
jerror_t brun(jana::JEventLoop *eventLoop, int32_t runnumber)
Called everytime a new run number is detected.
uint32_t w_samp1
First sample in the waveform (for simple analysis in case the STL vector is difficult to access) ...
uint32_t slot
(from DDAQAddress) Slot number in crate
uint32_t rocid
(from DDAQAddress) Crate number
uint32_t w_integral
Sum of all samples in the waveform.
uint32_t channel
(from DDAQAddress) Channel number in slot
vector< uint32_t > waveform
STL vector of samples in the waveform for the event.
jerror_t fini(void)
Called after last event of last event source has been processed.
jerror_t init(void)
Called once at program start.