Belle II Software development
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
50namespace Belle2 {
57
58 public:
61
64 // virtual ~TRGTOPWaveformPlotterModule();
65
66 public:
67
69 virtual void initialize() override;
71 virtual void beginRun() override;
73 virtual void event() override;
75 virtual void endRun() override;
77 // virtual void terminate() override {}
78 virtual void terminate() override;
79
80 private:
81
83 // TDirectory* oldROOTDir = nullptr;
85 // TDirectory* myROOTDir = nullptr;
86
88 // TFile* m_file;
89
90 TCanvas* m_myCanvas[NUMBER_OF_TOP_SLOTS];
91
92 TGraph* m_timeStampsGraphMainReadout[NUMBER_OF_TOP_SLOTS];
93 TGraph* m_timeStampsGraphTriggerReadout[NUMBER_OF_TOP_SLOTS];
94
95 TMultiGraph* m_myMultiGraph[NUMBER_OF_TOP_SLOTS];
96
97 TPaveText* m_myPaveText[NUMBER_OF_TOP_SLOTS];
98
99 Int_t m_timeStampsMainReadout[NUMBER_OF_TOP_SLOTS][MAX_NUMBER_OF_CLOCK_CYCLES];
100 Int_t m_timeStampsTriggerReadout[NUMBER_OF_TOP_SLOTS][MAX_NUMBER_OF_CLOCK_CYCLES];
101
102 Int_t m_clockCyclesMainReadout[NUMBER_OF_TOP_SLOTS][MAX_NUMBER_OF_CLOCK_CYCLES];
103 Int_t m_clockCyclesTriggerReadout[NUMBER_OF_TOP_SLOTS][MAX_NUMBER_OF_CLOCK_CYCLES];
104
105 // various parameters and their interpretation
106
107 int m_plottingMode;
108
109 double m_markerSizeHits;
110 double m_markerSizeTimestamps;
111
112 int m_markerTypeHits;
113 int m_markerTypeTimestamps;
114
115 int m_firstAssumedClockCycle;
116
117 int m_cutPlotMinNumberTriggerReadoutHits;
118
119 int m_cutPlotMinNumberMainReadoutHits;
120
121 int m_xMin;
122 int m_xMax;
123 int m_yMin;
124 int m_yMax;
125
126 int m_showGridx;
127 int m_showGridy;
128
129 int m_canvasXMin;
130 int m_canvasYMin;
131 int m_canvasXSize;
132 int m_canvasYSize;
133
134 int m_shiftCanvas;
135 int m_xShiftCanvas;
136 int m_yShiftCanvas;
137
138 };
139
141}
142
143#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.