CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DDScope.h
Go to the documentation of this file.
1 #ifndef DDCore_DDScope_h
2 #define DDCore_DDScope_h
3 
4 #include <vector>
6 
8 
10 
18 {
19  dd_scope_class operator()(const DDGeoHistory & ,const DDGeoHistory &) const;
20 };
21 
23 
26 class DDScope
27 {
28  friend std::ostream & operator<<(std::ostream &, const DDScope &);
29 
30 public:
31  typedef std::vector<DDGeoHistory> scope_type;
32 
34  DDScope();
35 
37  DDScope(const DDGeoHistory &, int depth=0);
38 
39  ~DDScope();
40 
42 
45  bool addScope(const DDGeoHistory & s);
46 
48  void setDepth(int);
49 
51  int depth() const;
52 
54  const scope_type & scope() const;
55 
56 protected:
59  int depth_;
60 };
61 
62 std::ostream & operator<<(std::ostream &, const DDScope &);
63 
65 
70 /*
71 struct DDGeoHistoryCompare
72 {
73  bool operator()(const DDGeoHistory & left ,const DDGeoHistory & right) const
74  {
75  bool result=false;
76  DDGeoHistory::const_iterator lit = left.begin();
77  DDGeoHistory::const_iterator rit = right.begin();
78  while(lit != left.end() && rit!=right.end()) {
79  result |= less_(*lit,*rit);
80  ++lit;
81  ++rit;
82  }
83  return result;
84  }
85  DDExpandedNodeLess less_;
86 };
87 */
88 
89 
90 
91 #endif
scope_type subtrees_
Definition: DDScope.h:57
bool addScope(const DDGeoHistory &s)
Adds a scope. No new scope will be added if s is already contained in one of the subtrees.
Definition: DDScope.cc:51
dd_scope_class
Definition: DDScope.h:7
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:187
Classification of scope describe by A towards B.
Definition: DDScope.h:17
DDScopeClassification classify_
Definition: DDScope.h:58
std::vector< DDGeoHistory > scope_type
Definition: DDScope.h:31
DDScope()
empty scope
Definition: DDScope.cc:37
~DDScope()
Definition: DDScope.cc:47
int depth() const
return the depth to wich the subtrees are restricted
Definition: DDScope.cc:114
std::vector< DDExpandedNode > DDGeoHistory
Geometrical &#39;path&#39; of the current node up to the root-node.
defines subtrees in the expanded-view
Definition: DDScope.h:26
friend std::ostream & operator<<(std::ostream &, const DDScope &)
Definition: DDScope.cc:125
const scope_type & scope() const
returns the scope container
Definition: DDScope.cc:120
void setDepth(int)
subtrees of the scope are only transversed down to the given level
Definition: DDScope.cc:108
Definition: DDScope.h:7
dd_scope_class operator()(const DDGeoHistory &, const DDGeoHistory &) const
Definition: DDScope.cc:5
int depth_
Definition: DDScope.h:59
string s
Definition: asciidump.py:422