29 class GeometryConfigurationWriter;
99 using InfoPtr_t = std::unique_ptr<sumdata::GeometryConfigurationInfo>;
123 return std::make_unique<sumdata::GeometryConfigurationInfo>(info);
133 produces<sumdata::GeometryConfigurationInfo, art::InRun>();
175 <<
"Geometry configuration information from service:\n" 187 return run.getByLabel(
art::InputTag{
"GeometryConfigurationWriter"}, infoHandle) ?
209 return allRunData.empty() ?
nullptr : allRunData.front().product();
224 <<
"Built geometry configuration information from run data:\n"
Writes geometry configuration information into art runs.
DataVersion_t dataVersion
Version of the data in this object (0 is invalid version).
GeometryConfigurationWriter(Parameters const &)
Constructor: gets its configuration and does nothing with it.
PutHandle< PROD > put(std::unique_ptr< PROD > &&edp, std::string const &instance={})
InfoPtr_t makeInfoFromRunData(art::Run &run) const
static InfoPtr_t makeInfoPtr(sumdata::GeometryConfigurationInfo const &info)
Alias to std::make_unique<sumdata::GeometryConfigurationInfo>.
static InfoPtr_t convertRunDataToGeometryInformation(sumdata::RunData const &data)
Converts the legacy data into geometry configuration information.
#define DEFINE_ART_PRODUCING_SERVICE(klass)
std::unique_ptr< sumdata::GeometryConfigurationInfo > InfoPtr_t
Alias for the pointer to the data product object to be put into the run.
InfoPtr_t readGeometryInformation(art::Run &run) const
Reads geometry information from the run (returns null pointer if none).
static InfoPtr_t extractInfoFromGeometry()
Creates configuration information based on the current Geometry service.
Description of the current configuration of detector geometry.
unsigned int DataVersion_t
Type used for the version of data.
sumdata::RunData const * readRunData(art::Run &run) const
Returns a pointer to the sumdata::RunData in run (nullptr if none).
Namespace collecting geometry-related classes utilities.
virtual void postReadRun(art::Run &run) override
Writes the information from the service configuration into the run.
art framework interface to geometry description
Description of the current configuration of detector geometry.
std::vector< Handle< PROD > > getMany(SelectorBase const &selector=MatchAllSelector{}) const
InfoPtr_t loadInfo(art::Run &run) const
Loads the geometry information from the run (either directly or legacy).