LArSoft
v09_90_00
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 &) | |
Constructor: gets its configuration and does nothing with it. More... | |
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 | |
virtual void | postReadRun (art::Run &run) override |
Writes the information from the service configuration into the run . More... | |
InfoPtr_t | loadInfo (art::Run &run) const |
Loads the geometry information from the run (either directly or legacy). More... | |
InfoPtr_t | readGeometryInformation (art::Run &run) const |
Reads geometry information from the run (returns null pointer if none). More... | |
InfoPtr_t | makeInfoFromRunData (art::Run &run) const |
sumdata::RunData const * | readRunData (art::Run &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... | |
static InfoPtr_t | convertRunDataToGeometryInformation (sumdata::RunData const &data) |
Converts the legacy data into geometry configuration information. More... | |
static InfoPtr_t | makeInfoPtr (sumdata::GeometryConfigurationInfo const &info) |
Alias to std::make_unique<sumdata::GeometryConfigurationInfo> . More... | |
Writes geometry configuration information into art runs.
This service is part of the mandatory version check of geo::Geometry
service. It does not require any special configuration, but it must be listed in the configuration in order for Geometry
to work:
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) Definition at line 80 of file GeometryConfigurationWriter_service.cc.
|
private |
Alias for the pointer to the data product object to be put into the run.
Definition at line 99 of file GeometryConfigurationWriter_service.cc.
Definition at line 88 of file GeometryConfigurationWriter_service.cc.
geo::GeometryConfigurationWriter::GeometryConfigurationWriter | ( | Parameters const & | ) |
Constructor: gets its configuration and does nothing with it.
Definition at line 131 of file GeometryConfigurationWriter_service.cc.
|
staticprivate |
Converts the legacy data
into geometry configuration information.
Definition at line 213 of file GeometryConfigurationWriter_service.cc.
References sumdata::GeometryConfigurationInfo::dataVersion, DEFINE_ART_PRODUCING_SERVICE, sumdata::GeometryConfigurationInfo::detectorName, makeInfoPtr(), and MF_LOG_DEBUG.
Referenced by makeInfoFromRunData().
|
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 168 of file GeometryConfigurationWriter_service.cc.
References makeInfoPtr(), and MF_LOG_DEBUG.
Referenced by postReadRun().
|
private |
Loads the geometry information from the run
(either directly or legacy).
Definition at line 149 of file GeometryConfigurationWriter_service.cc.
References makeInfoFromRunData(), and readGeometryInformation().
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 194 of file GeometryConfigurationWriter_service.cc.
References convertRunDataToGeometryInformation(), and readRunData().
Referenced by loadInfo().
|
inlinestaticprivate |
Alias to std::make_unique<sumdata::GeometryConfigurationInfo>
.
Definition at line 121 of file GeometryConfigurationWriter_service.cc.
Referenced by convertRunDataToGeometryInformation(), extractInfoFromGeometry(), and readGeometryInformation().
|
overrideprivatevirtual |
Writes the information from the service configuration into the run
.
Reimplemented from art::ProducingService.
Definition at line 137 of file GeometryConfigurationWriter_service.cc.
References extractInfoFromGeometry(), art::fullRun(), loadInfo(), and art::Run::put().
|
private |
Reads geometry information from the run (returns null pointer if none).
Definition at line 183 of file GeometryConfigurationWriter_service.cc.
References makeInfoPtr().
Referenced by loadInfo().
|
private |
Returns a pointer to the sumdata::RunData
in run
(nullptr if none).
Definition at line 204 of file GeometryConfigurationWriter_service.cc.
References 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 |
|
staticinherited |
Definition at line 19 of file ProducingService.h.