Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:11:48

0001 #ifndef eve_macros_h
0002 #define eve_macros_h
0003 
0004 #include <vector>
0005 #include <string>
0006 #include <Rtypes.h>
0007 class TEveElement;
0008 
0009 // get the name from an object derived from both TEveElement and TNamed
0010 const char* get_name( const TEveElement * element );
0011 
0012 // get the title from an object derived from both TEveElement and TNamed
0013 const char* get_title( const TEveElement * element );
0014 
0015 // force a node to expand its internal reprsentation, so all children are actually present
0016 void expand_node( TEveElement * element );
0017 
0018 // retrieve a TShape from a TEveElement
0019 const TGeoShape * get_shape( const TEveElement * element );
0020 
0021 // overloaded non-const TShape retrieval, allowed from a TGeoShape only
0022 TGeoShape * get_shape( TEveElement * element );
0023 
0024 // return a copy of the local-to-global transformation applied to a TEveElement
0025 TGeoMatrix * get_transform( const TEveElement * element );
0026 
0027 // clone a TEveGeoShape or TEveGeoNode into a new TEveGeoShape, and add it as a child to a parent if one is given
0028 TEveGeoShape * clone( const TEveElement * element, TEveElement * parent = 0);
0029 
0030 // set an element's color and alpha, and possibly its children's up to levels levels deep
0031 void set_color( TEveElement * element, Color_t color, float alpha = 1.0, unsigned int levels = 0 );
0032 
0033 // check if a node has any children or if it's a leaf node
0034 bool is_leaf_node( const TEveElement * element );
0035 
0036 // toggle an elements's children visibility, based on their name
0037 // names are checked only up to their length, so for example tec:TEC will match both tec:TEC_1 and tec:TEC_2
0038 void set_children_visibility( TEveElement * element, const std::string & node_name, const std::vector<std::string> & children_name, bool visibility );
0039 
0040 // set Tracker's Endcaps visibility
0041 void set_tracker_endcap_visibility( TEveElement * tracker, bool visibility );
0042 
0043 // show Tracker's Endcaps
0044 void show_tracker_endcap( TEveElement * tracker );
0045 
0046 // hide Tracker's Endcaps
0047 void hide_tracker_endcap( TEveElement * tracker );
0048 
0049 #endif // eve_macros_h