Public Member Functions | Private Member Functions | Private Attributes | List of all members
om::HwPCLabel Class Reference

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N20-12-03/OnlineMonitoring/viewer/HwPCLabel.h"

Public Member Functions

 HwPCLabel ()
 
 ~HwPCLabel ()
 
void Config (const TH1 *h, bool isXview)
 
void Draw ()
 
void DrawNDOS (bool isXview)
 

Private Member Functions

void Clear ()
 
void MakeHorizontalLinesX ()
 
void MakeHorizontalLinesY ()
 
void MakeVerticalLinesX ()
 
void MakeVerticalLinesY ()
 
void MakeLabelsX ()
 
void MakeLabelsY ()
 

Private Attributes

int fNdiblock
 
int fNmod
 
std::list< TLine * > fLine
 Collection of line lables. More...
 
TPaveText * fTextTop1
 Text label for the top of the plot. More...
 
TPaveText * fTextTop2
 Text label for the top of the plot. More...
 
TPaveText * fTextTop3
 Text label for the top of the plot. More...
 
TPaveText * fTextSide1
 Text label for the side of the plot. More...
 
TPaveText * fTextSide2
 Text label for the side of the plot. More...
 
TPaveText * fTextSide3
 Text label for the side of the plot. More...
 
TPaveText * fTextSide4
 Text label for the side of the plot. More...
 

Detailed Description

Draw labels on hardware detector view histograms

Definition at line 12 of file HwPCLabel.h.

Constructor & Destructor Documentation

HwPCLabel::HwPCLabel ( )

Definition at line 11 of file HwPCLabel.cxx.

References fTextSide1, fTextSide2, fTextSide3, fTextSide4, fTextTop1, fTextTop2, and fTextTop3.

11  :
12  fNdiblock(0),
13  fNmod(0)
14 {
15  fTextTop1 = new TPaveText(0.1, 0.905, 0.2, 0.925, "NDC");
16  fTextTop2 = new TPaveText(0.3, 0.905, 0.7, 0.925, "NDC");
17  fTextTop3 = new TPaveText(0.8, 0.905, 0.9, 0.925, "NDC");
18 
19  fTextSide1 = new TPaveText(0.04, 0.1, 0.08, 0.2, "NDC");
20  fTextSide2 = new TPaveText(0.04, 0.46, 0.08, 0.49, "NDC");
21  fTextSide3 = new TPaveText(0.04, 0.51, 0.08, 0.54, "NDC");
22  fTextSide4 = new TPaveText(0.04, 0.8, 0.08, 0.9, "NDC");
23 }
TPaveText * fTextTop2
Text label for the top of the plot.
Definition: HwPCLabel.h:32
TPaveText * fTextSide4
Text label for the side of the plot.
Definition: HwPCLabel.h:37
TPaveText * fTextSide2
Text label for the side of the plot.
Definition: HwPCLabel.h:35
TPaveText * fTextSide1
Text label for the side of the plot.
Definition: HwPCLabel.h:34
TPaveText * fTextTop3
Text label for the top of the plot.
Definition: HwPCLabel.h:33
TPaveText * fTextTop1
Text label for the top of the plot.
Definition: HwPCLabel.h:31
TPaveText * fTextSide3
Text label for the side of the plot.
Definition: HwPCLabel.h:36
HwPCLabel::~HwPCLabel ( )

Definition at line 64 of file HwPCLabel.cxx.

References Clear(), fTextSide1, fTextSide2, fTextSide3, fTextSide4, fTextTop1, fTextTop2, and fTextTop3.

65 {
66  this->Clear();
67  if(fTextTop1) { delete fTextTop1; fTextTop1 = 0; }
68  if(fTextTop2) { delete fTextTop2; fTextTop2 = 0; }
69  if(fTextTop3) { delete fTextTop3; fTextTop3 = 0; }
70  if(fTextSide1) { delete fTextSide1; fTextSide1 = 0; }
71  if(fTextSide2) { delete fTextSide2; fTextSide2 = 0; }
72  if(fTextSide3) { delete fTextSide3; fTextSide3 = 0; }
73  if(fTextSide4) { delete fTextSide4; fTextSide4 = 0; }
74 }
TPaveText * fTextTop2
Text label for the top of the plot.
Definition: HwPCLabel.h:32
TPaveText * fTextSide4
Text label for the side of the plot.
Definition: HwPCLabel.h:37
TPaveText * fTextSide2
Text label for the side of the plot.
Definition: HwPCLabel.h:35
TPaveText * fTextSide1
Text label for the side of the plot.
Definition: HwPCLabel.h:34
TPaveText * fTextTop3
Text label for the top of the plot.
Definition: HwPCLabel.h:33
void Clear()
Definition: HwPCLabel.cxx:46
TPaveText * fTextTop1
Text label for the top of the plot.
Definition: HwPCLabel.h:31
TPaveText * fTextSide3
Text label for the side of the plot.
Definition: HwPCLabel.h:36

Member Function Documentation

void HwPCLabel::Clear ( )
private

Definition at line 46 of file HwPCLabel.cxx.

References fLine, fTextSide1, fTextSide2, fTextSide3, fTextSide4, fTextTop1, fTextTop2, fTextTop3, and make_syst_table_plots::line.

Referenced by Config(), DrawNDOS(), and ~HwPCLabel().

47 {
48  std::list<TLine*>::const_iterator line(fLine.begin());
49  std::list<TLine*>::const_iterator lineend(fLine.end());
50  for (; line!=lineend; ++line) delete *line;
51  fLine.clear();
52 
53  fTextTop1->Clear();
54  fTextTop2->Clear();
55  fTextTop3->Clear();
56  fTextSide1->Clear();
57  fTextSide2->Clear();
58  fTextSide3->Clear();
59  fTextSide4->Clear();
60 }
TPaveText * fTextTop2
Text label for the top of the plot.
Definition: HwPCLabel.h:32
TPaveText * fTextSide4
Text label for the side of the plot.
Definition: HwPCLabel.h:37
TPaveText * fTextSide2
Text label for the side of the plot.
Definition: HwPCLabel.h:35
TPaveText * fTextSide1
Text label for the side of the plot.
Definition: HwPCLabel.h:34
TPaveText * fTextTop3
Text label for the top of the plot.
Definition: HwPCLabel.h:33
TPaveText * fTextTop1
Text label for the top of the plot.
Definition: HwPCLabel.h:31
std::list< TLine * > fLine
Collection of line lables.
Definition: HwPCLabel.h:30
TPaveText * fTextSide3
Text label for the side of the plot.
Definition: HwPCLabel.h:36
void HwPCLabel::Config ( const TH1 *  h,
bool  isXview 
)

Definition at line 27 of file HwPCLabel.cxx.

References Clear(), fNdiblock, fNmod, gsNclPERmod, gsNplPERdb, MakeHorizontalLinesX(), MakeHorizontalLinesY(), MakeLabelsX(), MakeLabelsY(), MakeVerticalLinesX(), and MakeVerticalLinesY().

Referenced by om::PlotOptions::MakeLabels().

28 {
29  fNdiblock = h->GetNbinsX()/gsNplPERdb;
30  fNmod = h->GetNbinsY()/gsNclPERmod;
31  this->Clear();
32  if(isXview) {
33  this->MakeLabelsX();
34  this->MakeHorizontalLinesX();
35  this->MakeVerticalLinesX();
36  }
37  else {
38  this->MakeLabelsY();
39  this->MakeHorizontalLinesY();
40  this->MakeVerticalLinesY();
41  }
42 }
void MakeLabelsX()
Definition: HwPCLabel.cxx:161
void MakeVerticalLinesY()
Definition: HwPCLabel.cxx:145
void MakeHorizontalLinesY()
Definition: HwPCLabel.cxx:112
void Clear()
Definition: HwPCLabel.cxx:46
void MakeLabelsY()
Definition: HwPCLabel.cxx:229
void MakeVerticalLinesX()
Definition: HwPCLabel.cxx:129
static const int gsNclPERmod
Definition: HwPCLabel.cxx:9
void MakeHorizontalLinesX()
Definition: HwPCLabel.cxx:95
static const int gsNplPERdb
Definition: HwPCLabel.cxx:8
void HwPCLabel::Draw ( )

Definition at line 78 of file HwPCLabel.cxx.

References fLine, fTextSide1, fTextSide2, fTextSide3, fTextSide4, fTextTop1, fTextTop2, fTextTop3, and make_syst_table_plots::line.

Referenced by om::PlotOptions::MakeLabels().

79 {
80  std::list<TLine*>::const_iterator line(fLine.begin());
81  std::list<TLine*>::const_iterator lineend(fLine.end());
82  for (; line!=lineend; ++line) (*line)->Draw();
83 
84  fTextTop1->Draw();
85  fTextTop2->Draw();
86  fTextTop3->Draw();
87  fTextSide1->Draw();
88  fTextSide2->Draw();
89  fTextSide3->Draw();
90  fTextSide4->Draw();
91 }
TPaveText * fTextTop2
Text label for the top of the plot.
Definition: HwPCLabel.h:32
TPaveText * fTextSide4
Text label for the side of the plot.
Definition: HwPCLabel.h:37
TPaveText * fTextSide2
Text label for the side of the plot.
Definition: HwPCLabel.h:35
TPaveText * fTextSide1
Text label for the side of the plot.
Definition: HwPCLabel.h:34
TPaveText * fTextTop3
Text label for the top of the plot.
Definition: HwPCLabel.h:33
TPaveText * fTextTop1
Text label for the top of the plot.
Definition: HwPCLabel.h:31
std::list< TLine * > fLine
Collection of line lables.
Definition: HwPCLabel.h:30
TPaveText * fTextSide3
Text label for the side of the plot.
Definition: HwPCLabel.h:36
void HwPCLabel::DrawNDOS ( bool  isXview)

Definition at line 297 of file HwPCLabel.cxx.

References Clear(), MakeLabelsX(), and MakeLabelsY().

Referenced by om::PlotOptions::MakeLabels().

298 {
299  // NDOS is an asymmetric little dude, that is different from the ND and FD
300  // so I have to handle drawing his lines as a special case...
301  //
302  // :(
303  //
304  // I decided that I'm just going to skip it for now...
305  //
306  // Take that NDOS!!! How's it feel to be different??!!!
307 
308 
309  // I guess I can draw the text labels though...
310  this->Clear();
311  if(isXview) this->MakeLabelsX();
312  else this->MakeLabelsY();
313 }
void MakeLabelsX()
Definition: HwPCLabel.cxx:161
void Clear()
Definition: HwPCLabel.cxx:46
void MakeLabelsY()
Definition: HwPCLabel.cxx:229
void HwPCLabel::MakeHorizontalLinesX ( )
private

Definition at line 95 of file HwPCLabel.cxx.

References fLine, fNdiblock, fNmod, gsNclPERmod, gsNplPERdb, MECModelEnuComparisons::i, and submit_hadd::l.

Referenced by Config().

96 {
97  int i;
98  TLine* l;
99  for (i = 0; i <= fNmod; ++i) {
100  l = new TLine(0.5, -1*i*gsNclPERmod+0.5,
101  -1*fNdiblock*gsNplPERdb+0.5, -1*i*gsNclPERmod+0.5);
102  if(i ==0 || i == fNmod) l->SetLineWidth(3);
103  else { l->SetLineStyle(2); l->SetLineWidth(1); }
104  l->SetLineColor(kBlack);
105  l->SetBit(kCannotPick);
106  fLine.push_back(l);
107  }
108 }
std::list< TLine * > fLine
Collection of line lables.
Definition: HwPCLabel.h:30
static const int gsNclPERmod
Definition: HwPCLabel.cxx:9
static const int gsNplPERdb
Definition: HwPCLabel.cxx:8
void HwPCLabel::MakeHorizontalLinesY ( )
private

Definition at line 112 of file HwPCLabel.cxx.

References fLine, fNdiblock, fNmod, gsNclPERmod, gsNplPERdb, MECModelEnuComparisons::i, and submit_hadd::l.

Referenced by Config().

113 {
114  int i;
115  TLine* l;
116  for (i = 0; i <= fNmod; ++i) {
117  l = new TLine(0.5, i*gsNclPERmod-0.5,
118  -1*fNdiblock*gsNplPERdb+0.5, i*gsNclPERmod-0.5);
119  if(i ==0 || i == fNmod) l->SetLineWidth(3);
120  else { l->SetLineStyle(2); l->SetLineWidth(1); }
121  l->SetLineColor(kBlack);
122  l->SetBit(kCannotPick);
123  fLine.push_back(l);
124  }
125 }
std::list< TLine * > fLine
Collection of line lables.
Definition: HwPCLabel.h:30
static const int gsNclPERmod
Definition: HwPCLabel.cxx:9
static const int gsNplPERdb
Definition: HwPCLabel.cxx:8
void HwPCLabel::MakeLabelsX ( )
private

Definition at line 161 of file HwPCLabel.cxx.

References fTextSide1, fTextSide2, fTextSide3, fTextSide4, fTextTop1, fTextTop2, and fTextTop3.

Referenced by Config(), and DrawNDOS().

162 {
163  fTextTop1->AddText("#leftarrow North");
164  fTextTop1->SetLineColor(0);
165  fTextTop1->SetFillColor(0);
166  fTextTop1->SetBorderSize(1);
167  fTextTop1->SetMargin(0.0);
168  fTextTop1->SetTextAlign(21);
169  fTextTop1->SetTextSize(0.03);
170  fTextTop1->SetBit(kCannotPick);
171 
172  fTextTop2->AddText("Planes / Diblocks");
173  fTextTop2->SetLineColor(0);
174  fTextTop2->SetFillColor(0);
175  fTextTop2->SetBorderSize(1);
176  fTextTop2->SetMargin(0.0);
177  fTextTop2->SetTextAlign(21);
178  fTextTop2->SetTextSize(0.03);
179  fTextTop2->SetBit(kCannotPick);
180 
181  fTextTop3->AddText("South #rightarrow");
182  fTextTop3->SetLineColor(0);
183  fTextTop3->SetFillColor(0);
184  fTextTop3->SetBorderSize(1);
185  fTextTop3->SetMargin(0.0);
186  fTextTop3->SetTextAlign(21);
187  fTextTop3->SetTextSize(0.03);
188  fTextTop3->SetBit(kCannotPick);
189 
190  fTextSide1->AddText("#downarrow West");
191  fTextSide1->SetLineColor(0);
192  fTextSide1->SetFillColor(0);
193  fTextSide1->SetBorderSize(1);
194  fTextSide1->SetMargin(0.0);
195  fTextSide1->SetTextAlign(21);
196  fTextSide1->SetTextSize(0.03);
197  fTextSide1->SetBit(kCannotPick);
198 
199  fTextSide2->AddText("Modules");
200  fTextSide2->SetLineColor(0);
201  fTextSide2->SetFillColor(0);
202  fTextSide2->SetBorderSize(1);
203  fTextSide2->SetMargin(0.0);
204  fTextSide2->SetTextAlign(21);
205  fTextSide2->SetTextSize(0.03);
206  fTextSide2->SetBit(kCannotPick);
207 
208  fTextSide3->AddText("Cells /");
209  fTextSide3->SetLineColor(0);
210  fTextSide3->SetFillColor(0);
211  fTextSide3->SetBorderSize(1);
212  fTextSide3->SetMargin(0.0);
213  fTextSide3->SetTextAlign(21);
214  fTextSide3->SetTextSize(0.03);
215  fTextSide3->SetBit(kCannotPick);
216 
217  fTextSide4->AddText("#uparrow East");
218  fTextSide4->SetLineColor(0);
219  fTextSide4->SetFillColor(0);
220  fTextSide4->SetBorderSize(1);
221  fTextSide4->SetMargin(0.0);
222  fTextSide4->SetTextAlign(21);
223  fTextSide4->SetTextSize(0.03);
224  fTextSide4->SetBit(kCannotPick);
225 }
TPaveText * fTextTop2
Text label for the top of the plot.
Definition: HwPCLabel.h:32
TPaveText * fTextSide4
Text label for the side of the plot.
Definition: HwPCLabel.h:37
TPaveText * fTextSide2
Text label for the side of the plot.
Definition: HwPCLabel.h:35
TPaveText * fTextSide1
Text label for the side of the plot.
Definition: HwPCLabel.h:34
TPaveText * fTextTop3
Text label for the top of the plot.
Definition: HwPCLabel.h:33
TPaveText * fTextTop1
Text label for the top of the plot.
Definition: HwPCLabel.h:31
TPaveText * fTextSide3
Text label for the side of the plot.
Definition: HwPCLabel.h:36
void HwPCLabel::MakeLabelsY ( )
private

Definition at line 229 of file HwPCLabel.cxx.

References fTextSide1, fTextSide2, fTextSide3, fTextSide4, fTextTop1, fTextTop2, and fTextTop3.

Referenced by Config(), and DrawNDOS().

230 {
231  fTextTop1->AddText("#leftarrow North");
232  fTextTop1->SetLineColor(0);
233  fTextTop1->SetFillColor(0);
234  fTextTop1->SetBorderSize(1);
235  fTextTop1->SetMargin(0.0);
236  fTextTop1->SetTextAlign(21);
237  fTextTop1->SetTextSize(0.03);
238  fTextTop1->SetBit(kCannotPick);
239 
240  fTextTop2->AddText("Planes / Diblocks");
241  fTextTop2->SetLineColor(0);
242  fTextTop2->SetFillColor(0);
243  fTextTop2->SetBorderSize(1);
244  fTextTop2->SetMargin(0.0);
245  fTextTop2->SetTextAlign(21);
246  fTextTop2->SetTextSize(0.03);
247  fTextTop2->SetBit(kCannotPick);
248 
249  fTextTop3->AddText("South #rightarrow");
250  fTextTop3->SetLineColor(0);
251  fTextTop3->SetFillColor(0);
252  fTextTop3->SetBorderSize(1);
253  fTextTop3->SetMargin(0.0);
254  fTextTop3->SetTextAlign(21);
255  fTextTop3->SetTextSize(0.03);
256  fTextTop3->SetBit(kCannotPick);
257 
258  fTextSide1->AddText("#downarrow Bottom");
259  fTextSide1->SetLineColor(0);
260  fTextSide1->SetFillColor(0);
261  fTextSide1->SetBorderSize(1);
262  fTextSide1->SetMargin(0.0);
263  fTextSide1->SetTextAlign(21);
264  fTextSide1->SetTextSize(0.03);
265  fTextSide1->SetBit(kCannotPick);
266 
267  fTextSide2->AddText("Modules");
268  fTextSide2->SetLineColor(0);
269  fTextSide2->SetFillColor(0);
270  fTextSide2->SetBorderSize(1);
271  fTextSide2->SetMargin(0.0);
272  fTextSide2->SetTextAlign(21);
273  fTextSide2->SetTextSize(0.03);
274  fTextSide2->SetBit(kCannotPick);
275 
276  fTextSide3->AddText("Cells /");
277  fTextSide3->SetLineColor(0);
278  fTextSide3->SetFillColor(0);
279  fTextSide3->SetBorderSize(1);
280  fTextSide3->SetMargin(0.0);
281  fTextSide3->SetTextAlign(21);
282  fTextSide3->SetTextSize(0.03);
283  fTextSide3->SetBit(kCannotPick);
284 
285  fTextSide4->AddText("#uparrow Top");
286  fTextSide4->SetLineColor(0);
287  fTextSide4->SetFillColor(0);
288  fTextSide4->SetBorderSize(1);
289  fTextSide4->SetMargin(0.0);
290  fTextSide4->SetTextAlign(21);
291  fTextSide4->SetTextSize(0.03);
292  fTextSide4->SetBit(kCannotPick);
293 }
TPaveText * fTextTop2
Text label for the top of the plot.
Definition: HwPCLabel.h:32
TPaveText * fTextSide4
Text label for the side of the plot.
Definition: HwPCLabel.h:37
TPaveText * fTextSide2
Text label for the side of the plot.
Definition: HwPCLabel.h:35
TPaveText * fTextSide1
Text label for the side of the plot.
Definition: HwPCLabel.h:34
TPaveText * fTextTop3
Text label for the top of the plot.
Definition: HwPCLabel.h:33
TPaveText * fTextTop1
Text label for the top of the plot.
Definition: HwPCLabel.h:31
TPaveText * fTextSide3
Text label for the side of the plot.
Definition: HwPCLabel.h:36
void HwPCLabel::MakeVerticalLinesX ( )
private

Definition at line 129 of file HwPCLabel.cxx.

References fLine, fNdiblock, fNmod, gsNclPERmod, gsNplPERdb, MECModelEnuComparisons::i, and submit_hadd::l.

Referenced by Config().

130 {
131  int i;
132  TLine* l;
133  for (i = 0; i <= fNdiblock; ++i) {
134  l = new TLine(-1*i*gsNplPERdb+0.5, 0.5,
135  -1*i*gsNplPERdb+0.5, -1*fNmod*gsNclPERmod+0.5);
136  l->SetLineWidth(3);
137  l->SetLineColor(kBlack);
138  l->SetBit(kCannotPick);
139  fLine.push_back(l);
140  }
141 }
std::list< TLine * > fLine
Collection of line lables.
Definition: HwPCLabel.h:30
static const int gsNclPERmod
Definition: HwPCLabel.cxx:9
static const int gsNplPERdb
Definition: HwPCLabel.cxx:8
void HwPCLabel::MakeVerticalLinesY ( )
private

Definition at line 145 of file HwPCLabel.cxx.

References fLine, fNdiblock, fNmod, gsNclPERmod, gsNplPERdb, MECModelEnuComparisons::i, and submit_hadd::l.

Referenced by Config().

146 {
147  int i;
148  TLine* l;
149  for (i = 0; i <= fNdiblock; ++i) {
150  l = new TLine(-1*i*gsNplPERdb+0.5, -0.5,
151  -1*i*gsNplPERdb+0.5, fNmod*gsNclPERmod-0.5);
152  l->SetLineWidth(3);
153  l->SetLineColor(kBlack);
154  l->SetBit(kCannotPick);
155  fLine.push_back(l);
156  }
157 }
std::list< TLine * > fLine
Collection of line lables.
Definition: HwPCLabel.h:30
static const int gsNclPERmod
Definition: HwPCLabel.cxx:9
static const int gsNplPERdb
Definition: HwPCLabel.cxx:8

Member Data Documentation

std::list<TLine*> om::HwPCLabel::fLine
private

Collection of line lables.

Definition at line 30 of file HwPCLabel.h.

Referenced by Clear(), Draw(), MakeHorizontalLinesX(), MakeHorizontalLinesY(), MakeVerticalLinesX(), and MakeVerticalLinesY().

int om::HwPCLabel::fNdiblock
private
int om::HwPCLabel::fNmod
private
TPaveText* om::HwPCLabel::fTextSide1
private

Text label for the side of the plot.

Definition at line 34 of file HwPCLabel.h.

Referenced by Clear(), Draw(), HwPCLabel(), MakeLabelsX(), MakeLabelsY(), and ~HwPCLabel().

TPaveText* om::HwPCLabel::fTextSide2
private

Text label for the side of the plot.

Definition at line 35 of file HwPCLabel.h.

Referenced by Clear(), Draw(), HwPCLabel(), MakeLabelsX(), MakeLabelsY(), and ~HwPCLabel().

TPaveText* om::HwPCLabel::fTextSide3
private

Text label for the side of the plot.

Definition at line 36 of file HwPCLabel.h.

Referenced by Clear(), Draw(), HwPCLabel(), MakeLabelsX(), MakeLabelsY(), and ~HwPCLabel().

TPaveText* om::HwPCLabel::fTextSide4
private

Text label for the side of the plot.

Definition at line 37 of file HwPCLabel.h.

Referenced by Clear(), Draw(), HwPCLabel(), MakeLabelsX(), MakeLabelsY(), and ~HwPCLabel().

TPaveText* om::HwPCLabel::fTextTop1
private

Text label for the top of the plot.

Definition at line 31 of file HwPCLabel.h.

Referenced by Clear(), Draw(), HwPCLabel(), MakeLabelsX(), MakeLabelsY(), and ~HwPCLabel().

TPaveText* om::HwPCLabel::fTextTop2
private

Text label for the top of the plot.

Definition at line 32 of file HwPCLabel.h.

Referenced by Clear(), Draw(), HwPCLabel(), MakeLabelsX(), MakeLabelsY(), and ~HwPCLabel().

TPaveText* om::HwPCLabel::fTextTop3
private

Text label for the top of the plot.

Definition at line 33 of file HwPCLabel.h.

Referenced by Clear(), Draw(), HwPCLabel(), MakeLabelsX(), MakeLabelsY(), and ~HwPCLabel().


The documentation for this class was generated from the following files: