10 #ifndef LARCOREALG_GEOMETRY_GEONODEPATH_H 11 #define LARCOREALG_GEOMETRY_GEONODEPATH_H 21 #include <initializer_list> 45 using Nodes_t = std::vector<Node_t const*>;
60 template <
typename Iter>
87 template <
typename Matrix = TGeoHMatrix>
91 operator std::string()
const;
103 template <
typename Matrix >
106 return geo::transformationFromPath<Matrix>(
fNodes.begin(),
fNodes.end());
111 #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.
decltype(auto) constexpr end(T &&obj)
ADL-aware version of std::end.
void pop()
Removes the current node from the path, moving the current one up.
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.
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.
decltype(auto) constexpr begin(T &&obj)
ADL-aware version of std::begin.
Namespace collecting geometry-related classes utilities.
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.