CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
eve_filter.h
Go to the documentation of this file.
1 #ifndef eve_filter_h
2 #define eve_filter_h
3 
4 #include <vector>
5 #include <string>
6 
7 #include "TPRegexp.h"
8 
9 class TEveElement;
10 
11 // actions for apply_filter(...) and node_filter(...)
12 enum {
14  do_hide = 1,
16 };
17 
18 // split a path into the name and a list of parent folders
19 void split_path(const std::string & path, std::string & name, std::vector<std::string> & parents);
20 
21 // generalizes a node name of the form namespace:Name_NUM into a (regexp) filter that allows any number
22 TPRegexp make_filter(const std::string & token);
23 
24 // generalizes a list of node names of the form namespace:Name_NUM into a (regexp) filter that allows any of the "namespace:Name" followd by any number
25 TPRegexp make_filter(const std::vector<std::string> & tokens);
26 
27 // apply the filters to a node, specifying if the removed elements should be hidden (default), deleted (does not work) or ignored (i.e. do nothing)
28 void node_filter(TEveElement * node, int simplify = do_hide, bool verbose = false);
29 
30 // initializes the filter static variables from a list of elements to display and colors to use
31 void init_filter(const std::vector< std::pair< std::string, Color_t> > & elements);
32 
33 // dump the filters
34 void dump(void);
35 
36 // apply the filters to a node, then notify it to update itself and its children for redrawing
37 void apply_filter(TEveElement * node, int simplify = do_hide, bool verbose = false);
38 
39 // find a TEve root object (could be a TEveGeoRootNode or a TEveGeoShape) by its name
40 TEveElement * get_root_object(const char* name);
41 
42 #endif // eve_filter_h
TPRegexp parents
Definition: eve_filter.cc:21
void node_filter(TEveElement *node, int simplify, bool verbose)
Definition: eve_filter.cc:73
void init_filter(const std::vector< std::pair< std::string, Color_t > > &elements)
Definition: eve_filter.cc:146
tuple node
Definition: Node.py:50
dictionary elements
TPRegexp make_filter(const std::string &token)
Definition: eve_filter.cc:39
TEveElement * get_root_object(const char *name)
Definition: eve_filter.cc:189