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 (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_ |
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 49 of file DDExpandedView.h.
typedef std::pair<int const *, size_t> DDExpandedView::NavRange |
Definition at line 50 of file DDExpandedView.h.
Definition at line 46 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 21 of file DDExpandedView.cc.
References history_, rot_, trans_, w2_, walker_, and worldpos_.
|
virtual |
Definition at line 44 of file DDExpandedView.cc.
void DDExpandedView::clearScope | ( | ) |
clears the scope; the full tree is available, depth=0
Definition at line 309 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 76 of file DDExpandedView.cc.
References history_.
Referenced by DDFilteredView::copyno(), DDCompareEPV(), DDExpandedViewDump(), DDI::Specific::node(), MTDGeometricTimingDetExtraESModule::putOne(), TrackerGeometricDetExtraESModule::putOne(), GeometricDet::~GeometricDet(), and GeometricTimingDet::~GeometricTimingDet().
DDExpandedView::nav_type DDExpandedView::copyNumbers | ( | ) | const |
return the stack of copy numbers
Definition at line 489 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 70 of file DDExpandedView.cc.
References depth_.
Referenced by DDCompareEPV(), and setScope().
|
protected |
Definition at line 394 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 131 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(), next(), and DDI::Specific::node().
const DDGeoHistory & DDExpandedView::geoHistory | ( | ) | const |
The list of ancestors up to the root-node of the current node.
Definition at line 64 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(), TrackerGeometricDetExtraESModule::putOne(), MTDGeometricTimingDetExtraESModule::putOne(), DDFilteredView::reset(), specificsV(), GeometricDet::~GeometricDet(), and GeometricTimingDet::~GeometricTimingDet().
bool DDExpandedView::goTo | ( | const nav_type & | newpos | ) |
transversed the DDExpandedView according to the given stack of sibling numbers
Definition at line 437 of file DDExpandedView.cc.
Referenced by goTo(), MTDGeometricTimingDetExtraESModule::produce(), TrackerGeometricDetExtraESModule::produce(), GeometricDet::~GeometricDet(), and GeometricTimingDet::~GeometricTimingDet().
bool DDExpandedView::goTo | ( | NavRange | newpos | ) |
Definition at line 442 of file DDExpandedView.cc.
References goTo().
bool DDExpandedView::goTo | ( | int const * | newpos, |
size_t | sz | ||
) |
Definition at line 446 of file DDExpandedView.cc.
References firstChild(), goToHistory(), history_, mps_fire::i, gen::k, nextSibling(), reset(), and mps_fire::result.
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 361 of file DDExpandedView.cc.
References depth_, firstChild(), mps_fire::i, 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 46 of file DDExpandedView.cc.
References history_.
Referenced by DDSpecificsHasNamedValueFilter::accept(), DDSpecificsMatchesValueFilter::accept(), DDSpecificsFilter::accept_impl(), MagGeoBuilderFromDDD::build(), DDCompareEPV(), DDExpandedViewDump(), GeometryInfoDump::dumpInfo(), DDFilteredView::logicalPart(), mergedSpecificsV(), DDI::Specific::node(), output(), MTDGeometricTimingDetExtraESModule::putOne(), TrackerGeometricDetExtraESModule::putOne(), specificsV(), MagGeoBuilderFromDDD::volumeHandle::volumeHandle(), GeometricDet::~GeometricDet(), and GeometricTimingDet::~GeometricTimingDet().
DDsvalues_type DDExpandedView::mergedSpecifics | ( | ) | const |
Definition at line 280 of file DDExpandedView.cc.
References mergedSpecificsV().
void DDExpandedView::mergedSpecificsV | ( | DDsvalues_type & | res | ) | const |
Definition at line 286 of file DDExpandedView.cc.
References DDLogicalPart::attachedSpecifics(), geoHistory(), create_public_lumi_plots::hist, logicalPart(), MatrixUtil::merge(), and SiPixelPhase1DigisV_cfi::specs.
Referenced by 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 477 of file DDExpandedView.cc.
References history_, and mps_fire::i.
Referenced by GeometryInfoDump::dumpInfo(), DDFilteredView::navPos(), GeometricDet::~GeometricDet(), and GeometricTimingDet::~GeometricTimingDet().
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 209 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 86 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(), DDFilteredView::nextSibling(), and DDI::Specific::node().
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 171 of file DDExpandedView.cc.
References history_, mps_fire::result, and scope_.
Referenced by 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(), DDCompareEPV(), 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(), 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 315 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 58 of file DDExpandedView.cc.
References history_.
Referenced by MagGeoBuilderFromDDD::build(), DDExpandedViewDump(), GeometryInfoDump::dumpInfo(), output(), MagGeoBuilderFromDDD::volumeHandle::referencePlane(), DDFilteredView::rotation(), GeometricDet::~GeometricDet(), and GeometricTimingDet::~GeometricTimingDet().
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 304 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 333 of file DDExpandedView.cc.
References depth(), depth_, descend(), parent(), mps_fire::result, SimDataFormats::CaloAnalysis::sc, 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 254 of file DDExpandedView.cc.
References mps_fire::result, and specificsV().
void DDExpandedView::specificsV | ( | std::vector< const DDsvalues_type * > & | vc | ) | const |
Definition at line 263 of file DDExpandedView.cc.
References DDLogicalPart::attachedSpecifics(), geoHistory(), create_public_lumi_plots::hist, logicalPart(), and SiPixelPhase1DigisV_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 52 of file DDExpandedView.cc.
References history_.
Referenced by MagGeoBuilderFromDDD::build(), DDExpandedViewDump(), GeometryInfoDump::dumpInfo(), output(), DDFilteredView::translation(), GeometricDet::~GeometricDet(), and GeometricTimingDet::~GeometricTimingDet().
|
friend |
Definition at line 43 of file DDExpandedView.h.
|
protected |
depth of the scope, 0==unrestricted depth
Definition at line 138 of file DDExpandedView.h.
Referenced by clearScope(), depth(), DDFilteredView::firstChild(), firstChild(), goToHistory(), and setScope().
|
protected |
std::vector of DDExpandedNode
Definition at line 136 of file DDExpandedView.h.
Referenced by copyno(), copyNumbers(), DDExpandedView(), descend(), firstChild(), geoHistory(), goTo(), logicalPart(), navPos(), nextSibling(), parent(), rotation(), and translation().
|
protected |
Definition at line 140 of file DDExpandedView.h.
|
protected |
Definition at line 135 of file DDExpandedView.h.
Referenced by DDExpandedView().
|
protected |
scope of the expanded view
Definition at line 137 of file DDExpandedView.h.
Referenced by clearScope(), DDFilteredView::firstChild(), firstChild(), goToHistory(), nextSibling(), parent(), DDFilteredView::print(), scope(), and setScope().
|
protected |
Definition at line 134 of file DDExpandedView.h.
Referenced by DDExpandedView().
|
protected |
Definition at line 133 of file DDExpandedView.h.
Referenced by DDExpandedView().
|
protected |
|
protected |