22 #include "cetlib_except/exception.h" 40 , fRelPath (pset.
get<
std::
string >(
"RelativePath",
"" ))
41 , fDisableWiresInG4 (pset.
get<
bool >(
"DisableWiresInG4", false))
42 , fNonFatalConfCheck(pset.
get<
bool >(
"SkipConfigurationCheck", false))
43 , fSortingParameters(pset.
get<
fhicl::ParameterSet>(
"SortingParameters",
fhicl::ParameterSet() ))
44 , fBuilderParameters(pset.
get<
fhicl::ParameterSet>(
"Builder",
fhicl::ParameterSet() ))
47 if (pset.
has_key(
"ForceUseFCLOnly")) {
49 <<
"Geometry service does not support `ForceUseFCLOnly` configuration parameter any more.\n";
84 <<
" is incompatible with the one configured in the job.";
88 <<
"Geometry used for run " << run.
id()
89 <<
" is incompatible with the one configured in the job!" 90 <<
"\n=== job configuration " <<
std::string(50,
'=')
92 <<
"\n=== run configuration " <<
std::string(50,
'=')
93 <<
"\n" << inputGeomInfo
94 <<
"\n======================" <<
std::string(50,
'=')
110 if (!channelMapAlg) {
112 <<
" failed to load new channel map";
126 ROOTFileName.append(gdmlfile);
127 GDMLFileName.append(gdmlfile);
131 GDMLFileName.insert(GDMLFileName.find(
".gdml"),
"_nowires");
140 if( !sp.find_file(GDMLFileName, GDMLfile) ) {
142 <<
"cannot find the gdml geometry file:" 143 <<
"\n" << GDMLFileName
144 <<
"\nbail ungracefully.\n";
148 if( !sp.find_file(ROOTFileName, ROOTfile) ) {
150 <<
"cannot find the root geometry file:\n" 151 <<
"\n" << ROOTFileName
152 <<
"\nbail ungracefully.\n";
184 <<
"Geometry configuration information:\n" <<
fConfInfo;
211 "Can't read geometry configuration information.\n" 212 "Is `GeometryConfigurationWriter` service configured?\n",
235 mf::LogWarning(
"Geometry") <<
"Geometry::CompareConfigurationInfo(): " 236 "invalid version for configuration A:\n" <<
A;
240 mf::LogWarning(
"Geometry") <<
"Geometry::CompareConfigurationInfo(): " 241 "invalid version for configuration B:\n" <<
B;
248 assert(commonVersion >= 1);
251 mf::LogWarning(
"Geometry") <<
"Geometry::CompareConfigurationInfo(): " 252 "detector name mismatch: '" << A.
detectorName <<
"' vs. '"
fhicl::ParameterSet fSortingParameters
Parameter set to define the channel map sorting.
DataVersion_t dataVersion
Version of the data in this object (0 is invalid version).
std::string geometryServiceConfiguration
geo::Geometry service configuration, as FHiCL table.
void FillGeometryConfigurationInfo(fhicl::ParameterSet const &config)
Fills the service configuration information into fConfInfo.
static bool CompareConfigurationInfo(sumdata::GeometryConfigurationInfo const &A, sumdata::GeometryConfigurationInfo const &B)
Returns if A and B are compatible geometry service configurations.
bool CheckConfigurationInfo(sumdata::GeometryConfigurationInfo const &other) const
Returns if the other configuration is compatible with our current.
art framework interface to geometry description
void preBeginRun(art::Run const &run)
Updates the geometry if needed at the beginning of each new run.
static sumdata::GeometryConfigurationInfo const & ReadConfigurationInfo(art::Run const &run)
Reads and returns the geometry configuration information from the run.
fhicl::ParameterSet fBuilderParameters
Parameter set for geometry builder.
std::string DetectorName() const
Returns a string with the name of the detector, as configured.
T get(std::string const &key) const
bool isDataValid() const noexcept
Protocol: whether the data content is valid.
void LoadNewGeometry(std::string gdmlfile, std::string rootfile, bool bForceReload=false)
Expands the provided paths and loads the geometry description(s)
std::string to_indented_string() const
bool has_key(std::string const &key) const
The geometry of one entire detector, as served by art.
Description of geometry of one entire detector.
void LoadGeometryFile(std::string gdmlfile, std::string rootfile, geo::GeometryBuilder &builder, bool bForceReload=false)
Loads the geometry information from the specified files.
sumdata::GeometryConfigurationInfo fConfInfo
Summary of service configuration.
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
#define DEFINE_ART_SERVICE(svc)
GlobalSignal< detail::SignalResponseType::FIFO, void(Run const &)> sPreBeginRun
Standard implementation of geometry extractor.
unsigned int DataVersion_t
Type used for the version of data.
void ApplyChannelMap(std::unique_ptr< geo::ChannelMapAlg > pChannelMap)
Initializes the geometry to work with this channel map.
T min(sqlite3 *const db, std::string const &table_name, std::string const &column_name)
MaybeLogger_< ELseverityLevel::ELsev_warning, false > LogWarning
auto const & get(AssnsNode< L, R, D > const &r)
PROD const & getProduct(InputTag const &tag) const
LArSoft geometry interface.
Extracts of LArSoft geometry information from ROOT.
void InitializeChannelMap()
cet::coded_exception< error, detail::translate > exception
Description of the current configuration of detector geometry.