![]() |
LArSoft
v10_04_05
Liquid Argon Software toolkit - https://larsoft.org/
|
Object for extracting geometry objects from the GDML file. More...
#include "GeometryExtractor.h"
Classes | |
struct | Config |
Public Member Functions | |
GeometryExtractor (Config const &config) | |
template<typename FT > | |
void | operator() (Path_t &path, std::function< bool(TGeoNode const &)> IsObj, FT captureObject) const |
Boilerplate implementation of geometry-extraction methods. More... | |
Private Types | |
using | Path_t = GeoNodePath |
Private Attributes | |
Path_t::Depth_t | fMaxDepth |
Maximum level to descend into in the path. More... | |
Object for extracting geometry objects from the GDML file.
The general flow of the algorithm is a top-down crawl of the geometry tree structure, where the top objects (cryostats and auxiliary detectors) are discovered and built, and each of these objects takes care of discovering its own relevant components. Therefore e.g. the cryostat algorithm will, once found a candidate cryostat, descend into it to discover TPCs and optical detectors. This nested discovery is delegated to other algorithms, and e.g. the TPC algorithm will take care of creating a TPC and populating it with wire planes whose discovery is again delegated to another algorithm.
Definition at line 39 of file GeometryExtractor.h.
|
private |
Definition at line 40 of file GeometryExtractor.h.
|
inlineexplicit |
Definition at line 51 of file GeometryExtractor.h.
References geo::GeometryExtractor::Config::maxDepth, and operator()().
void geo::GeometryExtractor::operator() | ( | Path_t & | path, |
std::function< bool(TGeoNode const &)> | IsObj, | ||
FT | captureObject | ||
) | const |
Boilerplate implementation of geometry-extraction methods.
ObjGeo | the geometry object being extracted (e.g. geo::WireGeo ) |
path | the path to the node describing the object |
IsObj | function to identify if a node is of the right type |
captureObject | callable object invoked to create the target object from a path |
This implementation first evaluates if the current node in the specified path is suitable to create a ObjGeo
; if not, then it descends into the node daughters and recursively to their descendents. For each candidate node, a ObjGeo
is created. All descendents of the candidates are ignored.
path
is allowed to change during processing. Definition at line 83 of file GeometryExtractor.h.
References geo::GeoNodePath::append(), geo::GeoNodePath::current(), geo::GeoNodePath::depth(), fMaxDepth, n, and geo::GeoNodePath::pop().
Referenced by GeometryExtractor().
|
private |
Maximum level to descend into in the path.
Definition at line 77 of file GeometryExtractor.h.
Referenced by operator()().