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 |
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 (NavRange) |
bool | goTo (int const *newpos, size_t sz) |
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 |
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... | |
virtual | ~DDExpandedView () |
Protected Member Functions | |
bool | descend (const DDGeoHistory &sc) |
Protected Attributes | |
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_ |
DDCompactView::walker_type | w2_ |
DDCompactView::walker_type * | 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 35 of file DDExpandedView.h.
typedef std::vector<int> DDExpandedView::nav_type |
std::vector of sibling numbers
Definition at line 41 of file DDExpandedView.h.
typedef std::pair<int const *, size_t> DDExpandedView::NavRange |
Definition at line 42 of file DDExpandedView.h.
DDExpandedView::DDExpandedView | ( | const DDCompactView & | cpv | ) |
Constructs an expanded-view based on the compact-view.
After construction the instance corresponds to the root of the geometrical tree.
Definition at line 7 of file DDExpandedView.cc.
References history_, rot_, trans_, w2_, walker_, and worldpos_.
|
virtual |
Definition at line 30 of file DDExpandedView.cc.
void DDExpandedView::clearScope | ( | ) |
clears the scope; the full tree is available, depth=0
Definition at line 295 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 62 of file DDExpandedView.cc.
References history_.
Referenced by DDFilteredView::copyno(), DDExpandedViewDump(), DDI::Specific::node(), DDCompareEPV::operator()(), and TrackerGeometricDetExtraESModule::putOne().
DDExpandedView::nav_type DDExpandedView::copyNumbers | ( | ) | const |
return the stack of copy numbers
Definition at line 475 of file DDExpandedView.cc.
References history_, and query::result.
Referenced by DDFilteredView::copyNumbers().
int DDExpandedView::depth | ( | ) | const |
depth of the scope. 0 means unrestricted depth.
Definition at line 56 of file DDExpandedView.cc.
References depth_.
Referenced by DDCompareEPV::operator()(), and setScope().
|
protected |
Definition at line 380 of file DDExpandedView.cc.
References firstChild(), history_, nextSibling(), and query::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 117 of file DDExpandedView.cc.
References depth_, history_, query::result, DDPosData::rot(), scope_, and DDPosData::trans_.
Referenced by MagGeoBuilderFromDDD::build(), descend(), goTo(), goToHistory(), next(), DDI::Specific::node(), and DDCompareEPV::operator()().
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 MagGeoBuilderFromDDD::build(), DDFilteredView::clearScope(), DDExpandedViewDump(), DDFilteredView::DDFilteredView(), GeometryInfoDump::dumpInfo(), DDQuery::exec(), DDFilteredView::firstChild(), DDFilteredView::geoHistory(), mergedSpecificsV(), DDFilteredView::nextSibling(), TrackerGeometricDetExtraESModule::putOne(), 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 423 of file DDExpandedView.cc.
Referenced by goTo(), DDDefaultNumberingScheme::node(), and TrackerGeometricDetExtraESModule::produce().
bool DDExpandedView::goTo | ( | NavRange | newpos | ) |
Definition at line 428 of file DDExpandedView.cc.
References goTo().
bool DDExpandedView::goTo | ( | int const * | newpos, |
size_t | sz | ||
) |
Definition at line 432 of file DDExpandedView.cc.
References firstChild(), goToHistory(), history_, i, relval_steps::k, nextSibling(), reset(), and query::result.
bool DDExpandedView::goToHistory | ( | const DDGeoHistory & | pos | ) |
NOT IN THE PROTOTYPE
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 347 of file DDExpandedView.cc.
References depth_, firstChild(), i, j, nextSibling(), reset(), query::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 32 of file DDExpandedView.cc.
References history_.
Referenced by DDSpecificsFilter::accept_impl(), MagGeoBuilderFromDDD::build(), DDExpandedViewDump(), GeometryInfoDump::dumpInfo(), DDFilteredView::logicalPart(), mergedSpecificsV(), DDI::Specific::node(), DDCompareEPV::operator()(), output(), TrackerGeometricDetExtraESModule::putOne(), specificsV(), and MagGeoBuilderFromDDD::volumeHandle::volumeHandle().
DDsvalues_type DDExpandedView::mergedSpecifics | ( | ) | const |
Definition at line 266 of file DDExpandedView.cc.
References mergedSpecificsV().
void DDExpandedView::mergedSpecificsV | ( | DDsvalues_type & | res | ) | const |
Definition at line 272 of file DDExpandedView.cc.
References DDLogicalPart::attachedSpecifics(), geoHistory(), estimatePileup::hist, logicalPart(), and MatrixUtil::merge().
Referenced by DDSpecificsFilter::accept_impl(), DDFilteredView::mergedSpecifics(), mergedSpecifics(), and DDFilteredView::mergedSpecificsV().
DDExpandedView::nav_type DDExpandedView::navPos | ( | ) | const |
return the stack of sibling numbers which indicates the current position in the DDExpandedView
Definition at line 463 of file DDExpandedView.cc.
References history_, i, and j.
Referenced by DDDefaultNumberingScheme::DDDefaultNumberingScheme(), GeometryInfoDump::dumpInfo(), DDDefaultNumberingScheme::id(), 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 195 of file DDExpandedView.cc.
References firstChild(), nextSibling(), and parent().
Referenced by BeautifulSoup.PageElement::_invert(), DDDefaultNumberingScheme::DDDefaultNumberingScheme(), DDExpandedViewDump(), ddstats(), GeometryInfoDump::dumpInfo(), DDQuery::exec(), DDFilteredView::next(), DDCompareEPV::operator()(), 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 72 of file DDExpandedView.cc.
References history_, query::result, DDPosData::rot(), DDExpandedNode::rot_, scope_, and DDExpandedNode::trans_.
Referenced by BeautifulSoup.Tag::__str__(), BeautifulSoup.PageElement::_invert(), MagGeoBuilderFromDDD::build(), descend(), goTo(), goToHistory(), next(), DDFilteredView::nextSibling(), DDI::Specific::node(), and DDCompareEPV::operator()().
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 157 of file DDExpandedView.cc.
References history_, query::result, and scope_.
Referenced by BeautifulSoup.PageElement::_invert(), Vispa.Gui.ConnectableWidget.ConnectableWidget::addMenuEntry(), Vispa.Views.LineDecayView.LineDecayContainer::applyFilter(), Vispa.Views.BoxDecayView.BoxDecayContainer::arrangeUsingRelations(), Vispa.Views.BoxDecayView.BoxDecayContainer::autolayoutAlgorithm(), Vispa.Gui.ZoomableScrollableWidgetOwner.ZoomableScrollableWidgetOwner::autosizeScrollArea(), Vispa.Views.BoxDecayView.BoxDecayContainer::autosizeScrollArea(), Vispa.Gui.PortWidget.PortWidget::connectionPoint(), Vispa.Main.StartupScreen.StartupScreen::createDescriptionWidget(), Vispa.Views.BoxDecayView.BoxDecayContainer::dataAccessor(), Vispa.Views.LineDecayView.LineDecayContainer::dataAccessor(), Vispa.Views.LineDecayView.DecayLine::dataAccessor(), Vispa.Views.LineDecayView.LineDecayContainer::delete(), Vispa.Views.LineDecayView.DecayNode::delete(), Vispa.Views.LineDecayView.DecayLine::delete(), Vispa.Gui.VispaWidget.VispaWidget::delete(), Vispa.Gui.VispaWidget.VispaWidget::dragWidget(), Vispa.Share.ImageExporter.ImageExporter::exportImageDialog(), Vispa.Views.LineDecayView.DecayLine::extendedSize(), Vispa.Gui.VispaWidget.VispaWidget::keyPressEvent(), Vispa.Gui.MenuWidget.MenuWidget::leaveEvent(), Vispa.Gui.ConnectableWidget.ConnectableWidget::leaveEvent(), Vispa.Gui.PortWidget.PortWidget::moduleParent(), Vispa.Gui.WidgetContainer.WidgetContainer::mouseDoubleClickEvent(), Vispa.Gui.VispaWidget.VispaWidget::mouseDoubleClickEvent(), Vispa.Gui.PortConnection.PointToPointConnection::mousePressEvent(), Vispa.Gui.VispaWidget.VispaWidget::mousePressEvent(), Vispa.Views.LineDecayView.ParticleWidget::mousePressEvent(), Vispa.Views.LineDecayView.DecayNode::move(), next(), DDFilteredView::nextSibling(), Vispa.Views.LineDecayView.LineDecayContainer::noDecorationsMode(), Vispa.Views.LineDecayView.LineDecayContainer::operationId(), DDCompareEPV::operator()(), Vispa.Views.LineDecayView.DecayLine::paint(), Vispa.Gui.VispaWidget.VispaWidget::paintEvent(), Vispa.Gui.ConnectableWidget.ConnectableWidget::positionizeMenuWidget(), Vispa.Views.LineDecayView.DecayLine::qtLineStyle(), reset(), Vispa.Views.WidgetView.WidgetView::restoreSelection(), Vispa.Views.WidgetView.WidgetView::select(), Vispa.Gui.PortConnection.PointToPointConnection::select(), Vispa.Gui.VispaWidget.VispaWidget::select(), Vispa.Views.LineDecayView.LineDecayContainer::select(), setScope(), Vispa.Views.LineDecayView.LineDecayContainer::sizeHint(), Vispa.Views.LineDecayView.LineDecayContainer::tabController(), Vispa.Views.BoxDecayView.BoxDecayContainer::toggleCollapsed(), Vispa.Views.LineDecayView.DecayNode::unite(), Vispa.Views.PropertyView.PropertyView::valueChanged(), Vispa.Views.BoxDecayView.BoxDecayContainer::widgetByObject(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::widgetDoubleClicked(), and Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::widgetDragged().
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 301 of file DDExpandedView.cc.
References clearScope(), and parent().
Referenced by DDDefaultNumberingScheme::DDDefaultNumberingScheme(), DDQuery::exec(), goTo(), goToHistory(), and DDFilteredView::reset().
const DDRotationMatrix & DDExpandedView::rotation | ( | void | ) | const |
The absolute rotation of the current node.
Definition at line 44 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 290 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 319 of file DDExpandedView.cc.
References depth(), depth_, descend(), parent(), query::result, and scope_.
Referenced by DDQuery::exec(), 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 240 of file DDExpandedView.cc.
References query::result, and specificsV().
Referenced by DDQuery::exec().
void DDExpandedView::specificsV | ( | std::vector< const DDsvalues_type * > & | vc | ) | const |
Definition at line 249 of file DDExpandedView.cc.
References DDLogicalPart::attachedSpecifics(), geoHistory(), estimatePileup::hist, and logicalPart().
Referenced by DDSpecificsFilter::accept_impl(), DDFilteredView::specifics(), specifics(), and DDFilteredView::specificsV().
const DDTranslation & DDExpandedView::translation | ( | void | ) | const |
The absolute translation of the current node.
Definition at line 38 of file DDExpandedView.cc.
References history_.
Referenced by MagGeoBuilderFromDDD::build(), DDExpandedViewDump(), GeometryInfoDump::dumpInfo(), output(), and DDFilteredView::translation().
|
friend |
Definition at line 37 of file DDExpandedView.h.
|
protected |
depth of the scope, 0==unrestricted depth
Definition at line 135 of file DDExpandedView.h.
Referenced by clearScope(), depth(), DDFilteredView::firstChild(), firstChild(), goToHistory(), and setScope().
|
protected |
std::vector of DDExpandedNode
Definition at line 133 of file DDExpandedView.h.
Referenced by copyno(), copyNumbers(), DDExpandedView(), descend(), firstChild(), geoHistory(), goTo(), logicalPart(), navPos(), nextSibling(), parent(), rotation(), and translation().
|
protected |
Definition at line 137 of file DDExpandedView.h.
|
protected |
Definition at line 132 of file DDExpandedView.h.
Referenced by DDExpandedView().
|
protected |
scope of the expanded view
Definition at line 134 of file DDExpandedView.h.
Referenced by clearScope(), DDFilteredView::firstChild(), firstChild(), goToHistory(), nextSibling(), parent(), DDFilteredView::print(), scope(), and setScope().
|
protected |
Definition at line 131 of file DDExpandedView.h.
Referenced by DDExpandedView().
|
protected |
Definition at line 130 of file DDExpandedView.h.
Referenced by DDExpandedView().
|
protected |
|
protected |