10 #ifndef LARCOREALG_GEOMETRY_GEONODEPATH_H
11 #define LARCOREALG_GEOMETRY_GEONODEPATH_H
22 #include <initializer_list>
47 using Nodes_t = std::vector<Node_t const*>;
64 template <
typename Iter>
93 template <
typename Matrix = TGeoHMatrix>
97 operator std::string()
const;
113 template <
typename Matrix >
115 return geo::transformationFromPath<Matrix>(
fNodes.begin(),
fNodes.end());
122 #endif // LARCOREALG_GEOMETRY_GEONODEPATH_H
Nodes_t fNodes
Local path of pointers to ROOT geometry nodes.
bool empty() const
Returns whether there is a current node.
GeoNodePath()=default
Default constructor: an empty path.
GeoNodePath(std::initializer_list< TGeoNode const * > nodes)
Sets all the the specified nodes into the current path.
void append(Node_t const &node)
Adds a node to the current path.
void pop()
Removes the current node from the path, moving the current one up.
auto end(FixedBins< T, C > const &) noexcept
Matrix currentTransformation() const
Returns the total transformation to the current node, as a Matrix.
GeoNodePath(Iter begin, Iter end)
Sets the nodes from begin to end as the path content.
auto begin(FixedBins< T, C > const &) noexcept
std::size_t Depth_t
Type used to represent the depth of the path.
Representation of a node and its ancestry.
Node_t const & current() const
Returns the current node. Undefined if the path is empty.
Depth_t depth() const
Returns the depth of the path (elements including up to the current).
TGeoNode const Node_t
Type of node object.
std::vector< Node_t const * > Nodes_t
Type of list of nodes.