Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
JEventProcessor_ST_online_multi.h
Go to the documentation of this file.
1 // $Id$
2 //
3 // File: JEventProcessor_ST_online_multi.h
4 // Created: Wed Feb 24 08:17:21 EST 2016
5 // Creator: mkamel (on Linux mkamel-NE56R 3.13.0-39-generic x86_64)
6 //
7 
8 #ifndef _JEventProcessor_ST_online_multi_
9 #define _JEventProcessor_ST_online_multi_
10 
11 #include <JANA/JEventProcessor.h>
12 using namespace std;
13 // ***************** C++ header files******************
14 //*****************************************************
15 #include <stdint.h>
16 #include <vector>
17 #include <stdio.h>
18 //***************** ROOT header files********************
19 //*******************************************************
20 #include <TMath.h>
21 #include <TDirectory.h>
22 #include <TH1.h>
23 #include <TH2.h>
24 //***************** ST header files************************
25 //*********************************************************
28 #include "START_COUNTER/DSCHit.h"
29 //****************************** Define some constants *********
30 //**************************************************************
31 const int NCHANNELS = 30; // number of scintillator paddles
32 class JEventProcessor_ST_online_multi:public jana::JEventProcessor{
33  public:
36  const char* className(void){return "JEventProcessor_ST_online_multi";}
37 
38  private:
39  jerror_t init(void); ///< Called once at program start.
40  static const uint32_t ADC_MULTI_MIN = 0.; // Lower limit of adc multiplicity histogram
41  static const uint32_t ADC_MULTI_MAX = 51.; // Upper limit of adc multiplicity histogram
42  static const uint32_t ADC_MULTI_BINS = 51.; // Number of bins in adc multiplicity histogram
43  static const uint32_t TDC_MULTI_MIN = 0.; // Lower limit of tdc multiplicity histogram
44  static const uint32_t TDC_MULTI_MAX = 70.; // Upper limit of tdc multiplicity histogram
45  static const uint32_t TDC_MULTI_BINS = 70.; // Number of bins in tdc multiplicity histogram
46  jerror_t brun(jana::JEventLoop *eventLoop, int32_t runnumber); ///< Called everytime a new run number is detected.
47  jerror_t evnt(jana::JEventLoop *eventLoop, uint64_t eventnumber); ///< Called every event.
48  double counter_adc[NCHANNELS];
49  double counter_tdc[NCHANNELS];
50  double counter_hit[NCHANNELS];
51  double counter_adc_2[NCHANNELS];
52  double counter_tdc_2[NCHANNELS];
53  double counter_adc_unmatched[NCHANNELS];
54  double counter_tdc_unmatched[NCHANNELS];
55  int adc_index;
56  int hit_index;
57  int tdc_index;
58  jerror_t erun(void); ///< Called everytime run number changes, provided brun has been called.
59  jerror_t fini(void); ///< Called after last event of last event source has been processed.
60 };
61 
62 #endif // _JEventProcessor_ST_online_multi_
63 
const uint32_t ADC_MULTI_MAX
const Int_t NCHANNELS
const uint32_t TDC_MULTI_MAX
const uint32_t ADC_MULTI_MIN
const uint32_t TDC_MULTI_BINS
const uint32_t TDC_MULTI_MIN
const uint32_t ADC_MULTI_BINS