Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TEveCaloLegoOverlay.cxx
Go to the documentation of this file.
1// @(#)root/eve:$Id$
2// Author: Alja Mrak-Tadel 2007
3
4/*************************************************************************
5 * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11
12#include "TEveCaloLegoOverlay.h"
13#include "TEveCaloLegoGL.h"
14
15#include "TAxis.h"
16#include "THLimitsFinder.h"
17
18#include "TGLRnrCtx.h"
19#include "TGLIncludes.h"
20#include "TGLSelectRecord.h"
21#include "TGLUtil.h"
22#include "TGLViewerBase.h"
23#include "TGLCamera.h"
24#include "TGLAxisPainter.h"
25#include "TGLFontManager.h"
26
27#include "TEveCalo.h"
28#include "TEveCaloData.h"
29#include "TEveRGBAPalette.h"
30
31#include <KeySymbols.h>
32
33
34/** \class TEveCaloLegoOverlay
35\ingroup TEve
36GL-overlay control GUI for TEveCaloLego.
37*/
38
39
40////////////////////////////////////////////////////////////////////////////////
41/// Constructor.
42
45
46 fCalo(nullptr),
47
48 fShowScales(kTRUE),
49 fScaleColor(-1), fScaleTransparency(0),
50 fScaleCoordX(0.85), fScaleCoordY(0.65),
51 fScaleW(0), fScaleH(0),
52 fCellX(-1), fCellY(-1),
53
54 fFrameColor(-1), fFrameLineTransp(70), fFrameBgTransp(90),
55
56 fMouseX(0), fMouseY(0),
57 fInDrag(kFALSE),
58
59 fHeaderSelected(kFALSE),
60
61 fPlaneAxis(nullptr), fAxisPlaneColor(kGray),
62 fShowPlane(kFALSE),
63
64 fMenuW(0.08),
65 fButtonW(0.5),
66 fShowSlider(kFALSE),
67 fSliderH(0.6),
68 fSliderPosY(0.15),
69 fSliderVal(0),
70
71 fActiveID(-1), fActiveCol(kRed-4)
72{
73 fPlaneAxis = new TAxis();
74}
75
76/******************************************************************************/
77// Virtual event handlers from TGLOverlayElement
78/******************************************************************************/
79
81{
82 // Set height of horizontal plane in the calorimeter.
83
84 TGLRect& wprt = rnrCtx.RefCamera().RefViewport();
85 fSliderVal = (1 -event->fY*1./wprt.Height() -fSliderPosY)/fSliderH;
86
87 if (fSliderVal < 0 )
88 fSliderVal = 0;
89 else if (fSliderVal > 1)
90 fSliderVal = 1;
91
93
94 return kTRUE;
95}
96
97////////////////////////////////////////////////////////////////////////////////
98/// Handle overlay event.
99/// Return TRUE if event was handled.
100
103 Event_t * event)
104{
105 if (selRec.GetN() < 2) return kFALSE;
106
107
108 if (rnrCtx.RefCamera().IsOrthographic())
109 {
110 switch (event->fType)
111 { case kButtonPress:
112 {
113 fMouseX = event->fX;
114 fMouseY = event->fY;
115 fInDrag = kTRUE;
116 return kTRUE;
117 }
118 case kButtonRelease:
119 {
120 fInDrag = kFALSE;
121 return kTRUE;
122 }
123 case kMotionNotify:
124 {
125 if (fInDrag)
126 {
127 const TGLRect& vp = rnrCtx.RefCamera().RefViewport();
128 fScaleCoordX += (Float_t)(event->fX - fMouseX) / vp.Width();
129 fScaleCoordY -= (Float_t)(event->fY - fMouseY) / vp.Height();
130 fMouseX = event->fX;
131 fMouseY = event->fY;
132 // Make sure we don't go offscreen (use fDraw variables set in draw)
133 if (fScaleCoordX < 0)
134 fScaleCoordX = 0;
135 else if (fScaleCoordX + fScaleW > 1.0f)
136 fScaleCoordX = 1.0f - fScaleW;
137 if (fScaleCoordY < 0)
138 fScaleCoordY = 0;
139 else if (fScaleCoordY + fScaleH > 1.0f)
140 fScaleCoordY = 1.0f - fScaleH;
141 }
142 return kTRUE;
143 }
144 default:
145 break;
146 }
147 }
148
149 else
150 {
151 switch (event->fType)
152 {
153 case kMotionNotify:
154 {
155 Int_t item = selRec.GetN() < 2 ? -1 : (Int_t)selRec.GetItem(1);
156 if (fActiveID != item) {
157 fActiveID = item;
158 return kTRUE;
159 } else {
160 if (fActiveID == 2 && event->fState == 256)
161 return SetSliderVal(event, rnrCtx);
162
163 return kFALSE;
164 }
165 break;
166 }
167 case kButtonPress:
168 {
169 if (event->fCode != kButton1) {
170 return kFALSE;
171 }
172 switch (selRec.GetItem(1))
173 {
174 case 1:
177 break;
178 case 2:
179 return SetSliderVal(event, rnrCtx);
180 case 3:
182 default:
183 break;
184 }
185 }
186 default:
187 break;
188 }
189 }
190
191 return kFALSE;
192}
193
194////////////////////////////////////////////////////////////////////////////////
195/// Mouse has entered overlay area.
196
201
202////////////////////////////////////////////////////////////////////////////////
203/// Mouse has left overlay area.
204
209
210////////////////////////////////////////////////////////////////////////////////
211/// Set color and transparency of scales.
212
218
219////////////////////////////////////////////////////////////////////////////////
220/// Set scale coordinates in range [0,1].
221
227
228////////////////////////////////////////////////////////////////////////////////
229/// Set frame attributes.
230
237
238//==============================================================================
240{
241 // Render text on top right corner of the screen.
242
243 TGLRect &vp = rnrCtx.GetCamera()->RefViewport();
244
245 TGLFont font;
246 Int_t fs = TMath::Max(TMath::Nint(vp.Height()*0.035), 12);
247 rnrCtx.RegisterFontNoScale(fs, "arial", TGLFont::kPixmap, font);
248 font.PreRender();
249 Float_t off = fs*0.2;
250 Float_t bb[6];
251 font.BBox(fHeaderTxt.Data(), bb[0], bb[1], bb[2], bb[3], bb[4], bb[5]);
252 Float_t x = vp.Width() -bb[3] -off;
253 Float_t y = vp.Height() -bb[4] -off;
254 if (rnrCtx.Selection())
255 {
256 glPushName(0);
257 glLoadName(3);
259 glVertex2f(x/vp.Width(), y/ vp.Height());
260 glVertex2f(1, y/ vp.Height());
261 glVertex2f(1, 1);
262 glVertex2f(x/vp.Width(), 1);
263 glEnd();
264 glPopName();
265 }
266 else
267 {
269 glRasterPos2i(0, 0);
270 glBitmap(0, 0, 0, 0, x, y, nullptr);
271 font.Render(fHeaderTxt.Data());
272 }
273 font.PostRender();
274}
275
276////////////////////////////////////////////////////////////////////////////////
277/// Render menu for plane-value and the plane if marked.
278
280{
286 glPolygonOffset(0.1, 1);
290
291 // move to the center of menu
292 Double_t maxVal = fCalo->GetMaxVal();
293
294 // button
295 glPushMatrix();
296 glTranslatef(1 -fMenuW, (1-fButtonW )*fMenuW*0.8, 0);
297
298 glPushName(0);
299 glLoadName(1);
300 Float_t a=0.6;
303 Float_t bwt = bw*0.8;
306 glVertex2f(-bw, 0);
307 glVertex2f( bw, 0);
308 glVertex2f( bwt, bh);
309 glVertex2f(-bwt, bh);
310 glEnd();
311
312
314 glBegin(GL_LINES);
316 glVertex2f(0, 0); glVertex2f(0, bh);
317 glVertex2f((bw+bwt)*0.5, bh*0.5); glVertex2f(-(bw+bwt)*0.5, bh*0.5);
318 glEnd();
319
321 glBegin(GL_LINE_LOOP);
322 glVertex2f(-bw, 0);
323 glVertex2f( bw, 0);
324 glVertex2f( bwt, bh);
325 glVertex2f(-bwt, bh);
326 glEnd();
328
329 glTranslatef(0, fSliderPosY, 0.5);
330
331 if (fShowSlider)
332 {
333 // event handler
334 if (rnrCtx.Selection())
335 {
336 glLoadName(2);
337 Float_t w = fButtonW*fMenuW*0.5f;
339 glVertex2f(-w, 0);
340 glVertex2f( w, 0);
343 glEnd();
344 }
345
346 // slider axis
347 fAxisPainter->SetLabelPixelFontSize(TMath::CeilNint(rnrCtx.GetCamera()->RefViewport().Height()*GetAttAxis()->GetLabelSize()));
348 fAxisPainter->RefDir().Set(0, 1, 0);
349 fAxisPainter->RefTMOff(0).Set(1, 0, 0);
351 fPlaneAxis->SetRangeUser(0, maxVal);
352 fPlaneAxis->SetLimits(0, maxVal);
354 fPlaneAxis->SetTickLength(0.02*maxVal);
355 fPlaneAxis->SetLabelOffset(0.02*maxVal);
357
358 glPushMatrix();
359 glScalef(fSliderH/(maxVal), fSliderH/maxVal, 1.);
361 glPopMatrix();
362
363 // marker
364 TGLUtil::Color((fActiveID == 2) ? fActiveCol : 3);
366 glBegin(GL_POINTS);
368 glEnd();
369 }
370
371 glPopName();
372 glPopMatrix();
373 glPopAttrib();
374}
375
376/******************************************************************************/
378{
379 // Draw slider of calo 2D in mode TEveCalo:fValSize.
380
381 TGLRect &vp = rnrCtx.GetCamera()->RefViewport();
382
383 Double_t maxVal = fCalo->GetMaxVal();
384 Int_t maxe = TMath::CeilNint(TMath::Log10(maxVal+1)); // max round exponent
385 Double_t sqv = TMath::Power(10, maxe)+1; // starting max square value
389
390 Double_t scaleStepY = 0.1; // step is 10% of screen
391 Double_t scaleStepX = scaleStepY*vp.Height()/vp.Width(); // step is 10% of screen
392
393 Double_t frameOff = 0.01;
394
395 // define max starting exponent not to take more than scalStepY height
396 while(cellY > scaleStepY)
397 {
399 maxe --;
400 cellX *= fc;
401 cellY *= fc;
402 }
403
404 sqv = TMath::Power(10, maxe)+1;
405 glPushMatrix();
406 glTranslatef(fScaleCoordX + 0.5*scaleStepX + frameOff, fScaleCoordY + 0.5*scaleStepY + frameOff, 0); // translate to lower left corner
407
413 glPolygonOffset(0.1, 1);
414
415 glPushName(0);
416 glLoadName(1);
417
418 // draw cells
419 Color_t color = fScaleColor > -1 ? fScaleColor : rnrCtx.ColorSet().Markup().GetColorIndex();
421
422 Float_t pos, dx, dy;
424 Int_t ne = 3; // max number of columns
425 for (Int_t i=0; i < ne; ++i)
426 {
428 dx = 0.5* cellX * valFac;
429 dy = 0.5* cellY * valFac;
430 pos = i* scaleStepY;
431 glVertex2f( - dx, pos - dy);
432 glVertex2f( - dx, pos + dy);
433 glVertex2f( + dx, pos + dy);
434 glVertex2f( + dx, pos - dy);
435 }
436 glEnd();
437
438 // draw points in case square is below pixels
439 glBegin(GL_POINTS);
440 for (Int_t i=0; i < ne; ++i)
441 glVertex2f(0, i* scaleStepY);
442 glEnd();
443
444 // draw numbers
446 Int_t fsb = TMath::Max(TMath::Nint(vp.Height()*0.03), 12);
447 rnrCtx.RegisterFontNoScale(fsb, "arial", TGLFont::kPixmap, fontB);
449 Int_t fsE = TMath::Max(TMath::Nint(vp.Height()*0.01), 8);
450 rnrCtx.RegisterFontNoScale(fsE, "arial", TGLFont::kPixmap, fontE);
451
452 Float_t llx, lly, llz, urx, ury, urz;
453 fontB.BBox("10", llx, lly, llz, urx, ury, urz);
454 Float_t expX = urx/vp.Width();
455 Float_t expY = (ury-lly)*0.5/vp.Height();
456 Float_t expOff = 1;
457 fontB.PreRender();
458 fontE.PreRender();
459 glPushMatrix();
460 glTranslatef(0.5*scaleStepX, 0, 0.1);
461 for (Int_t i = 0; i < ne; ++i)
462 {
463 if (i == maxe)
464 {
465 fontB.Render("1", 0, i*scaleStepY, 0, TGLFont::kLeft, TGLFont::kCenterV);
466 }
467 else if ( i == (maxe -1))
468 {
469 fontB.Render("10", 0, i*scaleStepY, 0, TGLFont::kLeft, TGLFont::kCenterV);
470 }
471 else
472 {
473 fontB.Render("10", 0, i*scaleStepY, 0, TGLFont::kLeft, TGLFont::kCenterV);
474 fontB.BBox(Form("%d", maxe-i), llx, lly, llz, urx, ury, urz);
475 if (expOff > urx/vp.Width()) expOff = urx/vp.Width();
477 }
478 }
479 glPopMatrix();
480 fontB.PostRender();
481 fontE.PostRender();
482 if (expOff < 1) expX += expOff;
483 glPopMatrix();
484
485 // draw frame
486 {
490 Double_t x1 = x0 + fScaleW;
492 Double_t y1 = y0 + fScaleH;
493 Double_t zf = +0.2;
494
495 color = fFrameColor > -1 ? fFrameColor : rnrCtx.ColorSet().Markup().GetColorIndex();
497
498 glBegin(GL_LINE_LOOP);
499 glVertex3f(x0, y0, zf); glVertex3f(x1, y0, zf);
500 glVertex3f(x1, y1, zf); glVertex3f(x0, y1, zf);
501 glEnd();
502
505 glVertex2f(x0, y0); glVertex2f(x1, y0);
506 glVertex2f(x1, y1); glVertex2f(x0, y1);
507 glEnd();
508 }
509 glPopName();
510
511 glPopAttrib();
512} // end draw scales
513
514////////////////////////////////////////////////////////////////////////////////
515
517{
518 // Draw slider of calo 2D in mode TEveCalo:fValColor.
519
524 glPolygonOffset(0.1, 1);
525
526 TGLRect& vp = rnrCtx.RefCamera().RefViewport();
527 Double_t maxVal = fCalo->GetMaxVal();
528 Int_t bn = 0;
529 Double_t bw = 0; // bin with first second order
530 Double_t bl = 0, bh = 0; // bin low, high first
531 THLimitsFinder::Optimize(0, maxVal, 10, bl, bh, bn, bw);
532 bn = TMath::CeilNint(maxVal/bw) + 1;
533
534 fScaleH = 0.25; // relative height of the scale
535 fScaleW = fScaleH*1.5/(bn*vp.Aspect());
536 Float_t h = 0.5 * bw ;
537 Float_t w = h * 1.5/ vp.Aspect();
538
539 glPushMatrix();
540 glTranslatef(fScaleCoordX + fScaleW*0.5, fScaleCoordY + fScaleH/bn*0.5, 0); // translate to lower left corner
541 glScalef(fScaleH/(bn*bw), fScaleH/(bn*bw), 1.);
542
543 glPushName(0);
544 glLoadName(1);
546 labVec.clear();
547 Float_t val = 0;
548 for (Int_t l= 0; l<bn; l++) {
549 labVec.push_back( TGLAxisPainter::Lab_t(val, val));
550 val += bw;
551 }
552
553 TGLUtil::Color(rnrCtx.ColorSet().Markup().GetColorIndex());
554 fAxisPainter->RefDir().Set(0, 1, 0);
555 Int_t fs = TMath::CeilNint(rnrCtx.GetCamera()->RefViewport().Height()*0.02);
557 fAxisPainter->SetTextFormat(0, maxVal, bw);
562
563 UChar_t c[4];
564 Float_t y;
565 Double_t zf = +0.2;
567 for (TGLAxisPainter::LabVec_t::iterator it = labVec.begin(); it != labVec.end(); ++it)
568 {
569 fCalo->GetPalette()->ColorFromValue((Int_t)((*it).first), c);
570 glColor4ub( c[0], c[1], c[2], c[3]);
571
572 y = (*it).second;
573 glVertex3f( -w, y - h, zf); glVertex3f( +w, y - h, zf);
574 glVertex3f( +w, y + h, zf); glVertex3f( -w, y + h, zf);
575 }
576 glEnd();
577
578 TGLUtil::Color(rnrCtx.ColorSet().Markup().GetColorIndex());
579 glBegin(GL_LINE_LOOP);
580 for (TGLAxisPainter::LabVec_t::iterator it = labVec.begin(); it != labVec.end(); ++it)
581 {
582 y = (*it).second;
583 glVertex3f( -w, y - h, zf); glVertex3f( +w, y - h, zf);
584 glVertex3f( +w, y + h, zf); glVertex3f( -w, y + h, zf);
585 }
586 glEnd();
587
588 glPopName();
589 glPopMatrix();
590 glPopAttrib();
591}
592
593////////////////////////////////////////////////////////////////////////////////
594
596{
597 // Draw calorimeter scale info and plane interface.
598
599 if ( fCalo == nullptr || fCalo->GetData()->Empty()) return;
600
603 glDepthRange(0, 0.001);
604
606 glPushMatrix();
608 if (rnrCtx.Selection())
609 {
610 TGLRect rect(*rnrCtx.GetPickRectangle());
611 rnrCtx.GetCamera()->WindowToViewport(rect);
612 gluPickMatrix(rect.X(), rect.Y(), rect.Width(), rect.Height(),
613 (Int_t*) rnrCtx.GetCamera()->RefViewport().CArr());
614 }
616 glPushMatrix();
618
619 glTranslatef(-1, -1, 0);
620 glScalef(2, 2, 1);
621
622
624 TGLCamera& cam = rnrCtx.RefCamera();
626
627 if (cam.IsOrthographic())
628 {
629 // in 2D need pixel cell dimension
630 // project lego eta-phi boundaries
633 TGLVector3 res = cam.WorldDeltaToViewport(p, rng);
634
635 TEveCaloLegoGL* lgl = dynamic_cast<TEveCaloLegoGL*>(rnrCtx.RefViewer().FindLogicalInScenes(fCalo));
636 if (fShowScales && lgl)
637 {
638
639 // get smallest bin
640 Double_t sq = 1e4;
641 if (lgl->fBinStep == 1)
642 {
644 for ( TEveCaloData::vCellId_t::iterator i = fCalo->fCellList.begin(); i != fCalo->fCellList.end(); ++i)
645 {
647 if (sq > cellData.EtaDelta()) sq = cellData.EtaDelta();
648 if (sq > cellData.PhiDelta()) sq = cellData.PhiDelta();
649 }
650 }
651 else
652 {
653 TAxis* a;
654 Int_t nb;
655 a = fCalo->GetData()->GetEtaBins();
656 nb = a->GetNbins();
657 for (Int_t i=1 ; i<=nb; i++)
658 {
659 if (sq > a->GetBinWidth(i)) sq = a->GetBinWidth(i);
660 }
661
662 a = fCalo->GetData()->GetPhiBins();
663 nb = a->GetNbins();
664 for (Int_t i=1 ; i<=nb; i++)
665 {
666 if (sq > a->GetBinWidth(i)) sq = a->GetBinWidth(i);
667 }
668
669 sq *= lgl->fBinStep;
670 }
671 fCellX = (res.X()*sq)/(fCalo->GetEtaRng()*1.*cam.RefViewport().Width());
672 fCellY = (res.Y()*sq)/(fCalo->GetPhiRng()*1.*cam.RefViewport().Height());
673 // printf("bin width %f cells size %f %f\n", sq, fCellX, fCellY);
676 else if (fCalo->GetPalette())
678 }
679
680 // draw camera overlay if projected lego bbox to large
682 if ( fCalo->GetEtaMin() > fFrustum[0] && fCalo->GetEtaMax() < fFrustum[2]
683 && fCalo->GetPhiMin() > fFrustum[1] && fCalo->GetPhiMax() < fFrustum[3])
685 }
686
687 if (cam.IsPerspective() && fShowPlane)
688 {
690 }
691
692 // draw info text on top right corner
693 if (fHeaderTxt.Length())
694 {
696 }
697
698 glPopMatrix();
700 glPopMatrix();
702
704
706}
@ kButtonRelease
Definition GuiTypes.h:60
@ kButtonPress
Definition GuiTypes.h:60
@ kMotionNotify
Definition GuiTypes.h:61
@ kButton1
Definition GuiTypes.h:214
#define c(i)
Definition RSha256.hxx:101
#define a(i)
Definition RSha256.hxx:99
#define h(i)
Definition RSha256.hxx:106
int Int_t
Signed integer 4 bytes (int)
Definition RtypesCore.h:59
short Color_t
Color number (short)
Definition RtypesCore.h:99
char Char_t
Character 1 byte (char)
Definition RtypesCore.h:51
float Float_t
Float 4 bytes (float)
Definition RtypesCore.h:71
constexpr Bool_t kFALSE
Definition RtypesCore.h:108
constexpr Bool_t kTRUE
Definition RtypesCore.h:107
@ kGray
Definition Rtypes.h:66
@ kRed
Definition Rtypes.h:67
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t rect
Option_t Option_t TPoint TPoint const char x1
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize fs
Option_t Option_t TPoint TPoint const char y1
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
Definition TString.cxx:2495
const_iterator begin() const
const_iterator end() const
Manages histogram axis attributes.
Definition TAttAxis.h:19
virtual void SetLabelSize(Float_t size=0.04)
Set size of axis labels.
Definition TAttAxis.cxx:184
virtual void SetLabelOffset(Float_t offset=0.005)
Set distance between the axis and the labels.
Definition TAttAxis.cxx:172
virtual void SetTickLength(Float_t length=0.03)
Set tick mark length.
Definition TAttAxis.cxx:265
virtual void SetNdivisions(Int_t n=510, Bool_t optim=kTRUE)
Set the number of divisions for this axis.
Definition TAttAxis.cxx:214
Class to manage histogram axis.
Definition TAxis.h:32
virtual void SetLimits(Double_t xmin, Double_t xmax)
Definition TAxis.h:166
virtual void SetRangeUser(Double_t ufirst, Double_t ulast)
Set the viewing range for the axis from ufirst to ulast (in user coordinates, that is,...
Definition TAxis.cxx:1074
Bool_t Empty() const
virtual void GetCellData(const CellId_t &id, CellData_t &data) const =0
virtual TAxis * GetEtaBins() const
virtual TAxis * GetPhiBins() const
OpenGL renderer class for TEveCaloLego.
Bool_t fInDrag
last mouse position
void RenderPlaneInterface(TGLRnrCtx &rnrCtx)
Render menu for plane-value and the plane if marked.
void RenderHeader(TGLRnrCtx &rnrCtx)
void SetScaleColorTransparency(Color_t colIdx, Char_t transp)
Set color and transparency of scales.
Bool_t MouseEnter(TGLOvlSelectRecord &selRec) override
Mouse has entered overlay area.
void Render(TGLRnrCtx &rnrCtx) override
void MouseLeave() override
Mouse has left overlay area.
TEveCaloLegoOverlay()
Constructor.
void RenderPaletteScales(TGLRnrCtx &rnrCtx)
Bool_t SetSliderVal(Event_t *event, TGLRnrCtx &rnrCtx)
void SetScalePosition(Double_t x, Double_t y)
Set scale coordinates in range [0,1].
void RenderLogaritmicScales(TGLRnrCtx &rnrCtx)
Bool_t Handle(TGLRnrCtx &rnrCtx, TGLOvlSelectRecord &selRec, Event_t *event) override
Handle overlay event.
void SetFrameAttribs(Color_t frameCol, Char_t lineTransp, Char_t bgTransp)
Set frame attributes.
Color_t GetFontColor() const
Definition TEveCalo.h:301
void SetHPlaneVal(Float_t s)
Definition TEveCalo.h:344
TEveCaloData::vCellId_t fCellList
Definition TEveCalo.h:265
E2DMode_e Get2DMode()
Definition TEveCalo.h:329
void SetDrawHPlane(Bool_t s)
Definition TEveCalo.h:341
Float_t GetEtaMin() const
Definition TEveCalo.h:137
TEveRGBAPalette * GetPalette() const
Definition TEveCalo.h:125
Float_t GetPhiRng() const
Definition TEveCalo.h:147
Float_t GetMaxVal() const
Definition TEveCalo.cxx:158
TEveCaloData * GetData() const
Definition TEveCalo.h:87
Float_t GetEtaMax() const
Definition TEveCalo.h:138
TEveCaloData * fData
Definition TEveCalo.h:40
Float_t GetPhiMax() const
Definition TEveCalo.h:146
Float_t GetEtaRng() const
Definition TEveCalo.h:139
Float_t GetPhiMin() const
Definition TEveCalo.h:145
const UChar_t * ColorFromValue(Int_t val) const
void RnrLabels() const
Render label reading prepared list ov value-pos pairs.
void SetLabelFont(TGLRnrCtx &rnrCtx, const char *fontName, Int_t pixelSize=64, Double_t font3DSize=-1)
Set label font derived from TAttAxis.
TGLVector3 & RefDir()
void SetLabelAlign(TGLFont::ETextAlignH_e, TGLFont::ETextAlignV_e)
Set label align.
std::vector< Lab_t > LabVec_t
LabVec_t & RefLabVec()
void SetTextFormat(Double_t min, Double_t max, Double_t binWidth)
Construct print format from given primary bin width.
void SetAttAxis(TAttAxis *a)
void SetLabelPixelFontSize(Int_t fs)
std::pair< Float_t, Float_t > Lab_t
TGLVector3 & RefTMOff(Int_t i)
void PaintAxis(TGLRnrCtx &ctx, TAxis *ax)
GL render TAxis.
A GL overlay element which displays camera furstum.
TGLAxisPainter * fAxisPainter
void SetFrustum(TGLCamera &cam)
Set frustum values from given camera.
TAttAxis * GetAttAxis()
Get axis attributes.
void Render(TGLRnrCtx &rnrCtx) override
Display coordinates info of current frustum.
Abstract base camera class - concrete classes for orthographic and perspective cameras derive from it...
Definition TGLCamera.h:44
A wrapper class for FTFont.
void BBox(const char *txt, Float_t &llx, Float_t &lly, Float_t &llz, Float_t &urx, Float_t &ury, Float_t &urz) const
Get bounding box.
void Render(const char *txt, Double_t x, Double_t y, Double_t angle, Double_t mgn) const
virtual void PostRender() const
Reset GL state after FTFont rendering.
virtual void PreRender(Bool_t autoLight=kTRUE, Bool_t lightOn=kFALSE) const
Set-up GL state before FTFont rendering.
Selection record for overlay objects.
Viewport (pixel base) 2D rectangle class.
Definition TGLUtil.h:422
The TGLRnrCtx class aggregates data for a given redering context as needed by various parts of the RO...
Definition TGLRnrCtx.h:41
static void Color4f(Float_t r, Float_t g, Float_t b, Float_t a)
Wrapper for glColor4f.
Definition TGLUtil.cxx:1786
static void ColorTransparency(Color_t color_index, Char_t transparency=0)
Set color from color_index and ROOT-style transparency (default 0).
Definition TGLUtil.cxx:1732
static void Color(const TGLColor &color)
Set color from TGLColor.
Definition TGLUtil.cxx:1688
static Float_t PointSize()
Get the point-size, taking the global scaling into account.
Definition TGLUtil.cxx:1926
static Float_t LineWidth()
Get the line-width, taking the global scaling into account.
Definition TGLUtil.cxx:1934
3 component (x/y/z) vector class.
Definition TGLUtil.h:248
3 component (x/y/z) vertex class.
Definition TGLUtil.h:84
Double_t X() const
Definition TGLUtil.h:119
void Set(Double_t x, Double_t y, Double_t z)
Definition TGLUtil.h:210
Double_t Y() const
Definition TGLUtil.h:121
static void Optimize(Double_t A1, Double_t A2, Int_t nold, Double_t &BinLow, Double_t &BinHigh, Int_t &nbins, Double_t &BWID, Option_t *option="")
Static function to compute reasonable axis limits.
Ssiz_t Length() const
Definition TString.h:425
const char * Data() const
Definition TString.h:384
Double_t y[n]
Definition legend1.C:17
Double_t x[n]
Definition legend1.C:17
Int_t Nint(T x)
Round to nearest integer. Rounds half integers to the nearest even integer.
Definition TMath.h:704
Short_t Max(Short_t a, Short_t b)
Returns the largest of a and b.
Definition TMathBase.h:251
LongDouble_t Power(LongDouble_t x, LongDouble_t y)
Returns x raised to the power y.
Definition TMath.h:732
Int_t CeilNint(Double_t x)
Returns the nearest integer of TMath::Ceil(x).
Definition TMath.h:685
Double_t Log10(Double_t x)
Returns the common (base-10) logarithm of x.
Definition TMath.h:773
Event structure.
Definition GuiTypes.h:174
EGEventType fType
of event (see EGEventType)
Definition GuiTypes.h:175
Int_t fY
pointer x, y coordinates in event window
Definition GuiTypes.h:178
UInt_t fState
key or button mask
Definition GuiTypes.h:181
Int_t fX
Definition GuiTypes.h:178
UInt_t fCode
key or button code
Definition GuiTypes.h:180
Cell data inner structure.
TLine l
Definition textangle.C:4