Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DEventProcessor_fcal_led.h
Go to the documentation of this file.
1 // $Id$
2 //
3 // File: DEventProcessor_fcal_led.h
4 
5 #ifndef _DEventProcessor_fcal_led_
6 #define _DEventProcessor_fcal_led_
7 
8 #include <JANA/JEventProcessor.h>
9 using namespace jana;
10 
11 #include "TApplication.h"
12 
13 #include "TProfile.h"
14 #include <TTree.h>
15 
16 #include <TFile.h>
17 #include <TH1.h>
18 #include <TH2.h>
19 
20 
21 class DEventProcessor_fcal_led:public JEventProcessor{
22  public:
24  pthread_mutex_init(&mutex, NULL);
25  };
26 
28  const char* className(void){return "DEventProcessor_fcal_led";}
29 
30  private:
31  jerror_t init(void); ///< Called once at program start.
32  jerror_t brun(JEventLoop *eventLoop, int32_t runnumber); ///< Called everytime a new run number is detected.
33  jerror_t evnt(JEventLoop *eventLoop, uint64_t eventnumber); ///< Called every event.
34  jerror_t erun(void); ///< Called everytime run number changes, provided brun has been called.
35  jerror_t fini(void); ///< Called after last event of last event source has been processed.
36 
37  pthread_mutex_t mutex;
38 
39  TTree* tree1;
40 
41  static const Int_t max_hit = 4000;
42  static const Int_t max_sample = 100;
43 
44 
45  Int_t nhit;
46  Int_t column[max_hit];
47  Int_t row[max_hit];
48  Int_t peak[max_hit];
49  Int_t integral[max_hit];
50  Int_t pedestal[max_hit];
51  Int_t time[max_hit];
52  Int_t qf[max_hit];
53 
54  Int_t waveform[max_hit][max_sample];
55 
58 
59  TProfile *fcal_wave[59][59];
60  TH1F *fcal_peak[59][59];
61  TH1F *fcal_int[59][59];
62 
63 };
64 
65 #endif // _DEventProcessor_fcal_led_
66 
static TH1I * pedestal[nChan]