CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
eve_macros.h
Go to the documentation of this file.
1 #ifndef eve_macros_h
2 #define eve_macros_h
3 
4 #include <vector>
5 #include <string>
6 #include <Rtypes.h>
7 class TEveElement;
8 
9 // get the name from an object derived from both TEveElement and TNamed
10 const char* get_name( const TEveElement * element );
11 
12 // get the title from an object derived from both TEveElement and TNamed
13 const char* get_title( const TEveElement * element );
14 
15 // force a node to expand its internal reprsentation, so all children are actually present
16 void expand_node( TEveElement * element );
17 
18 // retrieve a TShape from a TEveElement
19 const TGeoShape * get_shape( const TEveElement * element );
20 
21 // overloaded non-const TShape retrieval, allowed from a TGeoShape only
22 TGeoShape * get_shape( TEveElement * element );
23 
24 // return a copy of the local-to-global transformation applied to a TEveElement
25 TGeoMatrix * get_transform( const TEveElement * element );
26 
27 // clone a TEveGeoShape or TEveGeoNode into a new TEveGeoShape, and add it as a child to a parent if one is given
28 TEveGeoShape * clone( const TEveElement * element, TEveElement * parent = 0);
29 
30 // set an element's color and alpha, and possibly its children's up to levels levels deep
31 void set_color( TEveElement * element, Color_t color, float alpha = 1.0, unsigned int levels = 0 );
32 
33 // check if a node has any children or if it's a leaf node
34 bool is_leaf_node( const TEveElement * element );
35 
36 // toggle an elements's children visibility, based on their name
37 // names are checked only up to their length, so for example tec:TEC will match both tec:TEC_1 and tec:TEC_2
38 void set_children_visibility( TEveElement * element, const std::string & node_name, const std::vector<std::string> & children_name, bool visibility );
39 
40 // set Tracker's Endcaps visibility
41 void set_tracker_endcap_visibility( TEveElement * tracker, bool visibility );
42 
43 // show Tracker's Endcaps
44 void show_tracker_endcap( TEveElement * tracker );
45 
46 // hide Tracker's Endcaps
47 void hide_tracker_endcap( TEveElement * tracker );
48 
49 #endif // eve_macros_h
float alpha
Definition: AMPTWrapper.h:95
list parent
Definition: dbtoconf.py:74
const char * get_title(const TEveElement *element)
Definition: eve_macros.cc:28
void show_tracker_endcap(TEveElement *tracker)
Definition: eve_macros.cc:238
void hide_tracker_endcap(TEveElement *tracker)
Definition: eve_macros.cc:244
const TGeoShape * get_shape(const TEveElement *element)
Definition: eve_macros.cc:66
void set_children_visibility(TEveElement *element, const std::string &node_name, const std::vector< std::string > &children_name, bool visibility)
Definition: eve_macros.cc:193
void set_tracker_endcap_visibility(TEveElement *tracker, bool visibility)
Definition: eve_macros.cc:226
void set_color(TEveElement *element, Color_t color, float alpha, unsigned int levels)
Definition: eve_macros.cc:154
TGeoMatrix * get_transform(const TEveElement *element)
Definition: eve_macros.cc:95
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
Definition: eve_macros.cc:135
void expand_node(TEveElement *element)
Definition: eve_macros.cc:43
const char * get_name(const TEveElement *element)
Definition: eve_macros.cc:13
bool is_leaf_node(const TEveElement *element)
Definition: eve_macros.cc:177