Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TEveUtil.cxx
Go to the documentation of this file.
1// @(#)root/eve:$Id$
2// Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 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 "TEveUtil.h"
13#include "TEveElement.h"
14#include "TEveManager.h"
15
16#include "TError.h"
17#include "TGeoManager.h"
18#include "TGeoMatrix.h"
19#include "TClass.h"
20#include "TMath.h"
21#include "TColor.h"
22
23#include "TROOT.h"
24#include "TInterpreter.h"
25#include "TSystem.h"
26
27#include "TGClient.h"
28#include "TGMimeTypes.h"
29
30#include <list>
31#include <algorithm>
32#include <string>
33
34/** \class TEveUtil
35\ingroup TEve
36Standard utility functions for Eve.
37*/
38
40
42
43////////////////////////////////////////////////////////////////////////////////
44/// Setup Include and Macro paths.
45/// Since inclusion into ROOT this does nothing but could
46/// potentially be reactivated if some common macros are established
47/// and shipped with binary ROOT (in macros/eve). For example, these
48/// might be used to spawn specific GUI / GL configurations.
49
51{
52 static const TEveException eh("TEveUtil::SetupEnvironment");
53 static Bool_t setupDone = kFALSE;
54
55 if (setupDone) {
56 Info(eh.Data(), "has already been run.");
57 return;
58 }
59
60 // Old initialization for ALICE.
61 // Left as an example.
62 /*
63 // Check if REVESYS exists, try fallback to $ALICE_ROOT/EVE.
64 if(gSystem->Getenv("REVESYS") == 0) {
65 if(gSystem->Getenv("ALICE_ROOT") != 0) {
66 Info(eh.Data(), "setting REVESYS from ALICE_ROOT.");
67 gSystem->Setenv("REVESYS", Form("%s/EVE", gSystem->Getenv("ALICE_ROOT")));
68 } else {
69 Error(eh.Data(), "REVESYS not defined, neither is ALICE_ROOT.");
70 gSystem->Exit(1);
71 }
72 }
73 if(gSystem->AccessPathName(gSystem->Getenv("REVESYS")) == kTRUE) {
74 Error(eh.Data(), "REVESYS '%s' does not exist.", gSystem->Getenv("REVESYS"));
75 gSystem->Exit(1);
76 }
77
78 TString macPath(gROOT->GetMacroPath());
79 macPath += Form(":%s/macros", gSystem->Getenv("REVESYS"));
80 gInterpreter->AddIncludePath(gSystem->Getenv("REVESYS"));
81 if(gSystem->Getenv("ALICE_ROOT") != 0) {
82 macPath += Form(":%s/alice-macros", gSystem->Getenv("REVESYS"));
83 gInterpreter->AddIncludePath(Form("%s/include", gSystem->Getenv("ALICE_ROOT")));
84 gInterpreter->AddIncludePath(gSystem->Getenv("ALICE_ROOT"));
85 }
86 gROOT->SetMacroPath(macPath);
87 */
88}
89
90////////////////////////////////////////////////////////////////////////////////
91/// Setup icon pictures and mime-types.
92
94{
95 TEveElement::fgRnrIcons[0] = gClient->GetPicture("eve_rnr00_t.xpm");
96 TEveElement::fgRnrIcons[1] = gClient->GetPicture("eve_rnr01_t.xpm");
97 TEveElement::fgRnrIcons[2] = gClient->GetPicture("eve_rnr10_t.xpm");
98 TEveElement::fgRnrIcons[3] = gClient->GetPicture("eve_rnr11_t.xpm");
99
100 TEveElement::fgListTreeIcons[0] = gClient->GetPicture("folder_t.xpm");
101 TEveElement::fgListTreeIcons[1] = gClient->GetPicture("eve_viewer.xpm");
102 TEveElement::fgListTreeIcons[2] = gClient->GetPicture("eve_scene.xpm");
103 TEveElement::fgListTreeIcons[3] = gClient->GetPicture("eve_pointset.xpm");
104 TEveElement::fgListTreeIcons[4] = gClient->GetPicture("eve_track.xpm");
105 TEveElement::fgListTreeIcons[5] = gClient->GetPicture("eve_text.gif");
106 TEveElement::fgListTreeIcons[6] = gClient->GetPicture("eve_axes.xpm");
107 TEveElement::fgListTreeIcons[7] = gClient->GetPicture("ofolder_t.xpm");
108 TEveElement::fgListTreeIcons[8] = gClient->GetPicture("eve_line.xpm");
109
110 gClient->GetMimeTypeList()->AddType("root/tmacro", "TEveMacro",
111 "tmacro_s.xpm", "tmacro_t.xpm", "");
112}
113
114namespace
115{
116////////////////////////////////////////////////////////////////////////////////
117/// Remove last part of string 's', starting from the last
118/// occurrence of character 'c'.
119/// Remove directory part -- everything until the last '/'.
120
121void ChompTailAndDir(TString& s, char c='.')
122{
123 Ssiz_t p = s.Last(c);
124 if (p != kNPOS)
125 s.Remove(p);
126
127 Ssiz_t ls = s.Last('/');
128 if (ls != kNPOS)
129 s.Remove(0, ls + 1);
130}
131}
132
133////////////////////////////////////////////////////////////////////////////////
134/// Checks if macro 'mac' is loaded.
135
137{
138 // Axel's advice; now sth seems slow, using old method below for test.
139 // return gROOT->GetInterpreter()->IsLoaded(mac);
140
141 // Previous version expected function with same name and used ROOT's
142 // list of global functions.
143
144 TString foo(mac); ChompTailAndDir(foo);
145 if (gROOT->GetGlobalFunction(foo.Data(), 0, kFALSE) != 0)
146 return kTRUE;
147 else
148 return (gROOT->GetGlobalFunction(foo.Data(), 0, kTRUE) != 0);
149}
150
151////////////////////////////////////////////////////////////////////////////////
152/// Load and execute macro 'mac' if it has not been loaded yet.
153
154void TEveUtil::AssertMacro(const char* mac)
155{
156 if( CheckMacro(mac) == kFALSE) {
157 gROOT->Macro(mac);
158 }
159}
160
161////////////////////////////////////////////////////////////////////////////////
162/// Execute macro 'mac'. Do not reload the macro.
163
164void TEveUtil::Macro(const char* mac)
165{
166 if (CheckMacro(mac) == kFALSE) {
167 gROOT->LoadMacro(mac);
168 }
169 TString foo(mac); ChompTailAndDir(foo); foo += "()";
170 gROOT->ProcessLine(foo.Data());
171}
172
173////////////////////////////////////////////////////////////////////////////////
174/// Makes sure that macro 'mac' is loaded, but do not reload it.
175
176void TEveUtil::LoadMacro(const char* mac)
177{
178 if (CheckMacro(mac) == kFALSE) {
179 gROOT->LoadMacro(mac);
180 }
181}
182
183////////////////////////////////////////////////////////////////////////////////
184/// Fill col with RGBA values corresponding to index ci. If alpha
185/// is true, set alpha component of col to 255.
186/// ROOT's indexed color palette does not support transparency.
187
189{
190 TColor* c = gROOT->GetColor(ci);
191 if (c)
192 {
193 col[0] = (UChar_t)(255*c->GetRed());
194 col[1] = (UChar_t)(255*c->GetGreen());
195 col[2] = (UChar_t)(255*c->GetBlue());
196 if (alpha) col[3] = 255;
197 }
198 else
199 {
200 // Set to magenta.
201 col[0] = 255; col[1] = 0; col[2] = 255;
202 if (alpha) col[3] = 255;
203 return;
204 }
205}
206
207////////////////////////////////////////////////////////////////////////////////
208/// Fill col with RGBA values corresponding to index ci and transparency.
209/// ROOT's indexed color palette does not support transparency.
210
211void TEveUtil::ColorFromIdx(Color_t ci, UChar_t col[4], Char_t transparency)
212{
213 UChar_t alpha = (255*(100 - transparency))/100;
214
215 TColor* c = gROOT->GetColor(ci);
216 if (c)
217 {
218 col[0] = (UChar_t)(255*c->GetRed());
219 col[1] = (UChar_t)(255*c->GetGreen());
220 col[2] = (UChar_t)(255*c->GetBlue());
221 col[3] = alpha;
222 }
223 else
224 {
225 // Set to magenta.
226 col[0] = 255; col[1] = 0; col[2] = 255; col[3] = alpha;
227 return;
228 }
229}
230
231////////////////////////////////////////////////////////////////////////////////
232/// Fill col with weighted RGBA values corresponding to
233/// color-indices c1 and c2. If alpha is true, set alpha component
234/// of col to 255.
235
237 UChar_t col[4], Bool_t alpha)
238{
240 TColor* t2 = gROOT->GetColor(c2);
241 if(t1 && t2) {
242 col[0] = (UChar_t)(255*(f1*t1->GetRed() + f2*t2->GetRed()));
243 col[1] = (UChar_t)(255*(f1*t1->GetGreen() + f2*t2->GetGreen()));
244 col[2] = (UChar_t)(255*(f1*t1->GetBlue() + f2*t2->GetBlue()));
245 if (alpha) col[3] = 255;
246 }
247}
248
249////////////////////////////////////////////////////////////////////////////////
250/// Find address of Color_t data-member with name varname in object
251/// obj.
252///
253/// This is used to access color information for TGListTreeItem
254/// coloration from visualization macros that wrap TObjects into
255/// TEveElementObjectPtr instances.
256
257Color_t* TEveUtil::FindColorVar(TObject* obj, const char* varname)
258{
259 static const TEveException eh("TEveUtil::FindColorVar");
260
261 Int_t off = obj->IsA()->GetDataMemberOffset(varname);
262 if(off == 0)
263 throw(eh + "could not find member '" + varname + "' in class " + obj->IsA()->GetName() + ".");
264 return (Color_t*) (((char*)obj) + off);
265}
266
267////////////////////////////////////////////////////////////////////////////////
268/// Tweak all ROOT colors to become brighter (if value > 0) or
269/// darker (value < 0). Reasonable values for the value argument are
270/// from -2.5 to 2.5 (error will be printed otherwise).
271/// If value is zero, the original colors are restored.
272///
273/// You should call TEveManager::FullRedraw3D() afterwards or set
274/// the argument full_redraw to true (default is false).
275
277{
278 if (value < -2.5 || value > 2.5)
279 {
280 Error("TEveUtil::SetColorBrightness", "value '%f' out of range [-0.5, 0.5].", value);
281 return;
282 }
283
284 TObjArray *colors = (TObjArray*) gROOT->GetListOfColors();
285
286 if (fgDefaultColors == 0)
287 {
288 const Int_t n_col = colors->GetEntriesFast();
289 fgDefaultColors = new TObjArray(n_col);
290 for (Int_t i = 0; i < n_col; ++i)
291 {
292 TColor* c = (TColor*) colors->At(i);
293 if (c)
294 fgDefaultColors->AddAt(new TColor(*c), i);
295 }
296 }
297
298 const Int_t n_col = fgDefaultColors->GetEntriesFast();
299 for (Int_t i = 0; i < n_col; ++i)
300 {
301 TColor* cdef = (TColor*) fgDefaultColors->At(i);
302 if (cdef)
303 {
304 TColor* croot = (TColor*) colors->At(i);
305 if (croot == 0)
306 {
307 croot = new TColor(*cdef);
308 colors->AddAt(croot, i);
309 }
310 else
311 {
312 cdef->Copy(*croot);
313 }
314
315 Float_t r, g, b;
316 croot->GetRGB(r, g, b);
317 r = TMath::Power( r, (2.5 - value)/2.5);
318 g = TMath::Power(g, (2.5 - value)/2.5);
319 b = TMath::Power(b, (2.5 - value)/2.5);
320
321 r = TMath::Min(r, 1.0f);
322 g = TMath::Min(g, 1.0f);
323 b = TMath::Min(b, 1.0f);
324
325 croot->SetRGB(r, g, b);
326 }
327 else
328 {
329 delete colors->RemoveAt(i);
330 }
331 }
332
333 if (full_redraw && gEve != 0)
335}
336
337////////////////////////////////////////////////////////////////////////////////
338/// Return true if interval Q is contained within interval M for U1 variables.
339/// It is assumed that all values are within the [-2pi, 2pi] interval and
340/// minM <= maxM & minQ <= maxQ.
341
343 Float_t minQ, Float_t maxQ)
344{
345 using namespace TMath;
346
347 if (maxQ < minM)
348 {
349 minQ += TwoPi(); maxQ += TwoPi();
350 }
351 else if (minQ > maxM)
352 {
353 minQ -= TwoPi(); maxQ -= TwoPi();
354 }
355 return minQ >= minM && maxQ <= maxM;
356}
357
358////////////////////////////////////////////////////////////////////////////////
359/// Return true if interval Q is overlapping within interval M for U1 variables.
360/// It is assumed that all values are within the [-2pi, 2pi] interval and
361/// minM <= maxM & minQ <= maxQ.
362
364 Float_t minQ, Float_t maxQ)
365{
366 using namespace TMath;
367
368 if (maxQ < minM)
369 {
370 minQ += TwoPi(); maxQ += TwoPi();
371 }
372 else if (minQ > maxM)
373 {
374 minQ -= TwoPi(); maxQ -= TwoPi();
375 }
376 return maxQ >= minM && minQ <= maxM;
377}
378
379////////////////////////////////////////////////////////////////////////////////
380/// Get fraction of interval [minQ, maxQ] in [minM, maxM]
381
383{
384 if (minQ>=minM && maxQ<=maxM)
385 return 1;
386
387 else if (minQ<minM && maxQ>maxM)
388 return (maxM-minM)/(maxQ-minQ);
389
390 else if (minQ>=minM && maxQ>maxM)
391 return (maxM-minQ)/(maxQ-minQ);
392
393 else if (minQ<minM && maxQ<=maxM)
394 return (maxQ-minM)/(maxQ-minQ);
395
396 return 0;
397}
398
399
400/** \class TEveException
401\ingroup TEve
402Exception class thrown by TEve classes and macros.
403*/
404
406
407////////////////////////////////////////////////////////////////////////////////
408
409bool operator==(const TString& t, const std::string& s)
410{ return (s == t.Data()); }
411
412bool operator==(const std::string& s, const TString& t)
413{ return (s == t.Data()); }
414
415// Exc
416
417TEveException::TEveException(const std::string& s) : TString(s.c_str())
418{
419 // Constructor.
420}
421
422// Exc + ops
423
424TEveException operator+(const TEveException &s1, const std::string &s2)
425{ TEveException r(s1); r += s2; return r; }
426
428{ TEveException r(s1); r += s2; return r; }
429
431{ TEveException r(s1); r += s2; return r; }
432
433
434/** \class TEvePadHolder
435\ingroup TEve
436Exception safe wrapper for setting gPad.
437Optionally calls gPad->Modified()/Update() in destructor.
438*/
439
441
442////////////////////////////////////////////////////////////////////////////////
443/// Constructor.
444
445TEvePadHolder::TEvePadHolder(Bool_t modify_update_p, TVirtualPad* new_pad, Int_t subpad) :
446 fOldPad (gPad),
447 fModifyUpdateP (modify_update_p)
448{
449 if (new_pad != 0)
450 new_pad->cd(subpad);
451 else
452 gPad = 0;
453}
454
455////////////////////////////////////////////////////////////////////////////////
456/// Destructor.
457
459{
460 if (fModifyUpdateP && gPad != 0) {
461 gPad->Modified();
462 gPad->Update();
463 }
464 gPad = fOldPad;
465}
466
467/** \class TEveGeoManagerHolder
468\ingroup TEve
469Exception safe wrapper for setting gGeoManager.
470Functionality to lock-unlock via setting of a static lock in
471TGeoManager should be added (new feature of TGeoManager).
472*/
473
475
476////////////////////////////////////////////////////////////////////////////////
477/// Constructor.
478/// If n_seg is specified and larger than 2, the new geo-manager's
479/// NSegments is set to this value.
480
482 fManager (gGeoManager),
483 fNSegments (0)
484{
485 gGeoManager = new_gmgr;
486 if (gGeoManager)
487 {
489 if (n_seg > 2)
490 {
493 }
494 }
495 else
496 {
497 gGeoIdentity = 0;
498 }
499}
500
501////////////////////////////////////////////////////////////////////////////////
502/// Destructor.
503
505{
506 if (gGeoManager && fNSegments > 2)
507 {
509 }
511 if (gGeoManager)
512 {
514 }
515 else
516 {
517 gGeoIdentity = 0;
518 }
519}
520
521/** \class TEveRefCnt
522\ingroup TEve
523Base-class for reference-counted objects.
524By default the object is destroyed when zero reference-count is reached.
525*/
526
528
529/** \class TEveRefBackPtr
530\ingroup TEve
531Base-class for reference-counted objects with reverse references to
532TEveElement objects.
533*/
534
536
537////////////////////////////////////////////////////////////////////////////////
538/// Default constructor.
539
541 TEveRefCnt(),
542 fBackRefs()
543{
544}
545
546////////////////////////////////////////////////////////////////////////////////
547/// Destructor. Noop, should complain if back-ref list is not empty.
548
550{
551 // !!! Complain if list not empty.
552}
553
554////////////////////////////////////////////////////////////////////////////////
555/// Copy constructor. New copy starts with zero reference count and
556/// empty back-reference list.
557
559 TEveRefCnt(),
560 fBackRefs()
561{
562}
563
564////////////////////////////////////////////////////////////////////////////////
565/// Assignment operator. Reference count and back-reference
566/// information is not assigned as these object hold pointers to a
567/// specific object.
568
570{
571 return *this;
572}
573
574////////////////////////////////////////////////////////////////////////////////
575/// Increase reference count and add re to the list of back-references.
576
578{
580 ++fBackRefs[re];
581}
582
583////////////////////////////////////////////////////////////////////////////////
584/// Decrease reference count and remove re from the list of back-references.
585
587{
588 static const TEveException eh("TEveRefBackPtr::DecRefCount ");
589
590 RefMap_i i = fBackRefs.find(re);
591 if (i != fBackRefs.end()) {
592 if (--(i->second) <= 0)
593 fBackRefs.erase(i);
595 } else {
596 Warning(eh, "render element '%s' not found in back-refs.",
597 re->GetObject(eh)->GetName());
598 }
599}
600
601////////////////////////////////////////////////////////////////////////////////
602/// Add given stamps to elements in the list of reverse references.
603
605{
606 RefMap_i i = fBackRefs.begin();
607 while (i != fBackRefs.end())
608 {
609 i->first->AddStamp(stamps);
610 ++i;
611 }
612}
#define b(i)
Definition RSha256.hxx:100
#define c(i)
Definition RSha256.hxx:101
#define g(i)
Definition RSha256.hxx:105
#define s1(x)
Definition RSha256.hxx:91
short Color_t
Definition RtypesCore.h:92
unsigned char UChar_t
Definition RtypesCore.h:38
int Ssiz_t
Definition RtypesCore.h:67
char Char_t
Definition RtypesCore.h:37
float Float_t
Definition RtypesCore.h:57
constexpr Bool_t kFALSE
Definition RtypesCore.h:101
constexpr Ssiz_t kNPOS
Definition RtypesCore.h:124
constexpr Bool_t kTRUE
Definition RtypesCore.h:100
#define ClassImp(name)
Definition Rtypes.h:377
void Info(const char *location, const char *msgfmt,...)
Use this function for informational messages.
Definition TError.cxx:230
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
Definition TError.cxx:197
void Warning(const char *location, const char *msgfmt,...)
Use this function in warning situations.
Definition TError.cxx:241
R__EXTERN TEveManager * gEve
bool operator==(const TString &t, const std::string &s)
Definition TEveUtil.cxx:409
TEveException operator+(const TEveException &s1, const std::string &s2)
Definition TEveUtil.cxx:424
#define gClient
Definition TGClient.h:157
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 r
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
R__EXTERN TGeoManager * gGeoManager
R__EXTERN TGeoIdentity * gGeoIdentity
Definition TGeoMatrix.h:478
#define gROOT
Definition TROOT.h:405
#define gPad
Color * colors
Definition X3DBuffer.c:21
Longptr_t GetDataMemberOffset(const char *membername) const
return offset for member name.
Definition TClass.cxx:3477
The color creation and management class.
Definition TColor.h:19
virtual void SetRGB(Float_t r, Float_t g, Float_t b)
Initialize this color and its associated colors.
Definition TColor.cxx:1759
virtual void GetRGB(Float_t &r, Float_t &g, Float_t &b) const
Definition TColor.h:52
Float_t GetRed() const
Definition TColor.h:58
static Int_t GetColor(const char *hexcolor)
Static method returning color number for color specified by hex color string of form: "#rrggbb",...
Definition TColor.cxx:1823
void Copy(TObject &color) const override
Copy this color to obj.
Definition TColor.cxx:1290
Float_t GetBlue() const
Definition TColor.h:60
Float_t GetGreen() const
Definition TColor.h:59
Base class for TEveUtil visualization elements, providing hierarchy management, rendering control and...
Definition TEveElement.h:36
static const TGPicture * fgRnrIcons[4]
Definition TEveElement.h:64
static const TGPicture * fgListTreeIcons[9]
Definition TEveElement.h:65
virtual TObject * GetObject(const TEveException &eh) const
Get a TObject associated with this render-element.
Exception class thrown by TEve classes and macros.
Definition TEveUtil.h:102
Exception safe wrapper for setting gGeoManager.
Definition TEveUtil.h:142
TGeoManager * fManager
Definition TEveUtil.h:144
TEveGeoManagerHolder(const TEveGeoManagerHolder &)
virtual ~TEveGeoManagerHolder()
Destructor.
Definition TEveUtil.cxx:504
void FullRedraw3D(Bool_t resetCameras=kFALSE, Bool_t dropLogicals=kFALSE)
Perform 3D redraw of all scenes and viewers.
Exception safe wrapper for setting gPad.
Definition TEveUtil.h:126
TVirtualPad * fOldPad
Definition TEveUtil.h:128
Bool_t fModifyUpdateP
Definition TEveUtil.h:129
virtual ~TEvePadHolder()
Destructor.
Definition TEveUtil.cxx:458
TEvePadHolder(const TEvePadHolder &)
Base-class for reference-counted objects with reverse references to TEveElement objects.
Definition TEveUtil.h:187
virtual void StampBackPtrElements(UChar_t stamps)
Add given stamps to elements in the list of reverse references.
Definition TEveUtil.cxx:604
TEveRefBackPtr & operator=(const TEveRefBackPtr &)
Assignment operator.
Definition TEveUtil.cxx:569
RefMap_t::iterator RefMap_i
Definition TEveUtil.h:190
virtual ~TEveRefBackPtr()
Destructor. Noop, should complain if back-ref list is not empty.
Definition TEveUtil.cxx:549
void IncRefCount()
Definition TEveUtil.h:174
void DecRefCount()
Definition TEveUtil.h:175
RefMap_t fBackRefs
Definition TEveUtil.h:192
TEveRefBackPtr()
Default constructor.
Definition TEveUtil.cxx:540
Base-class for reference-counted objects.
Definition TEveUtil.h:163
void IncRefCount()
Definition TEveUtil.h:174
void DecRefCount()
Definition TEveUtil.h:175
Standard utility functions for Eve.
Definition TEveUtil.h:35
static TObjArray * fgDefaultColors
Definition TEveUtil.h:37
static Float_t GetFraction(Float_t minM, Float_t maxM, Float_t minQ, Float_t maxQ)
Get fraction of interval [minQ, maxQ] in [minM, maxM].
Definition TEveUtil.cxx:382
static void SetColorBrightness(Float_t value, Bool_t full_redraw=kFALSE)
Tweak all ROOT colors to become brighter (if value > 0) or darker (value < 0).
Definition TEveUtil.cxx:276
static Bool_t IsU1IntervalOverlappingByMinMax(Float_t minM, Float_t maxM, Float_t minQ, Float_t maxQ)
Return true if interval Q is overlapping within interval M for U1 variables.
Definition TEveUtil.cxx:363
static void Macro(const char *mac)
Execute macro 'mac'. Do not reload the macro.
Definition TEveUtil.cxx:164
static void AssertMacro(const char *mac)
Load and execute macro 'mac' if it has not been loaded yet.
Definition TEveUtil.cxx:154
static void SetupGUI()
Setup icon pictures and mime-types.
Definition TEveUtil.cxx:93
static Color_t * FindColorVar(TObject *obj, const char *varname)
Find address of Color_t data-member with name varname in object obj.
Definition TEveUtil.cxx:257
static Bool_t IsU1IntervalContainedByMinMax(Float_t minM, Float_t maxM, Float_t minQ, Float_t maxQ)
Return true if interval Q is contained within interval M for U1 variables.
Definition TEveUtil.cxx:342
static void ColorFromIdx(Color_t ci, UChar_t col[4], Bool_t alpha=kTRUE)
Fill col with RGBA values corresponding to index ci.
Definition TEveUtil.cxx:188
static void SetupEnvironment()
Setup Include and Macro paths.
Definition TEveUtil.cxx:50
static void LoadMacro(const char *mac)
Makes sure that macro 'mac' is loaded, but do not reload it.
Definition TEveUtil.cxx:176
static Bool_t CheckMacro(const char *mac)
Checks if macro 'mac' is loaded.
Definition TEveUtil.cxx:136
Pixmap_t GetPicture() const
Definition TGPicture.h:54
An identity transformation.
Definition TGeoMatrix.h:384
The manager class for any TGeo geometry.
Definition TGeoManager.h:45
TObjArray * GetListOfMatrices() const
void SetNsegments(Int_t nseg)
Set number of segments for approximating circles in drawing.
Int_t GetNsegments() const
Get number of segments approximating circles.
const char * GetName() const override
Returns name of object.
Definition TNamed.h:47
An array of TObjects.
Definition TObjArray.h:31
Int_t GetEntriesFast() const
Definition TObjArray.h:58
void AddAt(TObject *obj, Int_t idx) override
Add object at position ids.
TObject * At(Int_t idx) const override
Definition TObjArray.h:164
Mother of all ROOT objects.
Definition TObject.h:41
virtual const char * GetName() const
Returns name of object.
Definition TObject.cxx:439
virtual TClass * IsA() const
Definition TObject.h:245
Basic string class.
Definition TString.h:139
const char * Data() const
Definition TString.h:380
Ssiz_t Last(char c) const
Find last occurrence of a character c.
Definition TString.cxx:924
TString & Remove(Ssiz_t pos)
Definition TString.h:685
TVirtualPad is an abstract base class for the Pad and Canvas classes.
Definition TVirtualPad.h:51
virtual void Modified(Bool_t flag=1)=0
virtual TVirtualPad * cd(Int_t subpadnumber=0)=0
return c1
Definition legend1.C:41
TF1 * f1
Definition legend1.C:11
return c2
Definition legend2.C:14
TMath.
Definition TMathBase.h:35
LongDouble_t Power(LongDouble_t x, LongDouble_t y)
Returns x raised to the power y.
Definition TMath.h:719
Short_t Min(Short_t a, Short_t b)
Returns the smallest of a and b.
Definition TMathBase.h:198
auto * t1
Definition textangle.C:20