Provides an exploded view of the detector (tree-view) More...
#include <DDExpandedView.h>
Public Types | |
typedef std::vector< int > | nav_type |
std::vector of sibling numbers More... | |
typedef std::pair< int const *, size_t > | NavRange |
using | WalkerType = math::GraphWalker< DDLogicalPart, DDPosData * > |
Public Member Functions | |
void | clearScope () |
clears the scope; the full tree is available, depth=0 More... | |
int | copyno () const |
Copy number associated with the current node. More... | |
nav_type | copyNumbers () const |
return the stack of copy numbers More... | |
DDExpandedView (const DDCompactView &) | |
Constructs an expanded-view based on the compact-view. More... | |
int | depth () const |
depth of the scope. 0 means unrestricted depth. More... | |
bool | firstChild () |
set the current node to the first child ... More... | |
const DDGeoHistory & | geoHistory () const |
The list of ancestors up to the root-node of the current node. More... | |
bool | goTo (const nav_type &) |
transversed the DDExpandedView according to the given stack of sibling numbers More... | |
bool | goTo (int const *newpos, size_t sz) |
bool | goTo (NavRange) |
bool | goToHistory (const DDGeoHistory &sc) |
const DDLogicalPart & | logicalPart () const |
The logical-part of the current node in the expanded-view. More... | |
DDsvalues_type | mergedSpecifics () const |
void | mergedSpecificsV (DDsvalues_type &res) const |
const std::string & | name () const |
The name of the logical-part of the current node in the expanded-view. More... | |
nav_type | navPos () const |
return the stack of sibling numbers which indicates the current position in the DDExpandedView More... | |
bool | next () |
set current node to the next node in the expanded tree More... | |
bool | nextB () |
broad search order of next() More... | |
bool | nextSibling () |
set the current node to the next sibling ... More... | |
bool | parent () |
set the current node to the parent node ... More... | |
void | reset () |
true, if a call to firstChild() would succeed (current node has at least one child) More... | |
const DDRotationMatrix & | rotation () const |
The absolute rotation of the current node. More... | |
const DDGeoHistory & | scope () const |
The scope of the expanded-view. More... | |
bool | setScope (const DDGeoHistory &hist, int depth=0) |
sets the scope of the expanded view More... | |
std::vector< const DDsvalues_type * > | specifics () const |
User specific data attached to the current node. More... | |
void | specificsV (std::vector< const DDsvalues_type * > &vc) const |
const DDTranslation & | translation () const |
The absolute translation of the current node. More... | |
const std::vector< double > & | vector (std::string_view iKey) const |
The DDVector information. More... | |
virtual | ~DDExpandedView () |
Protected Member Functions | |
bool | descend (const DDGeoHistory &sc) |
Protected Attributes | |
const DDCompactView * | cpv_ |
unsigned int | depth_ |
depth of the scope, 0==unrestricted depth More... | |
DDGeoHistory | history_ |
std::vector of DDExpandedNode More... | |
std::vector< nav_type > | nextBStack_ |
const DDRotationMatrix | rot_ |
DDGeoHistory | scope_ |
scope of the expanded view More... | |
const DDTranslation | trans_ |
WalkerType | w2_ |
WalkerType * | walker_ |
the tricky walker More... | |
const DDPosData * | worldpos_ |
??? More... | |
Friends | |
class | DDFilteredView |
Provides an exploded view of the detector (tree-view)
DDExpandedView provides a tree-walker (iterator) for the expanded view of the detector description. Further it provides a registration mechanism for call-backs whenever a node in the expanded view becomes current and fullfills the user-defined predicate.
FIXME: DDExpandedView: in the Prototype just one class - FIXME: later seperation of interface & implementation! Taking a DDCompactView the DDExpandedView expands the compact-view into a detector tree. One instance of DDExpandedView corresponds to one node in the tree. It is the 'current' node. By using tree navigation ( next(), nextSibling(), parent(), firstChild() ) the DDExpandedView represents the new corresponding node.
Definition at line 41 of file DDExpandedView.h.
typedef std::vector<int> DDExpandedView::nav_type |
std::vector of sibling numbers
Definition at line 48 of file DDExpandedView.h.
typedef std::pair<int const *, size_t> DDExpandedView::NavRange |
Definition at line 49 of file DDExpandedView.h.
Definition at line 45 of file DDExpandedView.h.
DDExpandedView::DDExpandedView | ( | const DDCompactView & | cpv | ) |
|
virtual |
Definition at line 40 of file DDExpandedView.cc.
void DDExpandedView::clearScope | ( | ) |
clears the scope; the full tree is available, depth=0
Definition at line 263 of file DDExpandedView.cc.
References depth_, and scope_.
Referenced by DDFilteredView::clearScope(), and reset().
int DDExpandedView::copyno | ( | ) | const |
Copy number associated with the current node.
Definition at line 54 of file DDExpandedView.cc.
References history_.
Referenced by DDFilteredView::copyno(), DDCompareEPV(), DDExpandedViewDump(), and MagGeoBuilderFromDDD::volumeHandle::volumeHandle().
DDExpandedView::nav_type DDExpandedView::copyNumbers | ( | ) | const |
return the stack of copy numbers
Definition at line 425 of file DDExpandedView.cc.
References history_, and mps_fire::result.
Referenced by DDFilteredView::copyNumbers().
int DDExpandedView::depth | ( | ) | const |
depth of the scope. 0 means unrestricted depth.
Definition at line 52 of file DDExpandedView.cc.
References depth_.
Referenced by DDCompareEPV(), and setScope().
|
protected |
Definition at line 341 of file DDExpandedView.cc.
References firstChild(), history_, nextSibling(), and mps_fire::result.
Referenced by setScope().
bool DDExpandedView::firstChild | ( | ) |
set the current node to the first child ...
returns true, if a child of the current node exists and updates this
otherwise returns false
Definition at line 101 of file DDExpandedView.cc.
References depth_, history_, mps_fire::result, DDPosData::rot(), scope_, DDPosData::trans(), and DDPosData::trans_.
Referenced by MagGeoBuilderFromDDD::build(), DDCompareEPV(), descend(), goTo(), goToHistory(), and next().
const DDGeoHistory & DDExpandedView::geoHistory | ( | ) | const |
The list of ancestors up to the root-node of the current node.
Definition at line 50 of file DDExpandedView.cc.
References history_.
Referenced by DDSpecificsHasNamedValueFilter::accept(), DDSpecificsMatchesValueFilter::accept(), DDSpecificsFilter::accept_impl(), MagGeoBuilderFromDDD::build(), DDFilteredView::clearScope(), DDExpandedViewDump(), DDFilteredView::DDFilteredView(), GeometryInfoDump::dumpInfo(), DDFilteredView::firstChild(), DDFilteredView::geoHistory(), mergedSpecificsV(), DDFilteredView::nextSibling(), DDFilteredView::reset(), and specificsV().
bool DDExpandedView::goTo | ( | const nav_type & | newpos | ) |
transversed the DDExpandedView according to the given stack of sibling numbers
Definition at line 381 of file DDExpandedView.cc.
Referenced by goTo().
bool DDExpandedView::goTo | ( | int const * | newpos, |
size_t | sz | ||
) |
Definition at line 385 of file DDExpandedView.cc.
References firstChild(), goToHistory(), history_, mps_fire::i, dqmdumpme::k, nextSibling(), reset(), and mps_fire::result.
bool DDExpandedView::goTo | ( | NavRange | newpos | ) |
bool DDExpandedView::goToHistory | ( | const DDGeoHistory & | pos | ) |
goTo will reset the ExpandedView if pos is not a valid position. Currently no checks are implemented to verify that pos is within the current scope of the ExpandedView.
Definition at line 310 of file DDExpandedView.cc.
References depth_, firstChild(), mps_fire::i, dqmiolumiharvest::j, nextSibling(), reset(), mps_fire::result, alignCSCRings::s, scope_, and setScope().
Referenced by DDFilteredView::firstChild(), goTo(), DDFilteredView::nextSibling(), and DDFilteredView::parent().
const DDLogicalPart & DDExpandedView::logicalPart | ( | ) | const |
The logical-part of the current node in the expanded-view.
Definition at line 42 of file DDExpandedView.cc.
References history_.
Referenced by DDSpecificsHasNamedValueFilter::accept(), DDSpecificsMatchesValueFilter::accept(), DDSpecificsFilter::accept_impl(), MagGeoBuilderFromDDD::build(), DDCompareEPV(), DDExpandedViewDump(), GeometryInfoDump::dumpInfo(), DDFilteredView::logicalPart(), DDFilteredView::material(), mergedSpecificsV(), DDFilteredView::name(), output(), DDFilteredView::parameters(), DDFilteredView::shape(), specificsV(), and MagGeoBuilderFromDDD::volumeHandle::volumeHandle().
DDsvalues_type DDExpandedView::mergedSpecifics | ( | ) | const |
Definition at line 237 of file DDExpandedView.cc.
References mergedSpecificsV().
void DDExpandedView::mergedSpecificsV | ( | DDsvalues_type & | res | ) | const |
Definition at line 243 of file DDExpandedView.cc.
References DDLogicalPart::attachedSpecifics(), geoHistory(), gpuVertexFinder::hist, logicalPart(), MatrixUtil::merge(), and HistogramManager_cfi::specs.
Referenced by DDFilteredView::mergedSpecifics(), mergedSpecifics(), and DDFilteredView::mergedSpecificsV().
const std::string & DDExpandedView::name | ( | ) | const |
The name of the logical-part of the current node in the expanded-view.
Definition at line 44 of file DDExpandedView.cc.
References history_.
Referenced by config.CFG::__str__(), validation.Sample::digest(), and VIDSelectorBase.VIDSelectorBase::initialize().
DDExpandedView::nav_type DDExpandedView::navPos | ( | ) | const |
return the stack of sibling numbers which indicates the current position in the DDExpandedView
Definition at line 414 of file DDExpandedView.cc.
References history_, mps_fire::i, and dqmiolumiharvest::j.
Referenced by GeometryInfoDump::dumpInfo(), and DDFilteredView::navPos().
bool DDExpandedView::next | ( | void | ) |
set current node to the next node in the expanded tree
Tree transversal:
Currently the whole remaining subtree is transversed when next() is subsequently called.
Definition at line 175 of file DDExpandedView.cc.
References firstChild(), nextSibling(), and parent().
Referenced by DDCompareEPV(), DDExpandedViewDump(), ddstats(), GeometryInfoDump::dumpInfo(), DDFilteredView::next(), and output().
bool DDExpandedView::nextB | ( | ) |
bool DDExpandedView::nextSibling | ( | ) |
set the current node to the next sibling ...
returns true, if a next sibling exists and updates this
otherwise returns false. If a scope was set, the nextSibling of the root of the scope is not selected.
Definition at line 61 of file DDExpandedView.cc.
References history_, mps_fire::result, DDPosData::rot(), DDExpandedNode::rot_, scope_, and DDExpandedNode::trans_.
Referenced by MagGeoBuilderFromDDD::build(), DDCompareEPV(), descend(), goTo(), goToHistory(), next(), and DDFilteredView::nextSibling().
bool DDExpandedView::parent | ( | ) |
set the current node to the parent node ...
returns ture, if a parent exists and updates this
otherwise returns false. When false is returned, the root node of the scope is reached.
Definition at line 138 of file DDExpandedView.cc.
References history_, mps_fire::result, and scope_.
Referenced by DDCompareEPV(), next(), DDFilteredView::nextSibling(), reset(), and setScope().
void DDExpandedView::reset | ( | void | ) |
true, if a call to firstChild() would succeed (current node has at least one child)
clears the scope and sets the ExpandedView to its root-node
Definition at line 268 of file DDExpandedView.cc.
References clearScope(), and parent().
Referenced by goTo(), goToHistory(), and DDFilteredView::reset().
const DDRotationMatrix & DDExpandedView::rotation | ( | void | ) | const |
The absolute rotation of the current node.
Definition at line 48 of file DDExpandedView.cc.
References history_.
Referenced by MagGeoBuilderFromDDD::build(), DDExpandedViewDump(), GeometryInfoDump::dumpInfo(), output(), MagGeoBuilderFromDDD::volumeHandle::referencePlane(), and DDFilteredView::rotation().
const DDGeoHistory & DDExpandedView::scope | ( | ) | const |
The scope of the expanded-view.
All navigational commands only operate in the subtree rooted by the node marked by the node of the DDGeoHistory returned by this method. If the size() of the scope equals 0, the full scope covering the whole expanded-view is set (default).
Definition at line 261 of file DDExpandedView.cc.
References scope_.
Referenced by DDFilteredView::scope().
bool DDExpandedView::setScope | ( | const DDGeoHistory & | sc, |
int | depth = 0 |
||
) |
sets the scope of the expanded view
The scope of the expanded-view is set to the subtree rooted by the node marked by the DDGeohistory hist. The current not of the expanded view is set to the root of the subtree. All navigational methods apply only on the subtree.
In case of hist not marking a valid node in the expanded-view, the state of the expanded-view is unchanged and false is returned by setScope(). Otherwise true is returned.
Definition at line 284 of file DDExpandedView.cc.
References visDQMUpload::buf, depth(), depth_, descend(), parent(), mps_fire::result, and scope_.
Referenced by goToHistory(), and DDFilteredView::setScope().
std::vector< const DDsvalues_type * > DDExpandedView::specifics | ( | ) | const |
User specific data attached to the current node.
User specific data can be attached to single nodes or a selection of nodes in the expanded view through the DDSpecifics interface.
The resulting std::vector is of size 0 if no specific data was attached.
Definition at line 215 of file DDExpandedView.cc.
References mps_fire::result, and specificsV().
void DDExpandedView::specificsV | ( | std::vector< const DDsvalues_type * > & | vc | ) | const |
Definition at line 222 of file DDExpandedView.cc.
References DDLogicalPart::attachedSpecifics(), geoHistory(), gpuVertexFinder::hist, logicalPart(), mps_fire::result, and HistogramManager_cfi::specs.
Referenced by DDFilteredView::specifics(), specifics(), and DDFilteredView::specificsV().
const DDTranslation & DDExpandedView::translation | ( | void | ) | const |
The absolute translation of the current node.
Definition at line 46 of file DDExpandedView.cc.
References history_.
Referenced by MagGeoBuilderFromDDD::build(), DDExpandedViewDump(), GeometryInfoDump::dumpInfo(), output(), DDFilteredView::translation(), and MagGeoBuilderFromDDD::volumeHandle::volumeHandle().
|
inline |
The DDVector information.
Definition at line 90 of file DDExpandedView.h.
References cpv_, and DDCompactView::vector().
Referenced by DDFilteredView::vector().
|
friend |
Definition at line 42 of file DDExpandedView.h.
|
protected |
Definition at line 146 of file DDExpandedView.h.
Referenced by vector().
|
protected |
depth of the scope, 0==unrestricted depth
Definition at line 143 of file DDExpandedView.h.
Referenced by clearScope(), depth(), DDFilteredView::firstChild(), firstChild(), goToHistory(), and setScope().
|
protected |
std::vector of DDExpandedNode
Definition at line 141 of file DDExpandedView.h.
Referenced by copyno(), copyNumbers(), DDExpandedView(), descend(), firstChild(), geoHistory(), goTo(), logicalPart(), name(), navPos(), nextSibling(), parent(), rotation(), and translation().
|
protected |
Definition at line 145 of file DDExpandedView.h.
|
protected |
Definition at line 140 of file DDExpandedView.h.
Referenced by DDExpandedView().
|
protected |
scope of the expanded view
Definition at line 142 of file DDExpandedView.h.
Referenced by clearScope(), DDFilteredView::firstChild(), firstChild(), goToHistory(), nextSibling(), parent(), DDFilteredView::print(), scope(), and setScope().
|
protected |
Definition at line 139 of file DDExpandedView.h.
Referenced by DDExpandedView().
|
protected |
Definition at line 138 of file DDExpandedView.h.
Referenced by DDExpandedView().
|
protected |
|
protected |