DD4hep
1.30.0
Detector Description Toolkit for High Energy Physics
|
The base class for all dd4hep geometry crawlers. More...
#include <GeoHandler.h>
Public Member Functions | |
GeoHandler () | |
Default constructor. More... | |
GeoHandler (std::map< int, std::vector< const TGeoNode * > > *ptr, std::map< int, std::set< const TGeoNode * > > *ptr_set, std::map< const TGeoNode *, std::vector< TGeoNode * > > *daus=nullptr) | |
Initializing constructor. More... | |
virtual | ~GeoHandler () |
Default destructor. More... | |
bool | setPropagateRegions (bool value) |
Propagate regions. Returns the previous value. More... | |
GeoHandler & | collect (DetElement top) |
Collect geometry information from traversal. More... | |
GeoHandler & | collect (DetElement top, GeometryInfo &info) |
Collect geometry information from traversal with aggregated information. More... | |
std::map< int, std::vector< const TGeoNode * > > * | release () |
Access to collected node list. More... | |
Protected Member Functions | |
GeoHandler & | i_collect (const TGeoNode *parent, const TGeoNode *node, int level, Region rg, LimitSet ls) |
Internal helper to collect geometry information from traversal. More... | |
Protected Attributes | |
bool | m_propagateRegions { false } |
std::map< int, std::vector< const TGeoNode * > > * | m_data { nullptr } |
actual container with std::vector (preserves order) More... | |
std::map< int, std::set< const TGeoNode * > > * | m_set_data { nullptr } |
redundant container with std::set (for lookup purpose) More... | |
std::map< const TGeoNode *, std::vector< TGeoNode * > > * | m_daughters { nullptr } |
Private Member Functions | |
GeoHandler (const GeoHandler &) | |
Never call Copy constructor. More... | |
GeoHandler & | operator= (const GeoHandler &) |
Never call assignment operator. More... | |
The base class for all dd4hep geometry crawlers.
Geometry crawlers are used for multiple purposes, whenever entire geometries must be traversed like e.g. to create a new geometry for simulation etc. While analysing the geometry, information is collected, which may be later processed.
Definition at line 87 of file GeoHandler.h.
|
inlineprivate |
Never call Copy constructor.
Definition at line 105 of file GeoHandler.h.
detail::GeoHandler::GeoHandler | ( | ) |
Default constructor.
Definition at line 56 of file GeoHandler.cpp.
detail::GeoHandler::GeoHandler | ( | std::map< int, std::vector< const TGeoNode * > > * | ptr, |
std::map< int, std::set< const TGeoNode * > > * | ptr_set, | ||
std::map< const TGeoNode *, std::vector< TGeoNode * > > * | daus = nullptr |
||
) |
Initializing constructor.
Definition at line 62 of file GeoHandler.cpp.
|
virtual |
Default destructor.
Definition at line 70 of file GeoHandler.cpp.
detail::GeoHandler & detail::GeoHandler::collect | ( | DetElement | top | ) |
Collect geometry information from traversal.
Definition at line 101 of file GeoHandler.cpp.
detail::GeoHandler & detail::GeoHandler::collect | ( | DetElement | top, |
GeometryInfo & | info | ||
) |
Collect geometry information from traversal with aggregated information.
Definition at line 109 of file GeoHandler.cpp.
|
protected |
Internal helper to collect geometry information from traversal.
Collect the hierarchy of placements perform lookup using std::set::emplace (faster than std::find for very large number of volumes)
Now collect all the daughters of this volume, so that we can reconnect them in the correct order
Definition at line 148 of file GeoHandler.cpp.
|
inlineprivate |
Never call assignment operator.
Definition at line 108 of file GeoHandler.h.
std::map< int, std::vector< const TGeoNode * > > * detail::GeoHandler::release | ( | ) |
Access to collected node list.
release the std::vector geometry container (preserves order)
the std::set container (for lookup purpose) is not needed anymore, so delete it the container is always present since the call of the constructor we never expect to call release() twice (will release nullptr)
Definition at line 80 of file GeoHandler.cpp.
bool detail::GeoHandler::setPropagateRegions | ( | bool | value | ) |
Propagate regions. Returns the previous value.
Definition at line 95 of file GeoHandler.cpp.
|
protected |
actual container with std::vector (preserves order)
Definition at line 93 of file GeoHandler.h.
|
protected |
Definition at line 97 of file GeoHandler.h.
|
protected |
Definition at line 90 of file GeoHandler.h.
|
protected |
redundant container with std::set (for lookup purpose)
Definition at line 95 of file GeoHandler.h.