![]() |
LArSoft
v10_04_05
Liquid Argon Software toolkit - https://larsoft.org/
|
Writes geometry configuration information into art runs. More...
Classes | |
struct | Config |
Service configuration. More... | |
Public Types | |
using | Parameters = art::ServiceTable< Config > |
Public Member Functions | |
GeometryConfigurationWriter (Parameters const &) | |
void | setModuleDescription (ModuleDescription const &) |
void | registerCallbacks (ProducingServiceSignals &) |
void | doPostReadRun (RunPrincipal &) |
void | doPostReadSubRun (SubRunPrincipal &) |
void | doPostReadEvent (EventPrincipal &) |
Static Public Attributes | |
static constexpr bool | service_handle_allowed {false} |
Private Types | |
using | InfoPtr_t = std::unique_ptr< sumdata::GeometryConfigurationInfo > |
Alias for the pointer to the data product object to be put into the run. More... | |
Private Member Functions | |
void | postReadRun (art::Run &run) override |
Writes the information from the service configuration into the run . More... | |
InfoPtr_t | previousInfo (art::Run const &run) const |
Loads the geometry information from the run (either directly or legacy). More... | |
void | verifyConsistentConfigs (sumdata::GeometryConfigurationInfo const &A, sumdata::GeometryConfigurationInfo const &B, art::RunID const &id) const |
InfoPtr_t | readGeometryInformation (art::Run const &run) const |
Reads geometry information from the run (returns null pointer if none). More... | |
InfoPtr_t | makeInfoFromRunData (art::Run const &run) const |
sumdata::RunData const * | readRunData (art::Run const &run) const |
Returns a pointer to the sumdata::RunData in run (nullptr if none). More... | |
Static Private Member Functions | |
static InfoPtr_t | extractInfoFromGeometry () |
Creates configuration information based on the current Geometry service. More... | |
Private Attributes | |
bool | fFatalConfCheck |
Writes geometry configuration information into art runs.
If included in the configuration, the version of the geometry is checked after each run is read from the input source.
The compatibility check is currently very silly, but it can improved in future versions. This check is the same as the legacy check, that verifies that the configured detector name (geo::GeometryCore::DetectorName()
) has not changed.
false
): if set to true
, failure of configuration consistency check described below is not fatal and it will just produce a warning on each failure;The configuration check is described in the documentation of geo::Geometry
service.
The service guarantees that configuration information of type sumdata::GeometryConfigurationInfo
is present into the run, accessible with an input tag GeometryConfigurationWriter
:
sumdata::RunData
data product, a reduced version of the configuration information is created from the information in that data product (the first one, if multiple are present)sumdata::GeometryConfigurationInfo
form nor in the legacy sumdata::RunData
form, information is put together based on the current configuration of the Geometry
service.Geometry
service (for obtaining the current configuration to put into the event)art::Run
is driven by the fact that the run is the highest available container; job-level data products (art::Results
) behave very differently from the others and are not currently interfaced with a producing service;sumdata::GeometryConfigurationInfo
should be compact enough not to bloat the data files with very few events per run, as it may be for the selection of rare processes or signatures. Definition at line 96 of file GeometryConfigurationWriter_service.cc.
|
private |
Alias for the pointer to the data product object to be put into the run.
Definition at line 111 of file GeometryConfigurationWriter_service.cc.
Definition at line 102 of file GeometryConfigurationWriter_service.cc.
geo::GeometryConfigurationWriter::GeometryConfigurationWriter | ( | Parameters const & | p | ) |
Definition at line 204 of file GeometryConfigurationWriter_service.cc.
|
inherited |
Definition at line 54 of file ProducingService.cc.
References e, art::EventPrincipal::makeEvent(), art::ProducingService::mc_, and art::ProducingService::postReadEvent().
Referenced by art::ProducingService::registerCallbacks().
|
inherited |
Definition at line 38 of file ProducingService.cc.
References art::RangeSet::forRun(), art::RunPrincipal::makeRun(), art::ProducingService::mc_, art::ProducingService::postReadRun(), r, and art::RunPrincipal::runID().
Referenced by art::ProducingService::registerCallbacks().
|
inherited |
Definition at line 46 of file ProducingService.cc.
References art::RangeSet::forSubRun(), art::SubRunPrincipal::makeSubRun(), art::ProducingService::mc_, art::ProducingService::postReadSubRun(), and art::SubRunPrincipal::subRunID().
Referenced by art::ProducingService::registerCallbacks().
|
staticprivate |
Creates configuration information based on the current Geometry
service.
Definition at line 238 of file GeometryConfigurationWriter_service.cc.
References MF_LOG_DEBUG.
Referenced by postReadRun().
|
private |
Upgrades legacy sumdata::RunData
in run
to geometry information (returns null pointer if no legacy information is present).
Definition at line 284 of file GeometryConfigurationWriter_service.cc.
References readRunData().
Referenced by previousInfo().
|
overrideprivatevirtual |
Writes the information from the service configuration into the run
.
Reimplemented from art::ProducingService.
Definition at line 211 of file GeometryConfigurationWriter_service.cc.
References extractInfoFromGeometry(), art::fullRun(), art::Run::id(), previousInfo(), art::Run::put(), and verifyConsistentConfigs().
|
private |
Loads the geometry information from the run
(either directly or legacy).
Read geometry configuration information from the run:
Definition at line 224 of file GeometryConfigurationWriter_service.cc.
References makeInfoFromRunData(), and readGeometryInformation().
Referenced by postReadRun().
|
private |
Reads geometry information from the run (returns null pointer if none).
Definition at line 273 of file GeometryConfigurationWriter_service.cc.
Referenced by previousInfo().
|
private |
Returns a pointer to the sumdata::RunData
in run
(nullptr if none).
Definition at line 291 of file GeometryConfigurationWriter_service.cc.
References DEFINE_ART_PRODUCING_SERVICE, and art::ProductRetriever::getMany().
Referenced by makeInfoFromRunData().
|
inherited |
Definition at line 30 of file ProducingService.cc.
References art::ProducingService::doPostReadEvent(), art::ProducingService::doPostReadRun(), art::ProducingService::doPostReadSubRun(), art::ProducingServiceSignals::sPostReadEvent, art::ProducingServiceSignals::sPostReadRun, and art::ProducingServiceSignals::sPostReadSubRun.
|
inherited |
|
private |
Verifies that the geometry configurations for the current and previous processes are consistent.
Definition at line 252 of file GeometryConfigurationWriter_service.cc.
References fFatalConfCheck.
Referenced by postReadRun().
|
private |
Definition at line 135 of file GeometryConfigurationWriter_service.cc.
Referenced by verifyConsistentConfigs().
|
staticinherited |
Definition at line 19 of file ProducingService.h.