56 Info(eh.
Data(),
"has already been run.");
110 gClient->GetMimeTypeList()->AddType(
"root/tmacro",
"TEveMacro",
111 "tmacro_s.xpm",
"tmacro_t.xpm",
"");
121void ChompTailAndDir(
TString& s,
char c=
'.')
144 TString foo(mac); ChompTailAndDir(foo);
167 gROOT->LoadMacro(mac);
169 TString foo(mac); ChompTailAndDir(foo); foo +=
"()";
179 gROOT->LoadMacro(mac);
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;
201 col[0] = 255; col[1] = 0; col[2] = 255;
202 if (alpha) col[3] = 255;
213 UChar_t alpha = (255*(100 - transparency))/100;
218 col[0] = (
UChar_t)(255*
c->GetRed());
219 col[1] = (
UChar_t)(255*
c->GetGreen());
220 col[2] = (
UChar_t)(255*
c->GetBlue());
226 col[0] = 255; col[1] = 0; col[2] = 255; col[3] = alpha;
245 if (alpha) col[3] = 255;
261 Int_t off = obj->IsA()->GetDataMemberOffset(varname);
263 throw(eh +
"could not find member '" + varname +
"' in class " + obj->IsA()->
GetName() +
".");
264 return (
Color_t*) (((
char*)obj) + off);
278 if (value < -2.5 || value > 2.5)
280 Error(
"TEveUtil::SetColorBrightness",
"value '%f' out of range [-0.5, 0.5].", value);
290 for (
Int_t i = 0; i < n_col; ++i)
299 for (
Int_t i = 0; i < n_col; ++i)
307 croot =
new TColor(*cdef);
329 delete colors->RemoveAt(i);
333 if (full_redraw &&
gEve != 0)
345 using namespace TMath;
349 minQ += TwoPi(); maxQ += TwoPi();
351 else if (minQ > maxM)
353 minQ -= TwoPi(); maxQ -= TwoPi();
355 return minQ >= minM && maxQ <= maxM;
366 using namespace TMath;
370 minQ += TwoPi(); maxQ += TwoPi();
372 else if (minQ > maxM)
374 minQ -= TwoPi(); maxQ -= TwoPi();
376 return maxQ >= minM && minQ <= maxM;
384 if (minQ>=minM && maxQ<=maxM)
387 else if (minQ<minM && maxQ>maxM)
388 return (maxM-minM)/(maxQ-minQ);
390 else if (minQ>=minM && maxQ>maxM)
391 return (maxM-minQ)/(maxQ-minQ);
393 else if (minQ<minM && maxQ<=maxM)
394 return (maxQ-minM)/(maxQ-minQ);
410{
return (s == t.
Data()); }
413{
return (s == t.
Data()); }
447 fModifyUpdateP (modify_update_p)
588 static const TEveException eh(
"TEveRefBackPtr::DecRefCount ");
592 if (--(i->second) <= 0)
596 Warning(eh,
"render element '%s' not found in back-refs.",
609 i->first->AddStamp(stamps);
void Info(const char *location, const char *msgfmt,...)
Use this function for informational messages.
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
void Warning(const char *location, const char *msgfmt,...)
Use this function in warning situations.
R__EXTERN TEveManager * gEve
bool operator==(const TString &t, const std::string &s)
TEveException operator+(const TEveException &s1, const std::string &s2)
R__EXTERN TGeoManager * gGeoManager
R__EXTERN TGeoIdentity * gGeoIdentity
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
static Int_t GetColor(const char *hexcolor)
Static method returning color number for color specified by hex color string of form: "#rrggbb",...
void Copy(TObject &color) const
Copy this color to obj.
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.
Exception safe wrapper for setting gGeoManager.
TEveGeoManagerHolder(const TEveGeoManagerHolder &)
virtual ~TEveGeoManagerHolder()
Destructor.
void FullRedraw3D(Bool_t resetCameras=kFALSE, Bool_t dropLogicals=kFALSE)
Perform 3D redraw of all scenes and viewers.
Exception safe wrapper for setting gPad.
virtual ~TEvePadHolder()
Destructor.
TEvePadHolder(const TEvePadHolder &)
Base-class for reference-counted objects with reverse references to TEveElement objects.
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
virtual ~TEveRefBackPtr()
Destructor. Noop, should complain if back-ref list is not empty.
TEveRefBackPtr()
Default constructor.
Base-class for reference-counted objects.
Standard utility functions for Eve.
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.
Pixmap_t GetPicture() const
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
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 void Modified(Bool_t flag=1)=0
virtual TVirtualPad * cd(Int_t subpadnumber=0)=0
LongDouble_t Power(LongDouble_t x, LongDouble_t y)
Short_t Min(Short_t a, Short_t b)