8 #ifndef LARCOREALG_GEOMETRY_GEOMETRYEXTRACTOR_H 9 #define LARCOREALG_GEOMETRY_GEOMETRYEXTRACTOR_H 46 fhicl::Comment(
"maximum number of level of the geometry structure to descend"),
47 std::numeric_limits<Path_t::Depth_t>::max()
70 template <
typename FT>
72 std::function<
bool(TGeoNode
const&)> IsObj,
73 FT captureObject)
const;
82 template <
typename FT>
84 std::function<
bool(TGeoNode
const&)>
const IsObj,
85 FT captureObject)
const 87 TGeoNode
const* current = path.
current();
88 if (IsObj(*current)) {
96 int const n = current->GetNdaughters();
97 for (
int i = 0; i <
n; ++i) {
98 path.
append(current->GetDaughter(i));
106 #endif // LARCOREALG_GEOMETRY_GEOMETRYEXTRACTOR_H Depth_t depth() const
Returns the depth of the path (elements including up to the current).
TGeoNode const * current() const
Returns the current node. Undefined if the path is empty.
Class representing a path in ROOT geometry.
void pop()
Removes the current node from the path, moving the current one up.
std::size_t Depth_t
Type used to represent the depth of the path.
void append(TGeoNode const *node)
Adds a node to the current path.
Representation of a node and its ancestry.