![]() |
LArSoft
v10_04_05
Liquid Argon Software toolkit - https://larsoft.org/
|
Extracts of LArSoft geometry information from ROOT. More...
#include "WireReadoutGeomBuilderStandard.h"
Classes | |
struct | Config |
Public Types | |
using | Path_t = GeoNodePath |
Identification of a single node in ROOT geometry. More... | |
Public Member Functions | |
WireReadoutGeomBuilderStandard (fhicl::Table< Config > const &config) | |
WireReadoutGeomBuilderStandard (fhicl::ParameterSet const &pset) | |
Private Member Functions | |
Planes_t | doExtractPlanes (Path_t &path) const override |
PlaneGeo | makePlane (Path_t &path) const |
std::vector< WireGeo > | extractWires (Path_t &path) const |
WireGeo | makeWire (Path_t const &path) const |
Private Attributes | |
GeometryExtractor | fExtractObjects |
Cryostat information | |
Planes_t | extractPlanes (Path_t path) const |
Looks for all cryostats under the specified path. More... | |
using | Planes_t = std::map< std::size_t, std::vector< PlaneGeo >> |
Collection of wire-plane information objects. More... | |
Extracts of LArSoft geometry information from ROOT.
The builder manages several components, each devoted to the extraction of a specific type of geometry object (e.g. cryostat, or wire plane within a TPC).
This builder does not extend the interface of geo::GeometryBuilder
, but it defines a protected interface that other builder classes could override to customize single elements of the build. As long as the interface is complied to, the different components are interchangeable.
If instead a different interface is needed for one component, the parent component needs to be customised too. For example, if the signature of doExtractPlanes()
is changed, also doMakePlane()
needs to be customized to correctly call the previous. In that case, take care of deleting the inherited interface to avoid confusion and errors.
The internal structure of the builder follows the pattern already employed in the base class. The base class defines both the public interface and the implementation, but it separates the two leaving the former as non-virtual functions, and the latter as virtual functions accessible only by derived classes.
The geo::GeometryBuilderStandard
class replicates this pattern in a more hidden level. 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.
The interface of these algorithms is fixed and is part of the protected class interface, in a way mirroring geo::GeometryBuilder
in that it does not rely on virtuality, but entirely protected. The implementation is also in the protected space.
Each component type has five elements:
makeXxx()
, expected to rely on its implementation method doMakeXxx()
extractXxx()
and it logically relies on makeXxx()
, expected to rely on its implementation method doExtractXxx()
doMakeXxx()
and expected to invoke the extractYyy()
interface of all the subcomponents nested inside itdoExtractXxx()
and expected to invoke the makeYyy()
interface of all the subcomponents nested inside itThe discovery interface and the collection type of two of these components are directly part of the public interface inherited from geo::GeometryBuilder
.
Definition at line 90 of file WireReadoutGeomBuilderStandard.h.
|
inherited |
Identification of a single node in ROOT geometry.
Definition at line 41 of file WireReadoutGeometryBuilder.h.
|
inherited |
Collection of wire-plane information objects.
Definition at line 56 of file WireReadoutGeometryBuilder.h.
|
explicit |
Definition at line 37 of file WireReadoutGeomBuilderStandard.cxx.
|
explicit |
Definition at line 42 of file WireReadoutGeomBuilderStandard.cxx.
|
overrideprivatevirtual |
Implements geo::WireReadoutGeometryBuilder.
Definition at line 46 of file WireReadoutGeomBuilderStandard.cxx.
References fExtractObjects, makePlane(), and geo::GeoNodePath::parent_entry().
Looks for all cryostats under the specified path.
path | path pointing to the starting node |
The planes contain all their inner elements. The current node itself of the path is also considered as plane candidate, then it is descended into.
Definition at line 66 of file WireReadoutGeometryBuilder.h.
References geo::WireReadoutGeometryBuilder::doExtractPlanes().
|
private |
Definition at line 64 of file WireReadoutGeomBuilderStandard.cxx.
References fExtractObjects, and makeWire().
Referenced by makePlane().
|
private |
Definition at line 58 of file WireReadoutGeomBuilderStandard.cxx.
References geo::GeoNodePath::current(), geo::GeoNodePath::currentTransformation(), and extractWires().
Referenced by doExtractPlanes().
|
private |
Definition at line 73 of file WireReadoutGeomBuilderStandard.cxx.
References geo::GeoNodePath::current(), and geo::GeoNodePath::currentTransformation().
Referenced by extractWires().
|
private |
Definition at line 99 of file WireReadoutGeomBuilderStandard.h.
Referenced by doExtractPlanes(), and extractWires().