Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
BbcMonDraw.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file BbcMonDraw.h
1 #ifndef BBC_BBCMONDRAW_H
2 #define BBC_BBCMONDRAW_H
3 
4 #include "BbcMonDefs.h"
5 
6 #include <onlmon/OnlMonDraw.h>
7 
8 #include <string> // for allocator, string
9 
10 class OnlMonDB;
11 class TCanvas;
12 class TGraphErrors;
13 class TPad;
14 class TStyle;
15 class TPaveText;
16 class TText;
17 class TArc;
18 class TLine;
19 class TBox;
20 class TH1;
21 class TH2;
22 class TGraph;
23 class TArrow;
24 class TF1;
25 class TLatex;
26 class TSpectrum;
27 
28 #define MAX_WARNING 16
29 
30 class BbcMonDraw : public OnlMonDraw
31 {
32  public:
33  explicit BbcMonDraw(const std::string &name);
34 
35  ~BbcMonDraw() override;
36 
37  int Init() override;
38  int Draw(const std::string &what = "ALL") override;
39  int MakeHtml(const std::string &what = "ALL") override;
40  int SavePlot(const std::string &what = "ALL", const std::string &type = "png") override;
41 
42  protected:
43  TStyle *bbcStyle = nullptr;
44 
45  int MakeCanvas(const std::string &name);
46  int DrawFirst(const std::string &what = "ALL");
47  int DrawSecond(const std::string &what = "ALL");
48  int DrawHistory(const std::string &what = "ALL");
49  int TimeOffsetTicks = -1;
50 
51  int Warning(TPad *pad, const float x, const float y, const int r, const std::string &msg);
52  int ClearWarning(void);
53 
54  OnlMonDB *dbvars = nullptr;
55 
56  TCanvas *TC[nCANVAS] = {nullptr};
57  TPad *transparent[nCANVAS] = {nullptr};
58 
59  TPad *Pad[6] = {nullptr};
60 
61  // for all Pages
62  TPad *PadTop[nCANVAS] = {};
63  TPaveText *PaveTop = nullptr;
64  TText *TextTop = nullptr;
65 
66  TPaveText *PaveWarning[MAX_WARNING] = {};
67  TArc *ArcWarning[MAX_WARNING] = {};
68  TPad *PadWarning[MAX_WARNING] = {};
70  int nWarning = 0;
71 
72  // for the 1st Page
73  TGraphErrors *TdcOver[nSIDE] = {};
74  TPad *PadTdcOver[nSIDE] = {};
75  TLine *LineTdcOver[nSIDE][2] = {};
76  TBox *BoxTdcOver[nSIDE] = {};
77  TH1 *FrameTdcOver[nSIDE] = {};
78 
79  TGraph *nHit[nTRIGGER][nSIDE] = {};
80  TPad *PadnHit[nSIDE] = {};
81  TLine *LinenHit[nTRIGGER][nSIDE][2] = {};
82  TBox *BoxnHit[nTRIGGER][nSIDE] = {};
83  TPad *PadnHitStatus = nullptr;
84  TText *TextnHitStatus = nullptr;
85  TH1 *FramenHit[nSIDE] = {};
86 
87  // for 2nd Page
88  TH1 *HitTime[nSIDE] = {};
89  TPad *PadHitTime[nSIDE] = {};
90  TLine *LineHitTime[nSIDE][2] = {};
91  TArrow *ArrowHitTime[nSIDE] = {};
92  TText *TextHitTime[nSIDE] = {};
93  TF1 *FitHitTime[nSIDE] = {};
94 
95  TH1 *AvrHitTime = nullptr;
96  TPad *PadAvrHitTime = nullptr;
97  TLine *LineAvrHitTime[2] = {};
98  TArrow *ArrowAvrHitTime = nullptr;
99  TText *TextAvrHitTime = nullptr;
100  TF1 *FitAvrHitTime = nullptr;
101 
102  TH1 *SouthHitTime = nullptr;
103  TPad *PadSouthHitTime = nullptr;
104  TLine *LineSouthHitTime[2] = {};
105  TArrow *ArrowSouthHitTime = nullptr;
106  TText *TextSouthHitTime = nullptr;
107  TF1 *FitSouthHitTime = nullptr;
108 
109  TH1 *NorthHitTime = nullptr;
110  TPad *PadNorthHitTime = nullptr;
111  TLine *LineNorthHitTime[2] = {};
112  TArrow *ArrowNorthHitTime = nullptr;
113  TText *TextNorthHitTime = nullptr;
114  TF1 *FitNorthHitTime = nullptr;
115 
116  TH1 *SouthChargeSum = nullptr;
117  TH1 *NorthChargeSum = nullptr;
118  TPad *PadChargeSum = nullptr;
119  TText *TextSouthChargeSum = nullptr;
120  TText *TextNorthChargeSum = nullptr;
121 
122  TH2 *TimeWave = nullptr;
123  TPad *PadTimeWave = nullptr;
124 
125  TH2 *ChargeWave = nullptr;
126  TPad *PadChargeWave = nullptr;
127 
128  TH2 *SouthHitMap = nullptr;
129  TPad *PadSouthHitMap = nullptr;
130 
131  TH2 *NorthHitMap = nullptr;
132  TPad *PadNorthHitMap = nullptr;
133 
134  TLine *LineTzeroZvtx[4] = {};
135  TText *TextTzeroZvtx = nullptr;
136 
137  TPad *PadBbcSummary = nullptr;
138  // TText * TextBbcSummaryHitTime = nullptr;
139  TText *TextBbcSummaryHitTime[2] = {};
141  TText *TextBbcSummaryZvertex = nullptr;
142  // TText * TextBbcSummaryTrigRate = nullptr;
143  TLatex *TextBbcSummaryTrigRate = nullptr;
144 
145  TH1 *Zvtx = nullptr;
146  TH1 *Zvtx_bbll1 = nullptr;
147  // TH1 * Zvtx_zdc = nullptr;
148  // TH1 * Zvtx_zdc_scale3 = nullptr;
149  TH1 *Zvtx_bbll1_novtx = nullptr;
150  TH1 *Zvtx_bbll1_narrowvtx = nullptr;
151  // TH1 * Zvtx_bbll1_zdc = nullptrNor;
152  TPad *PadZvtx = nullptr;
153  TF1 *FitZvtx = nullptr;
154  TLine *LineZvtx[2] = {};
155  TArrow *ArrowZvtx = nullptr;
156  TText *TextZvtx = nullptr;
157  TText *TextZvtxNorth = nullptr;
158  TText *TextZvtxSouth = nullptr;
159 
160  TH2 *ArmHit = nullptr;
161  TPad *PadArmHit = nullptr;
162  TText *TextArmHit = nullptr;
163  TArc *ArcArmHit = nullptr;
164 
165  // for 3rd Page
166  // It is for Only Expert
167  TH2 *Adc = nullptr;
168  TPad *PadAdc = nullptr;
169 
170  TPad *PadButton = nullptr;
171  TPad *PadMultiView = nullptr;
172  TH1 *MultiView1F = nullptr;
173  TH2 *MultiView2F = nullptr;
174  TPad *PadWarnings = nullptr;
175  TPaveText *PaveWarnings = nullptr;
176 
177  // for 4th Page
178  // Vertex Monitor
179  TPad *PadZVertex = nullptr;
180  TPad *PadTzeroZVertex = nullptr;
181  TPad *PadZVertexSummary = nullptr;
182  TText *TextZVertexExpress = nullptr;
183  TText *TextZVertexNotice = nullptr;
184 
185  // TText * TextZVertex[3] = {};
186  // TText * TextZVertex_scale[3] = {};
187  // TText * TextZVertex[4] = {};
188  // TText * TextZVertex_scale[4] = {};
189  // TText * TextZVertex_mean[4] = {};
190  TText *TextZVertex[5] = {}; // RUN11 pp
191  TText *TextZVertex_scale[5] = {}; // RUN11 pp
192  TText *TextZVertex_mean[5] = {}; // RUN11 pp
193 
194  TLatex *TextZvtxStatus[2] = {};
195 
196  TH2 *TzeroZvtx = nullptr;
197 
198  // Scale down factor
199  TH1 *Prescale_hist = nullptr;
200  TSpectrum *tspec = nullptr;
201 
202 private:
203  int DrawDeadServer(TPad *transparent_pad) override;
204 
205 };
206 
207 #endif /* BBC_BBCMONDRAW_H */