55void ChompTailAndDir(
TString&
s,
char c=
'.')
78 TString foo(mac); ChompTailAndDir(foo);
101 gROOT->LoadMacro(mac);
103 TString foo(mac); ChompTailAndDir(foo); foo +=
"()";
113 gROOT->LoadMacro(mac);
127 col[0] = (
UChar_t)(255*
c->GetRed());
128 col[1] = (
UChar_t)(255*
c->GetGreen());
129 col[2] = (
UChar_t)(255*
c->GetBlue());
130 if (alpha) col[3] = 255;
135 col[0] = 255; col[1] = 0; col[2] = 255;
136 if (alpha) col[3] = 255;
147 UChar_t alpha = (255*(100 - transparency))/100;
152 col[0] = (
UChar_t)(255*
c->GetRed());
153 col[1] = (
UChar_t)(255*
c->GetGreen());
154 col[2] = (
UChar_t)(255*
c->GetBlue());
160 col[0] = 255; col[1] = 0; col[2] = 255; col[3] = alpha;
179 if (alpha) col[3] = 255;
195 Int_t off = obj->IsA()->GetDataMemberOffset(varname);
197 throw(eh +
"could not find member '" + varname +
"' in class " + obj->IsA()->
GetName() +
".");
198 return (
Color_t*) (((
char*)obj) + off);
212 if (value < -2.5 || value > 2.5)
214 Error(
"REveUtil::SetColorBrightness",
"value '%f' out of range [-0.5, 0.5].", value);
224 for (
Int_t i = 0; i < n_col; ++i)
233 for (
Int_t i = 0; i < n_col; ++i)
241 croot =
new TColor(*cdef);
263 delete colors->RemoveAt(i);
279 using namespace TMath;
285 else if (minQ > maxM)
289 return minQ >= minM && maxQ <= maxM;
300 using namespace TMath;
306 else if (minQ > maxM)
310 return maxQ >= minM && minQ <= maxM;
318 if (minQ>=minM && maxQ<=maxM)
321 else if (minQ<minM && maxQ>maxM)
322 return (maxM-minM)/(maxQ-minQ);
324 else if (minQ>=minM && maxQ>maxM)
325 return (maxM-minQ)/(maxQ-minQ);
327 else if (minQ<minM && maxQ<=maxM)
328 return (maxQ-minM)/(maxQ-minQ);
443 if (--(i->second) <= 0)
447 Warning(
"REveRefBackPtr::DecRefCount",
"element '%s' not found in back-refs.", re->
GetCName());
457 i.first->AddStamp(stamps);
void Error(const char *location, const char *msgfmt,...)
void Warning(const char *location, const char *msgfmt,...)
R__EXTERN TEveManager * gEve
R__EXTERN TGeoManager * gGeoManager
R__EXTERN TGeoIdentity * gGeoIdentity
const char * GetCName() const
REveException Exception-type thrown by Eve classes.
~REveGeoManagerHolder()
Destructor.
Int_t fNSegments
! previous settings for num segments
TGeoManager * fManager
! hold manager
REveGeoManagerHolder(TGeoManager *new_gmgr=nullptr, Int_t n_seg=0)
Constructor.
REveRefBackPtr reference-count with back pointers.
virtual ~REveRefBackPtr()
Destructor. Noop, should complain if back-ref list is not empty.
REveRefBackPtr & operator=(const REveRefBackPtr &)
Assignment operator.
REveRefBackPtr()
Default constructor.
virtual void StampBackPtrElements(UChar_t stamps)
Add given stamps to elements in the list of reverse references.
REveRefCnt REveRefCnt base-class (interface)
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 LoadMacro(const char *mac)
Makes sure that macro 'mac' is loaded, but do not reload it.
static void Macro(const char *mac)
Execute macro 'mac'. Do not reload the macro.
static Bool_t CheckMacro(const char *mac)
Checks if macro 'mac' is loaded.
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 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 Color_t * FindColorVar(TObject *obj, const char *varname)
Find address of Color_t data-member with name varname in object obj.
static void AssertMacro(const char *mac)
Load and execute macro 'mac' if it has not been loaded yet.
static TObjArray * fgDefaultColors
The color creation and management class.
virtual void SetRGB(Float_t r, Float_t g, Float_t b)
Initialize this color and its associated colors.
virtual void GetRGB(Float_t &r, Float_t &g, Float_t &b) const
void Copy(TObject &color) const
Copy this color to obj.
void FullRedraw3D(Bool_t resetCameras=kFALSE, Bool_t dropLogicals=kFALSE)
Perform 3D redraw of all scenes and viewers.
An identity transformation.
The manager class for any TGeo geometry.
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.
Int_t GetEntriesFast() const
virtual void AddAt(TObject *obj, Int_t idx)
Add object at position ids.
TObject * At(Int_t idx) const
Mother of all ROOT objects.
virtual const char * GetName() const
Returns name of object.
const char * Data() const
static constexpr double s
LongDouble_t Power(LongDouble_t x, LongDouble_t y)
Short_t Min(Short_t a, Short_t b)
constexpr Double_t TwoPi()