#include <DetectorDescription/Core/interface/DDScope.h>
Public Types | |
typedef std::vector< DDGeoHistory > | scope_type |
Public Member Functions | |
bool | addScope (const DDGeoHistory &s) |
Adds a scope. No new scope will be added if s is already contained in one of the subtrees. | |
DDScope (const DDGeoHistory &, int depth=0) | |
scope with a single subtree | |
DDScope () | |
empty scope | |
int | depth () const |
return the depth to wich the subtrees are restricted | |
const scope_type & | scope () const |
returns the scope container | |
void | setDepth (int) |
subtrees of the scope are only transversed down to the given level | |
~DDScope () | |
Protected Attributes | |
DDScopeClassification | classify_ |
int | depth_ |
scope_type | subtrees_ |
Friends | |
std::ostream & | operator<< (std::ostream &, const DDScope &) |
One scope is defined by a set of DDGeoHistory.
Definition at line 26 of file DDScope.h.
typedef std::vector<DDGeoHistory> DDScope::scope_type |
DDScope::DDScope | ( | ) |
DDScope::DDScope | ( | const DDGeoHistory & | h, | |
int | depth = 0 | |||
) |
DDScope::~DDScope | ( | ) |
bool DDScope::addScope | ( | const DDGeoHistory & | s | ) |
Adds a scope. No new scope will be added if s is already contained in one of the subtrees.
returns true, if scope has changed, else false.
Definition at line 51 of file DDScope.cc.
References classify_, different_branch, it, HLT_VtxMuL3::result, subtree, subtrees_, and supertree.
00052 { 00053 bool result = false; 00054 //DCOUT('S',"DDScope::addScope()" << h); 00055 scope_type::iterator it = subtrees_.begin(); 00056 scope_type buf; 00057 int supertreeCount = 0; 00058 bool diffBranch = false; 00059 bool subTree = false; 00060 //DDGeoHistory::size_type pos = subtree_.size(); 00061 00062 for(; it != subtrees_.end(); ++it) { 00063 dd_scope_class classification = classify_(h,*it); 00064 switch (classification) { 00065 00066 case different_branch: 00067 buf.push_back(*it); 00068 diffBranch=true; 00069 //buf.push_back(h); 00070 //DCOUT('S'," ->different_branch"); 00071 break; 00072 00073 case subtree: 00074 buf.push_back(*it); 00075 subTree = true; 00076 //DCOUT('S'," ->subtree"); 00077 break; 00078 00079 case supertree: 00080 //buf.push_back(h); 00081 ++supertreeCount; 00082 if (supertreeCount==1) 00083 buf.push_back(h); 00084 //DCOUT('S'," ->supertree"); 00085 break; 00086 00087 default: 00088 ; 00089 } 00090 } 00091 00092 if (diffBranch) { 00093 if (subTree==false) { 00094 buf.push_back(h); 00095 } 00096 } 00097 00098 if (!subtrees_.size()) 00099 subtrees_.push_back(h); 00100 else 00101 subtrees_ = buf; 00102 00103 //DCOUT('S',"DDScope.size()=" << subtrees_.size() ); 00104 return result; 00105 }
int DDScope::depth | ( | ) | const |
return the depth to wich the subtrees are restricted
Definition at line 114 of file DDScope.cc.
References depth_.
Referenced by DDQuery::exec().
00115 { 00116 return depth_; 00117 }
const DDScope::scope_type & DDScope::scope | ( | ) | const |
returns the scope container
Definition at line 120 of file DDScope.cc.
References subtrees_.
Referenced by DDQuery::exec().
00121 { 00122 return subtrees_; 00123 }
subtrees of the scope are only transversed down to the given level
Definition at line 108 of file DDScope.cc.
References depth_.
std::ostream& operator<< | ( | std::ostream & | os, | |
const DDScope & | scope | |||
) | [friend] |
DDScopeClassification DDScope::classify_ [protected] |
int DDScope::depth_ [protected] |
scope_type DDScope::subtrees_ [protected] |
Definition at line 57 of file DDScope.h.
Referenced by addScope(), DDScope(), operator<<(), and scope().