LArSoft
v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
|
The geometry of one entire detector, as served by art. More...
#include "AuxDetGeometry.h"
Public Member Functions | |
AuxDetGeometry (fhicl::ParameterSet const &pset, art::ActivityRegistry ®) | |
void | preBeginRun (art::Run const &run) |
Updates the geometry if needed at the beginning of each new run. More... | |
AuxDetGeometryCore const & | GetProvider () const |
Returns a constant reference to the service provider. More... | |
AuxDetGeometryCore const * | GetProviderPtr () const |
Returns a constant pointer to the service provider. More... | |
Private Member Functions | |
void | LoadNewGeometry (std::string gdmlfile, std::string rootfile) |
Expands the provided paths and loads the geometry description(s) More... | |
void | InitializeChannelMap () |
AuxDetGeometryCore & | GetProvider () |
Returns a reference to the service provider. More... | |
AuxDetGeometryCore * | GetProviderPtr () |
Returns a pointer to the service provider. More... | |
Private Attributes | |
AuxDetGeometryCore | fProvider |
the actual service provider More... | |
std::string | fRelPath |
bool | fForceUseFCLOnly |
fhicl::ParameterSet | fSortingParameters |
Parameter set to define the channel map sorting. More... | |
The geometry of one entire detector, as served by art.
This class extends the interface of the geometry service provider, GeometryCore, to the one of an art service. It handles the correct initialization of the provider using information
It relies on geo::ExptGeoHelperInterface service to obtain the channel mapping algorithm proper for the selected geometry.
The geometry initialization happens immediately on construction. Optionally, the geometry is automatically reinitialized on each run based on the information contained in the art::Run object.
In addition to the parameters documented in geo::GeometryCore, the following parameters are supported:
RelativePath
path and the base name specified in GDML
parameter; this path is searched for in the directories configured in the FW_SEARCH_PATH
environment variable;GDML
parameter, whose value is used instead; this path is assembled in the same way as the one for GDML
parameter, except that no alternative (wireless) geometry is used even if DisableWiresInG4
is specified (see below); this file is used to load the geometry used in the internal simulation and reconstruction, basically everywhere except for the Geant4 simulationForceUseFCLOnly
is set to true
, this mechanism is disabled and the geometry is just loaded at the beginning of the job from the information in the job configuration, once and for all.GDML
parameter is also served to ROOT for the internal geometry representation. Definition at line 97 of file AuxDetGeometry.h.
geo::AuxDetGeometry::AuxDetGeometry | ( | fhicl::ParameterSet const & | pset, |
art::ActivityRegistry & | reg | ||
) |
Definition at line 31 of file AuxDetGeometry_service.cc.
References fRelPath, fhicl::ParameterSet::get(), LoadNewGeometry(), preBeginRun(), and art::ActivityRegistry::sPreBeginRun.
|
inline |
Returns a constant reference to the service provider.
Definition at line 107 of file AuxDetGeometry.h.
References fProvider.
Referenced by GetProviderPtr(), InitializeChannelMap(), LoadNewGeometry(), and preBeginRun().
|
inlineprivate |
Returns a reference to the service provider.
Definition at line 120 of file AuxDetGeometry.h.
References fProvider.
|
inline |
Returns a constant pointer to the service provider.
Definition at line 110 of file AuxDetGeometry.h.
References GetProvider(), InitializeChannelMap(), and LoadNewGeometry().
Referenced by InitializeChannelMap().
|
inlineprivate |
Returns a pointer to the service provider.
Definition at line 123 of file AuxDetGeometry.h.
References GetProvider().
|
private |
Definition at line 94 of file AuxDetGeometry_service.cc.
References fSortingParameters, GetProvider(), GetProviderPtr(), and geo::AuxDetGeometryCore::hasAuxDetChannelMap().
Referenced by GetProviderPtr(), and LoadNewGeometry().
|
private |
Expands the provided paths and loads the geometry description(s)
Definition at line 107 of file AuxDetGeometry_service.cc.
References DEFINE_ART_SERVICE, fRelPath, GetProvider(), InitializeChannelMap(), and geo::AuxDetGeometryCore::LoadGeometryFile().
Referenced by AuxDetGeometry(), GetProviderPtr(), and preBeginRun().
void geo::AuxDetGeometry::preBeginRun | ( | art::Run const & | run | ) |
Updates the geometry if needed at the beginning of each new run.
Definition at line 58 of file AuxDetGeometry_service.cc.
References fForceUseFCLOnly, art::DataViewImpl::getManyByType(), GetProvider(), and LoadNewGeometry().
Referenced by AuxDetGeometry().
|
private |
Force Geometry to only use the geometry files specified in the fcl file
Definition at line 130 of file AuxDetGeometry.h.
Referenced by preBeginRun().
|
private |
the actual service provider
Definition at line 126 of file AuxDetGeometry.h.
Referenced by GetProvider().
|
private |
Relative path added to FW_SEARCH_PATH to search for geometry file
Definition at line 128 of file AuxDetGeometry.h.
Referenced by AuxDetGeometry(), and LoadNewGeometry().
|
private |
Parameter set to define the channel map sorting.
Definition at line 132 of file AuxDetGeometry.h.
Referenced by InitializeChannelMap().