ROOT  6.06/09
Reference Guide
Public Member Functions | Static Public Member Functions | Static Private Attributes | List of all members
TEveUtil Class Reference

Standard utility functions for Eve.

Definition at line 35 of file TEveUtil.h.

Public Member Functions

virtual ~TEveUtil ()
 
 ClassDef (TEveUtil, 0)
 

Static Public Member Functions

static void SetupEnvironment ()
 Setup Include and Macro paths. More...
 
static void SetupGUI ()
 Setup icon pictures and mime-types. More...
 
static Bool_t CheckMacro (const char *mac)
 Checks if macro 'mac' is loaded. More...
 
static void AssertMacro (const char *mac)
 Load and execute macro 'mac' if it has not been loaded yet. More...
 
static void Macro (const char *mac)
 Execute macro 'mac'. Do not reload the macro. More...
 
static void LoadMacro (const char *mac)
 Makes sure that macro 'mac' is loaded, but do not reload it. More...
 
static void ColorFromIdx (Color_t ci, UChar_t col[4], Bool_t alpha=kTRUE)
 Fill col with RGBA values corresponding to index ci. More...
 
static void ColorFromIdx (Color_t ci, UChar_t col[4], Char_t transparency)
 Fill col with RGBA values corresponding to index ci and transparency. More...
 
static void ColorFromIdx (Float_t f1, Color_t c1, Float_t f2, Color_t c2, UChar_t col[4], Bool_t alpha=kTRUE)
 Fill col with weighted RGBA values corresponding to color-indices c1 and c2. More...
 
static Color_tFindColorVar (TObject *obj, const char *varname)
 Find address of Color_t data-member with name varname in object obj. More...
 
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). More...
 
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. More...
 
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. More...
 
static Bool_t IsU1IntervalContainedByMeanDelta (Float_t meanM, Float_t deltaM, Float_t meanQ, Float_t deltaQ)
 
static Bool_t IsU1IntervalOverlappingByMeanDelta (Float_t meanM, Float_t deltaM, Float_t meanQ, Float_t deltaQ)
 
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]. More...
 

Static Private Attributes

static TObjArrayfgDefaultColors = 0
 

#include <TEveUtil.h>

+ Collaboration diagram for TEveUtil:

Constructor & Destructor Documentation

virtual TEveUtil::~TEveUtil ( )
inlinevirtual

Definition at line 41 of file TEveUtil.h.

Member Function Documentation

void TEveUtil::AssertMacro ( const char *  mac)
static

Load and execute macro 'mac' if it has not been loaded yet.

Definition at line 158 of file TEveUtil.cxx.

Bool_t TEveUtil::CheckMacro ( const char *  mac)
static

Checks if macro 'mac' is loaded.

Definition at line 140 of file TEveUtil.cxx.

Referenced by AssertMacro(), LoadMacro(), and Macro().

TEveUtil::ClassDef ( TEveUtil  ,
 
)
void TEveUtil::ColorFromIdx ( Color_t  ci,
UChar_t  col[4],
Bool_t  alpha = kTRUE 
)
static

Fill col with RGBA values corresponding to index ci.

If alpha is true, set alpha component of col to 255. ROOT's indexed color palette does not support transparency.

Definition at line 192 of file TEveUtil.cxx.

Referenced by TEveDigitSet::DigitColor(), TEveFrameBox::SetBackColor(), TEveRGBAPalette::SetDefaultColor(), TEveFrameBox::SetFrameColor(), TEveRGBAPalette::SetOverColor(), TEveRGBAPalette::SetUnderColor(), TEveRGBAPalette::SetupColor(), and TEveBoxSet::Test().

void TEveUtil::ColorFromIdx ( Color_t  ci,
UChar_t  col[4],
Char_t  transparency 
)
static

Fill col with RGBA values corresponding to index ci and transparency.

ROOT's indexed color palette does not support transparency.

Definition at line 215 of file TEveUtil.cxx.

void TEveUtil::ColorFromIdx ( Float_t  f1,
Color_t  c1,
Float_t  f2,
Color_t  c2,
UChar_t  col[4],
Bool_t  alpha = kTRUE 
)
static

Fill col with weighted RGBA values corresponding to color-indices c1 and c2.

If alpha is true, set alpha component of col to 255.

Definition at line 240 of file TEveUtil.cxx.

Color_t * TEveUtil::FindColorVar ( TObject obj,
const char *  varname 
)
static

Find address of Color_t data-member with name varname in object obj.

This is used to access color information for TGListTreeItem coloration from visualization macros that wrap TObjects into TEveElementObjectPtr instances.

Definition at line 261 of file TEveUtil.cxx.

Float_t TEveUtil::GetFraction ( Float_t  minM,
Float_t  maxM,
Float_t  minQ,
Float_t  maxQ 
)
static

Get fraction of interval [minQ, maxQ] in [minM, maxM].

Definition at line 386 of file TEveUtil.cxx.

Referenced by TEveCaloDataVec::GetCellList(), TEveCaloDataVec::Rebin(), and TEveCaloDataHist::Rebin().

Bool_t TEveUtil::IsU1IntervalContainedByMeanDelta ( Float_t  meanM,
Float_t  deltaM,
Float_t  meanQ,
Float_t  deltaQ 
)
inlinestatic

Definition at line 82 of file TEveUtil.h.

Bool_t TEveUtil::IsU1IntervalContainedByMinMax ( Float_t  minM,
Float_t  maxM,
Float_t  minQ,
Float_t  maxQ 
)
static

Return true if interval Q is contained within interval M for U1 variables.

It is assumed that all values are within the [-2pi, 2pi] interval and minM <= maxM & minQ <= maxQ.

Definition at line 346 of file TEveUtil.cxx.

Referenced by TEveCaloViz::CellInEtaPhiRng(), TEveCaloDataHist::GetCellList(), IsU1IntervalContainedByMeanDelta(), IsU1IntervalOverlappingByMeanDelta(), TEveCalo3DGL::RenderGridBarrel(), and TEveCalo3DGL::RenderGridEndCap().

Bool_t TEveUtil::IsU1IntervalOverlappingByMeanDelta ( Float_t  meanM,
Float_t  deltaM,
Float_t  meanQ,
Float_t  deltaQ 
)
inlinestatic

Definition at line 88 of file TEveUtil.h.

Bool_t TEveUtil::IsU1IntervalOverlappingByMinMax ( Float_t  minM,
Float_t  maxM,
Float_t  minQ,
Float_t  maxQ 
)
static

Return true if interval Q is overlapping within interval M for U1 variables.

It is assumed that all values are within the [-2pi, 2pi] interval and minM <= maxM & minQ <= maxQ.

Definition at line 367 of file TEveUtil.cxx.

Referenced by TEveCalo2D::BuildCellIdCache().

void TEveUtil::LoadMacro ( const char *  mac)
static

Makes sure that macro 'mac' is loaded, but do not reload it.

Definition at line 180 of file TEveUtil.cxx.

void TEveUtil::Macro ( const char *  mac)
static

Execute macro 'mac'. Do not reload the macro.

Definition at line 168 of file TEveUtil.cxx.

Referenced by TEveManager::LoadVizDB().

void TEveUtil::SetColorBrightness ( Float_t  value,
Bool_t  full_redraw = kFALSE 
)
static

Tweak all ROOT colors to become brighter (if value > 0) or darker (value < 0).

Reasonable values for the value argument are from -2.5 to 2.5 (error will be printed otherwise). If value is zero, the original colors are restored.

You should call TEveManager::FullRedraw3D() afterwards or set the argument full_redraw to true (default is false).

Definition at line 280 of file TEveUtil.cxx.

Referenced by TEveViewerList::SetColorBrightness().

void TEveUtil::SetupEnvironment ( )
static

Setup Include and Macro paths.

Since inclusion into ROOT this does nothing but could potentially be reactivated if some common macros are established and shipped with binary ROOT (in macros/eve). For example, these might be used to spawn specific GUI / GL configurations.

Definition at line 54 of file TEveUtil.cxx.

Referenced by TEveManager::Create().

void TEveUtil::SetupGUI ( )
static

Setup icon pictures and mime-types.

Definition at line 97 of file TEveUtil.cxx.

Referenced by TEveManager::Create().

Member Data Documentation

TObjArray * TEveUtil::fgDefaultColors = 0
staticprivate

Definition at line 38 of file TEveUtil.h.

Referenced by SetColorBrightness().


The documentation for this class was generated from the following files: