CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DDFilteredView.h
Go to the documentation of this file.
1 #ifndef DDCore_DDFilteredView_h
2 #define DDCore_DDFilteredView_h
3 
4 #include <vector>
5 #include <utility>
8 
9 class DDScope;
10 
12 {
13 public:
15 
17 
19 
20  enum log_op { AND, OR };
21 
22  void addFilter(const DDFilter &, log_op op=AND);
23 
25  const DDLogicalPart & logicalPart() const;
26 
28  const DDTranslation & translation() const;
29 
31  const DDRotationMatrix & rotation() const;
32 
34  const DDGeoHistory & geoHistory() const;
35 
37  nav_type navPos() const;
38  bool goTo(const nav_type &);
39 
41  nav_type copyNumbers() const;
42 
44  void specificsV(std::vector<const DDsvalues_type * > & result) const;
45  std::vector<const DDsvalues_type * > specifics() const;
46  void mergedSpecificsV(DDsvalues_type & merged) const;
48 
50  int copyno() const;
51 
52  // navigation
53 
55  const DDGeoHistory & scope() const;
56 
58  bool setScope(const DDGeoHistory & hist);
59 
61  void clearScope();
62 
64  bool next();
65 
67  bool nextSibling();
68 
70  bool firstChild();
71 
73  bool parent();
74 
76  void reset();
77 
78  void print();
79 
80  const std::vector<DDGeoHistory> & history() const;
81 
82 private:
83  bool filter();
84 
85 private:
87  const DDScope * scope_;
88  typedef DDFilter const * criterion_type;
89  typedef std::vector<criterion_type> criteria_type;
90  typedef std::vector<log_op> logops_type;
91 
93  logops_type logOps_; // logical operation for merging the result of 2 filters
94  std::vector<DDGeoHistory> parents_; // filtered-parents
95 
96 };
97 
98 #endif
bool parent()
set the current node to the parent node ...
const DDLogicalPart & logicalPart() const
The logical-part of the current node in the filtered-view.
void addFilter(const DDFilter &, log_op op=AND)
void mergedSpecificsV(DDsvalues_type &merged) const
nav_type copyNumbers() const
return the stack of copy numbers
DDExpandedView epv_
bool nextSibling()
set the current node to the next sibling ...
const DDRotationMatrix & rotation() const
The absolute rotation of the current node.
std::vector< DDGeoHistory > parents_
nav_type navPos() const
return the stack of sibling numbers
type of data representation of DDCompactView
Definition: DDCompactView.h:77
const DDGeoHistory & geoHistory() const
The list of ancestors up to the root-node of the current node.
std::vector< log_op > logops_type
const std::vector< DDGeoHistory > & history() const
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
Definition: DDTranslation.h:7
bool goTo(const nav_type &)
int copyno() const
Copy number associated with the current node.
DDFilter const * criterion_type
criteria_type criteria_
bool next()
set current node to the next node in the filtered tree
tuple result
Definition: query.py:137
std::vector< std::pair< unsigned int, DDValue > > DDsvalues_type
std::maps an index to a DDValue. The index corresponds to the index assigned to the name of the std::...
Definition: DDsvalues.h:19
const DDScope * scope_
std::vector< criterion_type > criteria_type
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
Definition: DDLogicalPart.h:88
bool setScope(const DDGeoHistory &hist)
sets the scope of the expanded view
DDFilteredView(const DDCompactView &)
std::vector< DDExpandedNode > DDGeoHistory
Geometrical &#39;path&#39; of the current node up to the root-node.
logops_type logOps_
defines subtrees in the expanded-view
Definition: DDScope.h:26
DDsvalues_type mergedSpecifics() const
const DDGeoHistory & scope() const
The scope of the expanded-view.
DDExpandedView::nav_type nav_type
void clearScope()
clears the scope; the full tree is available, depth=0
bool firstChild()
set the current node to the first child ...
A Filter accepts or rejects a DDExpandedNode based on a user-coded decision rule. ...
Definition: DDFilter.h:18
void specificsV(std::vector< const DDsvalues_type * > &result) const
User specific data attached to the current node.
void reset()
clears the scope and sets the filtered view to its root-node
const DDTranslation & translation() const
The absolute translation of the current node.
std::vector< const DDsvalues_type * > specifics() const
Provides an exploded view of the detector (tree-view)
ROOT::Math::Rotation3D DDRotationMatrix
A DDRotationMatrix is currently implemented with a ROOT Rotation3D.
std::vector< int > nav_type
std::vector of sibling numbers