LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
Representation of a node and its ancestry. More...
#include "GeoNodePath.h"
Public Types | |
using | Node_t = TGeoNode const |
Type of node object. More... | |
using | Nodes_t = std::vector< Node_t const * > |
Type of list of nodes. More... | |
using | Depth_t = std::size_t |
Type used to represent the depth of the path. More... | |
Public Member Functions | |
GeoNodePath ()=default | |
Default constructor: an empty path. More... | |
GeoNodePath (std::initializer_list< TGeoNode const * > nodes) | |
Sets all the the specified nodes into the current path. More... | |
template<typename Iter > | |
GeoNodePath (Iter begin, Iter end) | |
Sets the nodes from begin to end as the path content. More... | |
bool | empty () const |
Returns whether there is a current node. More... | |
Depth_t | depth () const |
Returns the depth of the path (elements including up to the current). More... | |
Node_t const & | current () const |
Returns the current node. Undefined if the path is empty. More... | |
void | append (Node_t const &node) |
Adds a node to the current path. More... | |
void | pop () |
Removes the current node from the path, moving the current one up. More... | |
template<typename Matrix = TGeoHMatrix> | |
Matrix | currentTransformation () const |
Returns the total transformation to the current node, as a Matrix . More... | |
operator std::string () const | |
Prints the full path (as node names) into a string. More... | |
Private Attributes | |
Nodes_t | fNodes |
Local path of pointers to ROOT geometry nodes. More... | |
Representation of a node and its ancestry.
A GeoNodePath
contains a sequence of nodes, from the root()
node down to a current()
one.
It behaves like a stack
in that it inserts and removes elements at the "top", which is also what defines the current node.
Definition at line 37 of file GeoNodePath.h.
using geo::GeoNodePath::Depth_t = std::size_t |
Type used to represent the depth of the path.
Definition at line 48 of file GeoNodePath.h.
using geo::GeoNodePath::Node_t = TGeoNode const |
Type of node object.
Definition at line 42 of file GeoNodePath.h.
using geo::GeoNodePath::Nodes_t = std::vector<Node_t const*> |
Type of list of nodes.
Definition at line 45 of file GeoNodePath.h.
|
default |
Default constructor: an empty path.
|
inline |
Sets all the the specified nodes into the current path.
Definition at line 57 of file GeoNodePath.h.
|
inline |
Sets the nodes from begin
to end
as the path content.
Definition at line 61 of file GeoNodePath.h.
|
inline |
Adds a node to the current path.
Definition at line 80 of file GeoNodePath.h.
References fNodes.
Referenced by geo::ROOTGeometryNavigator::apply(), and geo::GeometryBuilderStandard::doExtractGeometryObjects().
|
inline |
Returns the current node. Undefined if the path is empty.
Definition at line 74 of file GeoNodePath.h.
References fNodes.
Referenced by geo::ROOTGeometryNavigator::apply(), geo::GeometryBuilderStandard::doExtractGeometryObjects(), geo::GeometryBuilderStandard::doMakeAuxDet(), geo::GeometryBuilderStandard::doMakeAuxDetSensitive(), geo::GeometryBuilderStandard::doMakeCryostat(), geo::GeometryBuilderStandard::doMakeOpDet(), geo::GeometryBuilderStandard::doMakePlane(), geo::GeometryBuilderStandard::doMakeTPC(), and geo::GeometryBuilderStandard::doMakeWire().
Matrix geo::GeoNodePath::currentTransformation | ( | ) | const |
Returns the total transformation to the current node, as a Matrix
.
Definition at line 104 of file GeoNodePath.h.
References fNodes.
Referenced by geo::GeometryBuilderStandard::doMakeAuxDet(), geo::GeometryBuilderStandard::doMakeAuxDetSensitive(), geo::GeometryBuilderStandard::doMakeCryostat(), geo::GeometryBuilderStandard::doMakeOpDet(), geo::GeometryBuilderStandard::doMakePlane(), geo::GeometryBuilderStandard::doMakeTPC(), geo::GeometryBuilderStandard::doMakeWire(), and pop().
|
inline |
Returns the depth of the path (elements including up to the current).
Definition at line 71 of file GeoNodePath.h.
References fNodes.
Referenced by geo::GeometryBuilderStandard::doExtractGeometryObjects().
|
inline |
Returns whether there is a current node.
Definition at line 68 of file GeoNodePath.h.
References fNodes.
geo::GeoNodePath::operator std::string | ( | ) | const |
Prints the full path (as node names) into a string.
Definition at line 16 of file GeoNodePath.cxx.
References util::end().
|
inline |
Removes the current node from the path, moving the current one up.
Definition at line 83 of file GeoNodePath.h.
References currentTransformation(), and fNodes.
Referenced by geo::ROOTGeometryNavigator::apply(), and geo::GeometryBuilderStandard::doExtractGeometryObjects().
|
private |
Local path of pointers to ROOT geometry nodes.
Definition at line 94 of file GeoNodePath.h.
Referenced by append(), current(), currentTransformation(), depth(), empty(), and pop().