55 Info(eh.
Data(),
"has already been run.");
109 gClient->GetMimeTypeList()->AddType(
"root/tmacro",
"TEveMacro",
110 "tmacro_s.xpm",
"tmacro_t.xpm",
"");
120void ChompTailAndDir(
TString& s,
char c=
'.')
143 TString foo(mac); ChompTailAndDir(foo);
147 return (
gROOT->GetGlobalFunction(foo.
Data(),
nullptr,
kTRUE) !=
nullptr);
166 gROOT->LoadMacro(mac);
168 TString foo(mac); ChompTailAndDir(foo); foo +=
"()";
178 gROOT->LoadMacro(mac);
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;
200 col[0] = 255; col[1] = 0; col[2] = 255;
201 if (alpha) col[3] = 255;
212 UChar_t alpha = (255*(100 - transparency))/100;
217 col[0] = (
UChar_t)(255*
c->GetRed());
218 col[1] = (
UChar_t)(255*
c->GetGreen());
219 col[2] = (
UChar_t)(255*
c->GetBlue());
225 col[0] = 255; col[1] = 0; col[2] = 255; col[3] = alpha;
244 if (alpha) col[3] = 255;
262 throw(eh +
"could not find member '" + varname +
"' in class " + obj->
IsA()->
GetName() +
".");
263 return (
Color_t*) (((
char*)obj) + off);
277 if (value < -2.5 || value > 2.5)
279 Error(
"TEveUtil::SetColorBrightness",
"value '%f' out of range [-0.5, 0.5].", value);
289 for (
Int_t i = 0; i < n_col; ++i)
298 for (
Int_t i = 0; i < n_col; ++i)
304 if (croot ==
nullptr)
306 croot =
new TColor(*cdef);
328 delete colors->RemoveAt(i);
332 if (full_redraw &&
gEve !=
nullptr)
333 gEve->FullRedraw3D();
344 using namespace TMath;
350 else if (minQ > maxM)
354 return minQ >= minM && maxQ <= maxM;
365 using namespace TMath;
371 else if (minQ > maxM)
375 return maxQ >= minM && minQ <= maxM;
383 if (minQ>=minM && maxQ<=maxM)
386 else if (minQ<minM && maxQ>maxM)
387 return (maxM-minM)/(maxQ-minQ);
389 else if (minQ>=minM && maxQ>maxM)
390 return (maxM-minQ)/(maxQ-minQ);
392 else if (minQ<minM && maxQ<=maxM)
393 return (maxQ-minM)/(maxQ-minQ);
408{
return (s == t.
Data()); }
411{
return (s == t.
Data()); }
446 if (new_pad !=
nullptr)
582 static const TEveException eh(
"TEveRefBackPtr::DecRefCount ");
586 if (--(i->second) <= 0)
590 Warning(eh,
"render element '%s' not found in back-refs.",
603 i->first->AddStamp(stamps);
int Int_t
Signed integer 4 bytes (int).
unsigned char UChar_t
Unsigned Character 1 byte (unsigned char).
int Ssiz_t
String size (currently int).
char Char_t
Character 1 byte (char).
bool Bool_t
Boolean (0=false, 1=true) (bool).
short Color_t
Color number (short).
constexpr Ssiz_t kNPOS
The equivalent of std::string::npos for the ROOT class TString.
float Float_t
Float 4 bytes (float).
Error("WriteTObject","The current directory (%s) is not associated with a file. The object (%s) has not been written.", GetName(), objname)
void Info(const char *location, const char *msgfmt,...)
Use this function for informational messages.
void Warning(const char *location, const char *msgfmt,...)
Use this function in warning situations.
bool operator==(const TString &t, const std::string &s)
TEveException operator+(const TEveException &s1, const std::string &s2)
externTGeoManager * gGeoManager
externTGeoIdentity * gGeoIdentity
Longptr_t GetDataMemberOffset(const char *membername) const
return offset for member name.
virtual void GetRGB(Float_t &r, Float_t &g, Float_t &b) const
void Copy(TObject &color) const override
Copy this to obj.
virtual void SetRGB(Float_t r, Float_t g, Float_t b)
Base class for TEveUtil visualization elements, providing hierarchy management, rendering control and...
static const TGPicture * fgRnrIcons[4]
static const TGPicture * fgListTreeIcons[9]
virtual TObject * GetObject(const TEveException &eh) const
Get a TObject associated with this render-element.
Exception class thrown by TEve classes and macros.
TEveGeoManagerHolder(const TEveGeoManagerHolder &)
virtual ~TEveGeoManagerHolder()
Destructor.
virtual ~TEvePadHolder()
Destructor.
TEvePadHolder(const TEvePadHolder &)
~TEveRefBackPtr() override
Destructor. Noop, should complain if back-ref list is not empty.
virtual void StampBackPtrElements(UChar_t stamps)
Add given stamps to elements in the list of reverse references.
TEveRefBackPtr & operator=(const TEveRefBackPtr &)
Assignment operator.
RefMap_t::iterator RefMap_i
TEveRefBackPtr()
Default constructor.
static TObjArray * fgDefaultColors
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].
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).
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.
static void Macro(const char *mac)
Execute macro 'mac'. Do not reload the macro.
static void AssertMacro(const char *mac)
Load and execute macro 'mac' if it has not been loaded yet.
static void SetupGUI()
Setup icon pictures and mime-types.
static Color_t * FindColorVar(TObject *obj, const char *varname)
Find address of Color_t data-member with name varname in object obj.
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.
static void ColorFromIdx(Color_t ci, UChar_t col[4], Bool_t alpha=kTRUE)
Fill col with RGBA values corresponding to index ci.
static void SetupEnvironment()
Setup Include and Macro paths.
static void LoadMacro(const char *mac)
Makes sure that macro 'mac' is loaded, but do not reload it.
static Bool_t CheckMacro(const char *mac)
Checks if macro 'mac' is loaded.
An identity transformation.
The manager class for any TGeo geometry.
const char * GetName() const override
Returns name of object.
Mother of all ROOT objects.
virtual const char * GetName() const
Returns name of object.
virtual TClass * IsA() const
TString(const char *a1, Ssiz_t n1, const char *a2, Ssiz_t n2)
Special constructor to initialize with the concatenation of a1 and a2.
const char * Data() const
Ssiz_t Last(char c) const
Find last occurrence of a character c.
TString & Remove(Ssiz_t pos)
TVirtualPad is an abstract base class for the Pad and Canvas classes.
virtual TVirtualPad * cd(Int_t subpadnumber=0)=0
LongDouble_t Power(LongDouble_t x, LongDouble_t y)
Returns x raised to the power y.
Short_t Min(Short_t a, Short_t b)
Returns the smallest of a and b.
constexpr Double_t TwoPi()