Belle II Software  release-08-01-10
TRGTOPWaveformPlotterModule.h
1 /**************************************************************************
2  * basf2 (Belle II Analysis Software Framework) *
3  * Author: The Belle II Collaboration *
4  * *
5  * See git log for contributors and copyright holders. *
6  * This file is licensed under LGPL-3.0, see LICENSE.md. *
7  **************************************************************************/
8 //---------------------------------------------------------------
9 // $Id$
10 //---------------------------------------------------------------
11 // Filename : TRGTOPWaveformPlotterModule.h
12 // Section : TRG GRL
13 // Owner :
14 // Email :
15 //---------------------------------------------------------------
16 // Description : DQM module for TRGTOP
17 //---------------------------------------------------------------
18 #ifndef TRGTOPWAVEFORMPLOTTERMODULE_h
19 #define TRGTOPWAVEFORMPLOTTERMODULE_h
20 
21 #include <framework/core/Module.h>
22 
23 #include <vector>
24 
25 //#include <TFile.h>
26 //#include <TDirectory.h>
27 
28 #include <TCanvas.h>
29 #include <TGraph.h>
30 #include <TMultiGraph.h>
31 #include <TAxis.h>
32 //#include <TLegend.h>
33 #include <TPaveText.h>
34 
35 //#include <TTree.h>
36 //#include <TH1I.h>
37 //#include <TH2I.h>
38 //#include <TH1D.h>
39 
40 //#include <framework/core/HistoModule.h>
41 
42 #include <string>
43 #include <algorithm>
44 
45 #define NUMBER_OF_TOP_SLOTS 16
46 #define MAX_NUMBER_OF_CLOCK_CYCLES 384
47 
48 #define MAX_TIMESTAMP_RANGE 47000
49 
50 namespace Belle2 {
60 
61  public:
64 
67  // virtual ~TRGTOPWaveformPlotterModule();
68 
69  public:
70 
72  virtual void initialize() override;
74  virtual void beginRun() override;
76  virtual void event() override;
78  virtual void endRun() override;
80  // virtual void terminate() override {}
81  virtual void terminate() override;
82 
83  private:
84 
86  // TDirectory* oldROOTDir = nullptr;
88  // TDirectory* myROOTDir = nullptr;
89 
91  // TFile* m_file;
92 
93  TCanvas* m_myCanvas[NUMBER_OF_TOP_SLOTS];
94 
95  TGraph* m_timeStampsGraphMainReadout[NUMBER_OF_TOP_SLOTS];
96  TGraph* m_timeStampsGraphTriggerReadout[NUMBER_OF_TOP_SLOTS];
97 
98  TMultiGraph* m_myMultiGraph[NUMBER_OF_TOP_SLOTS];
99 
100  TPaveText* m_myPaveText[NUMBER_OF_TOP_SLOTS];
101 
102  Int_t m_timeStampsMainReadout[NUMBER_OF_TOP_SLOTS][MAX_NUMBER_OF_CLOCK_CYCLES];
103  Int_t m_timeStampsTriggerReadout[NUMBER_OF_TOP_SLOTS][MAX_NUMBER_OF_CLOCK_CYCLES];
104 
105  Int_t m_clockCyclesMainReadout[NUMBER_OF_TOP_SLOTS][MAX_NUMBER_OF_CLOCK_CYCLES];
106  Int_t m_clockCyclesTriggerReadout[NUMBER_OF_TOP_SLOTS][MAX_NUMBER_OF_CLOCK_CYCLES];
107 
108  // various parameters and their interpretation
109 
110  int m_plottingMode;
111 
112  double m_markerSizeHits;
113  double m_markerSizeTimestamps;
114 
115  int m_markerTypeHits;
116  int m_markerTypeTimestamps;
117 
118  int m_firstAssumedClockCycle;
119 
120  int m_cutPlotMinNumberTriggerReadoutHits;
121 
122  int m_cutPlotMinNumberMainReadoutHits;
123 
124  int m_xMin;
125  int m_xMax;
126  int m_yMin;
127  int m_yMax;
128 
129  int m_showGridx;
130  int m_showGridy;
131 
132  int m_canvasXMin;
133  int m_canvasYMin;
134  int m_canvasXSize;
135  int m_canvasYSize;
136 
137  int m_shiftCanvas;
138  int m_xShiftCanvas;
139  int m_yShiftCanvas;
140 
141  };
142 
144 }
145 
146 #endif
Base class for Modules.
Definition: Module.h:72
TCanvas * m_myCanvas[NUMBER_OF_TOP_SLOTS]
TDirectory.
virtual void initialize() override
initialize
virtual void terminate() override
terminate
virtual void beginRun() override
begin Run
Abstract base class for different kinds of events.