Definition at line 44 of file GeometryInfoCheck_module.cc.
geo::GeometryInfoCheck::GeometryInfoCheck |
( |
Parameters const & |
config | ) |
|
|
explicit |
Definition at line 146 of file GeometryInfoCheck_module.cc.
147 : art::EDAnalyzer(config)
159 mf::LogDebug log {
"GeometryInfoCheck" };
160 log <<
"Configuration:"
161 <<
"\n - geometry configuration check:";
163 if (
fCheckInfo->detectorName.empty()) log <<
" (any name)";
164 else log <<
" must match '" <<
fCheckInfo->detectorName <<
"'";
165 log <<
" [" << (
fCheckInfo->required?
"mandatory":
"optional") <<
"]";
167 else log <<
"not requested";
169 log <<
"\n - legacy geometry configuration information check:";
173 log <<
" [" << (
fLegacyCheckInfo->required?
"mandatory":
"optional") <<
"]";
175 else log <<
"not requested";
static std::optional< GeometryInfoCheckInfo > makeGeometryInfoCheckInfo(fhicl::OptionalTable< GeometryInfoConfig > const &config)
Fills a GeometryInfoCheckInfo out of the specified configuration.
std::optional< GeometryInfoCheckInfo > fLegacyCheckInfo
Information on the check on the legacy geometry information.
static art::InputTag const GeometryConfigurationWriterTag
The name of the tag for the geometry information.
std::optional< GeometryInfoCheckInfo > fCheckInfo
Information on the check on the regular geometry information.
virtual void geo::GeometryInfoCheck::analyze |
( |
art::Event const & |
| ) |
|
|
inlineoverridevirtual |
void geo::GeometryInfoCheck::beginRun |
( |
art::Run const & |
run | ) |
|
|
overridevirtual |
Definition at line 184 of file GeometryInfoCheck_module.cc.
void CheckLegacyGeometryInfo(art::Run const &run, GeometryInfoCheckInfo const &config) const
std::optional< GeometryInfoCheckInfo > fLegacyCheckInfo
Information on the check on the legacy geometry information.
void CheckGeometryInfo(art::Run const &run, GeometryInfoCheckInfo const &config) const
std::optional< GeometryInfoCheckInfo > fCheckInfo
Information on the check on the regular geometry information.
void geo::GeometryInfoCheck::CheckGeometryInfo |
( |
art::Run const & |
run, |
|
|
GeometryInfoCheckInfo const & |
config |
|
) |
| const |
|
private |
Performs a geometry information check.
- Exceptions
-
cet::exception | on check failures |
Definition at line 194 of file GeometryInfoCheck_module.cc.
197 mf::LogDebug log {
"GeometryInfoCheck" };
198 log <<
"Check on geometry information.";
203 art::Handle<sumdata::GeometryConfigurationInfo> hInfo;
205 log <<
"\nNo information found.";
206 if (!config.required)
return;
208 log <<
"\nUnfortunately, that was required...";
209 throw cet::exception(
"GeometryInfoCheck")
210 <<
"Required geometry information not found as '"
216 <<
"\nFound geometry information (version " <<
info.dataVersion <<
")"
217 <<
" from '" << hInfo.provenance()->inputTag().encode() <<
"'"
218 <<
"\nGeometry name is '" <<
info.detectorName <<
"'."
224 if (!config.detectorName.empty()
225 && !case_insensitive_equal(
info.detectorName, config.detectorName)
227 throw cet::exception(
"GeometryInfoCheck")
228 <<
"Geometry information reports an unexpected name '"
229 <<
info.detectorName <<
"' ('" << config.detectorName <<
"' expected)\n"
static art::InputTag const GeometryConfigurationWriterTag
The name of the tag for the geometry information.
Description of the current configuration of detector geometry.
void geo::GeometryInfoCheck::CheckLegacyGeometryInfo |
( |
art::Run const & |
run, |
|
|
GeometryInfoCheckInfo const & |
config |
|
) |
| const |
|
private |
Performs a legacy geometry information check
- Exceptions
-
cet::exception | on check failures |
Definition at line 242 of file GeometryInfoCheck_module.cc.
245 mf::LogDebug log {
"GeometryInfoCheck" };
246 log <<
"Check on legacy geometry information.";
254 if (hInfoList.empty()) {
255 log <<
"\nNo information found.";
256 if (!config.required)
return;
258 log <<
"\nUnfortunately, that was required...";
259 throw cet::exception(
"GeometryInfoCheck")
260 <<
"No legacy geometry information found!\n";
263 log <<
"\nFound " << hInfoList.size() <<
" legacy geometry records:";
264 art::Handle<sumdata::RunData>
const* hInfo =
nullptr;
265 for (
auto const& handle: hInfoList) {
266 log <<
"\n - " << handle.provenance()->inputTag().encode();
267 if (handle.failedToGet()) log <<
" (not present)";
270 log <<
" (this will be used for the check)";
276 <<
"\nFound legacy geometry information "
277 <<
"\nGeometry name is '" <<
info.DetName() <<
"'."
283 if (!config.detectorName.empty()
284 && !case_insensitive_equal(
info.DetName(), config.detectorName)
286 throw cet::exception(
"GeometryInfoCheck")
287 <<
"Geometry legacy information reports an unexpected name '"
288 <<
info.DetName() <<
"' ('" << config.detectorName <<
"' expected)\n"
auto geo::GeometryInfoCheck::makeGeometryInfoCheckInfo |
( |
fhicl::OptionalTable< GeometryInfoConfig > const & |
config | ) |
|
|
staticprivate |
Fills a GeometryInfoCheckInfo
out of the specified configuration.
Definition at line 301 of file GeometryInfoCheck_module.cc.
304 GeometryInfoConfig infoConfig;
305 if (!config(infoConfig))
return {};
307 GeometryInfoCheckInfo
info;
308 info.required = infoConfig.Required();
309 infoConfig.Name(info.detectorName);
311 return { std::move(info) };
art::InputTag const geo::GeometryInfoCheck::GeometryConfigurationWriterTag { "GeometryConfigurationWriter" } |
|
staticprivate |
The documentation for this class was generated from the following file: