CMS 3D CMS Logo

DDFilteredView.h
Go to the documentation of this file.
1 #ifndef DDCore_DDFilteredView_h
2 #define DDCore_DDFilteredView_h
3 
4 #include <utility>
5 #include <vector>
6 
13 
14 class DDCompactView;
15 class DDLogicalPart;
16 class DDScope;
17 
19 {
20 public:
22 
24  DDFilteredView(const DDCompactView &, const DDFilter&);
25 
26  DDFilteredView() = delete;
27 
29  const DDLogicalPart & logicalPart() const;
30 
32  const DDTranslation & translation() const;
33 
35  const DDRotationMatrix & rotation() const;
36 
38  const DDGeoHistory & geoHistory() const;
39 
41  nav_type navPos() const;
42  bool goTo(const nav_type &);
43 
45  nav_type copyNumbers() const;
46 
48  void specificsV(std::vector<const DDsvalues_type * > & result) const;
49  std::vector<const DDsvalues_type * > specifics() const;
50  void mergedSpecificsV(DDsvalues_type & merged) const;
52 
54  int copyno() const;
55 
56  // navigation
57 
59  const DDGeoHistory & scope() const;
60 
62  bool setScope(const DDGeoHistory & hist);
63 
65  void clearScope();
66 
68  bool next();
69 
71  bool nextSibling();
72 
74  bool firstChild();
75 
77  bool parent();
78 
80  void reset();
81 
82  void print();
83 
84  const std::vector<DDGeoHistory> & history() const;
85 
86 private:
87  bool filter();
88 
90  DDFilter const* filter_;
91  std::vector<DDGeoHistory> parents_; // filtered-parents
92 };
93 
94 #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 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.
ROOT::Math::Rotation3D DDRotationMatrix
A DDRotationMatrix is currently implemented with a ROOT Rotation3D.
std::vector< DDGeoHistory > parents_
nav_type navPos() const
return the stack of sibling numbers
Compact representation of the geometrical detector hierarchy.
Definition: DDCompactView.h:80
const DDGeoHistory & geoHistory() const
The list of ancestors up to the root-node of the current node.
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.
bool next()
set current node to the next node in the filtered tree
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
Definition: DDLogicalPart.h:93
bool setScope(const DDGeoHistory &hist)
sets the scope of the expanded view
std::vector< DDExpandedNode > DDGeoHistory
Geometrical &#39;path&#39; of the current node up to the root-node.
DDFilter const * filter_
defines subtrees in the expanded-view
Definition: DDScope.h:28
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
std::vector< std::pair< unsigned int, DDValue > > DDsvalues_type
Definition: DDsvalues.h:12
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:15
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
DDFilteredView()=delete
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)
std::vector< int > nav_type
std::vector of sibling numbers