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