type of data representation of DDCompactView More...
#include <DDCompactView.h>
Public Types | |
typedef ::graph< DDLogicalPart, DDPosData * > | graph_type |
not used More... | |
typedef std::vector < DDLogicalPart > | logchild_type |
container-type of children of a given node in the compact-view More... | |
typedef std::pair < DDLogicalPart, DDPosData * > | pos_type |
pair ... More... | |
typedef std::vector< std::pair < DDLogicalPart, DDPosData * > > | poschildren_type |
container-type of pairs of children nodes and their relative position data of a given node in the compact-view More... | |
typedef graphwalker < DDLogicalPart, DDPosData * > | walker_type |
not used More... | |
Public Member Functions | |
DDCompactView () | |
Creates a compact-view. More... | |
DDCompactView (const DDLogicalPart &rootnodedata) | |
EXPERIMENTAL! Creates a compact-view using a different root of the geometrical hierarchy More... | |
const graph_type & | graph () const |
Provides read-only access to the data structure of the compact-view. More... | |
void | lockdown () |
void | position (const DDLogicalPart &self, const DDLogicalPart &parent, std::string copyno, const DDTranslation &trans, const DDRotation &rot, const DDDivision *div=NULL) |
void | position (const DDLogicalPart &self, const DDLogicalPart &parent, int copyno, const DDTranslation &trans, const DDRotation &rot, const DDDivision *div=NULL) |
const DDLogicalPart & | root () const |
returns the DDLogicalPart representing the root of the geometrical hierarchy More... | |
void | setRoot (const DDLogicalPart &root) |
don't use : interface not stable .... More... | |
void | swap (DDCompactView &) |
walker_type | walker () const |
dont't use ! Proper implementation missing ... More... | |
double | weight (const DDLogicalPart &p) const |
Prototype version of calculating the weight of a detector component. More... | |
const DDPosData * | worldPosition () const |
The absolute position of the world. More... | |
graph_type & | writeableGraph () |
~DDCompactView () | |
Private Attributes | |
DDI::Store< DDName, DDI::LogicalPart * > | lpStore_ |
DDI::Store< DDName, DDI::Material * > | matStore_ |
std::unique_ptr < DDCompactViewImpl > | rep_ |
DDI::Store< DDName, DDRotationMatrix * > | rotStore_ |
DDI::Store< DDName, DDI::Solid * > | solidStore_ |
DDI::Store< DDName, DDI::Specific * > | specStore_ |
std::unique_ptr< DDPosData > | worldpos_ |
type of data representation of DDCompactView
Navigation through the compact view of the detector ...
Updated: Michael Case [ MEC ] 2010-02-11Compact representation of the geometrical detector hierarchy A DDCompactView represents the detector as an acyclic directed multigraph. The nodes are instances of DDLogicalPart while the edges are pointers to DDPosData. Edges are directed from parent-node to child-node. Edges represented by DDPosData are the relative translation and rotation accompanied by a copy-number of the child-node towards the parent-node.
One node is explicitly marked as the root node. It is the DDLogicalPart which defines the base coordinate system for the detector. All subdetectors are directly or inderectly positioned inside the root-node.
Example:
The figureshows a compact-view graph consisting of 16 DDLogicalParts interconnected by 20 edges represented by pointers to DDPosData.
The compact-view also serves as base for calculating nodes in the expanded view. Paths through the compact-view can be viewed as nodes in the expanded-view (expansion of an acyclic directed multigraph into a tree). In the figure there are 5 different paths from CMS to Module2 (e.g. CMS-Pos1->Ecal-Pos4->EEndcap-Pos21->Module2) thus there will be 5 nodes of Module2 in the expanded view.
MEC: There has been a re-purposing of the DDCompactView to not only hold the representation described above (in detail this is the DDCompactViewImpl) but also own the memory of the stores refered to by the graph.
DDCompactView now owns the DDMaterial, DDSpecific, DDLogicalPart, DDRotation, DDSolid and etc. Removal of the global one-and-only stores, methods and details such as DDRoot will mean that all of these will be accessed via the DDCompactView.
Definition at line 76 of file DDCompactView.h.
typedef ::graph<DDLogicalPart,DDPosData*> DDCompactView::graph_type |
not used
type of representation of the compact-view (acyclic directed multigraph) Nodes are instances of DDLogicalPart, edges are pointers to instances of DDPosData
Definition at line 98 of file DDCompactView.h.
typedef std::vector<DDLogicalPart> DDCompactView::logchild_type |
container-type of children of a given node in the compact-view
Definition at line 81 of file DDCompactView.h.
typedef std::pair<DDLogicalPart,DDPosData*> DDCompactView::pos_type |
pair ...
Definition at line 87 of file DDCompactView.h.
typedef std::vector< std::pair<DDLogicalPart,DDPosData*> > DDCompactView::poschildren_type |
container-type of pairs of children nodes and their relative position data of a given node in the compact-view
Definition at line 84 of file DDCompactView.h.
not used
Definition at line 91 of file DDCompactView.h.
|
explicit |
Creates a compact-view.
Definition at line 138 of file DDCompactView.cc.
|
explicit |
EXPERIMENTAL! Creates a compact-view using a different root of the geometrical hierarchy
Compact-views can be created only after an appropriate geometrical hierarchy has been defined using DDpos().
Further it is assumed that the DDLogicalPart defining the root of the geometrical hierarchy has been defined using DDRootDef - singleton. It will be extracted from this singleton using DDRootDef::instance().root()!
The first time this constructor gets called, the internal graph representation is build up. Subsequent calls will return immidiately providing access to the already built up compact-view representation.
Currently the only usefull methods are DDCompactView::graph(), DDCompactView::root() !
Definition at line 33 of file DDCompactView.cc.
References DDI::Singleton< I >::instance().
DDCompactView::~DDCompactView | ( | ) |
Definition at line 47 of file DDCompactView.cc.
const DDCompactView::graph_type & DDCompactView::graph | ( | ) | const |
Provides read-only access to the data structure of the compact-view.
The compact-view is kept in an acyclic directed multigraph represented by an instance of class Graph<DDLogicalPart, DDPosData*). Graph provides methods for navigating its content.
Definition at line 55 of file DDCompactView.cc.
References rep_.
Referenced by cuy.FindIssue::__init__(), SolidsForOnline::beginRun(), DDG4Builder::BuildGeometry(), DDCheckAll(), DDCheckConnect(), ddstats(), GeometryInfoDump::dumpInfo(), DDErrorDetection::lp_cpv(), DDCompareCPV::operator()(), DDStreamer::pos_read(), and DDStreamer::pos_write().
void DDCompactView::lockdown | ( | ) |
Definition at line 143 of file DDCompactView.cc.
References DDI::Singleton< I >::instance(), lpStore_, matStore_, rotStore_, solidStore_, and specStore_.
void DDCompactView::position | ( | const DDLogicalPart & | self, |
const DDLogicalPart & | parent, | ||
std::string | copyno, | ||
const DDTranslation & | trans, | ||
const DDRotation & | rot, | ||
const DDDivision * | div = NULL |
||
) |
Definition at line 104 of file DDCompactView.cc.
Referenced by DDHCalBarrelAlgo::constructGeneralVolume(), DDHCalEndcapAlgo::constructGeneralVolume(), DDHCalBarrelAlgo::constructInsideDetectors(), DDHCalBarrelAlgo::constructInsideLayers(), DDHCalEndcapModuleAlgo::constructInsideModule(), DDHCalEndcapAlgo::constructInsideModule(), DDHCalEndcapModuleAlgo::constructInsideModule0(), DDHCalEndcapAlgo::constructInsideModule0(), DDHCalBarrelAlgo::constructInsideSector(), DDHCalEndcapAlgo::constructInsideSector(), DDHCalBarrelAlgo::constructMidLayer(), DDHCalEndcapModuleAlgo::constructScintLayer(), DDHCalEndcapAlgo::constructScintLayer(), DDHCalBarrelAlgo::constructSideLayer(), DDEcalPreshowerAlgo::doLadders(), DDEcalPreshowerAlgoTB::doLayers(), DDEcalPreshowerAlgo::doLayers(), DDTECModuleAlgo::doPos(), DDEcalPreshowerAlgoTB::doSens(), DDEcalPreshowerAlgo::doSens(), DDEcalPreshowerAlgoTB::doWedges(), DDEcalEndcapAlgo::EECreateSC(), DDEcalEndcapAlgo::EEPositionCRs(), DDLinear::execute(), DDAngular::execute(), DDTIDModulePosAlgo::execute(), DDTIDModuleAlgo::execute(), DDPixBarTPGStackLayerAlgo::execute(), DDTOBAxCableAlgo::execute(), DDPixBarStackLinear::execute(), DDPixBarStackLinearGap::execute(), DDTrackerLinear::execute(), DDBHMAngular::execute(), DDHCalForwardAlgo::execute(), DDTrackerXYZPosAlgo::execute(), DDGEMAngular::execute(), DDHCalTBCableAlgo::execute(), DDPixBarLayerUpgradeAlgoCoverage::execute(), DDHCalTBZposAlgo::execute(), DDHCalAngular::execute(), DDTOBRadCableAlgo::execute(), DDHCalTestBeamAlgo::execute(), DDPixBarStackTrigLayerAlgo::execute(), DDHCalXtalAlgo::execute(), DDTrackerLinearXY::execute(), DDTOBRodAlgo::execute(), DDTIBLayerAlgo_MTCC::execute(), DDTIBRadCableAlgo_MTCC::execute(), DDMuonAngular::execute(), DDPixBarLayerAlgo::execute(), DDPixBarLayerUpgradeAlgo::execute(), DDPixFwdDiskAlgo::execute(), DDTrackerZPosAlgo::execute(), DDTECCoolAlgo::execute(), DDTECOptoHybAlgo::execute(), DDPixBarStackLayerAlgo::execute(), DDTIBLayerAlgo::execute(), DDTECAxialCableAlgo::execute(), DDTECPhiAlgo::execute(), DDHCalLinearXY::execute(), DDTrackerPhiAltAlgo::execute(), DDTrackerPhiAlgo::execute(), DDTrackerAngularV1::execute(), DDTIDAxialCableAlgo::execute(), DDTrackerAngular::execute(), DDTIDRingAlgo::execute(), DDHCalFibreBundle::execute(), DDTECPhiAltAlgo::execute(), DDTECModuleAlgo::execute(), DDEcalAPDAlgo::execute(), DDTBH4Algo::execute(), DDDividedGeometryObject::execute(), DDEcalBarrelNewAlgo::execute(), DDEcalBarrelAlgo::execute(), DDEcalEndcapAlgo::execute(), DDPixFwdBlades::execute(), DDStreamer::pos_read(), DDLPosPart::processElement(), regressionTest_first(), DDEcalBarrelAlgo::web(), and DDEcalBarrelNewAlgo::web().
void DDCompactView::position | ( | const DDLogicalPart & | self, |
const DDLogicalPart & | parent, | ||
int | copyno, | ||
const DDTranslation & | trans, | ||
const DDRotation & | rot, | ||
const DDDivision * | div = NULL |
||
) |
const DDLogicalPart & DDCompactView::root | ( | ) | const |
returns the DDLogicalPart representing the root of the geometrical hierarchy
Definition at line 65 of file DDCompactView.cc.
References rep_.
Referenced by DDG4Builder::BuildGeometry(), and DDCheckConnect().
void DDCompactView::setRoot | ( | const DDLogicalPart & | root | ) |
don't use : interface not stable ....
Definition at line 129 of file DDCompactView.cc.
References rep_.
Referenced by DDLSAX2ConfigHandler::startElement().
void DDCompactView::swap | ( | DDCompactView & | repToSwap | ) |
DDCompactView::walker_type DDCompactView::walker | ( | ) | const |
dont't use ! Proper implementation missing ...
Definition at line 75 of file DDCompactView.cc.
References rep_.
Referenced by DDCheckConnect().
double DDCompactView::weight | ( | const DDLogicalPart & | p | ) | const |
Prototype version of calculating the weight of a detector component.
Example:
The weight of all children is calculated as well.
Definition at line 99 of file DDCompactView.cc.
References rep_.
Referenced by cuy.ValElement::__init__(), cuy.additionElement::__init__(), cuy.superimposeElement::__init__(), and cuy.graphElement::__init__().
const DDPosData * DDCompactView::worldPosition | ( | ) | const |
The absolute position of the world.
Definition at line 70 of file DDCompactView.cc.
References worldpos_.
DDCompactView::graph_type & DDCompactView::writeableGraph | ( | ) |
Definition at line 60 of file DDCompactView.cc.
References rep_.
|
private |
Definition at line 162 of file DDCompactView.h.
Referenced by lockdown().
|
private |
Definition at line 160 of file DDCompactView.h.
Referenced by lockdown().
|
private |
Definition at line 155 of file DDCompactView.h.
Referenced by graph(), position(), root(), setRoot(), swap(), walker(), weight(), and writeableGraph().
|
private |
Definition at line 164 of file DDCompactView.h.
Referenced by lockdown().
|
private |
Definition at line 161 of file DDCompactView.h.
Referenced by lockdown().
|
private |
Definition at line 163 of file DDCompactView.h.
Referenced by lockdown().
|
private |
Definition at line 156 of file DDCompactView.h.
Referenced by worldPosition().