14 #include "canvas/Persistency/Provenance/ProcessConfiguration.h"
15 #include "canvas/Persistency/Provenance/ProcessHistory.h"
16 #include "fhiclcpp/ParameterSet.h"
18 #include "art/Framework/Services/Registry/ServiceHandle.h"
19 #include "art/Framework/Core/EDProducer.h"
20 #include "art/Framework/Core/ModuleMacros.h"
21 #include "art/Framework/Core/FileBlock.h"
22 #include "art/Framework/Principal/Run.h"
23 #include "messagefacility/MessageLogger/MessageLogger.h"
24 #include "fhiclcpp/types/Atom.h"
25 #include "cetlib_except/exception.h"
36 namespace icarus {
class PMTconfigurationExtraction; }
114 (
"retrieves LArSoft channel ID of each PMT; requires IICARUSChannelMap service"),
121 (
"checks that all input files carry a compatible PMT configuration"),
127 fhicl::Comment(
"print in full each new PMT configuration read"),
133 fhicl::Comment(
"category tag used for messages to message facility"),
134 "PMTconfigurationExtraction"
147 virtual void beginRun(art::Run& run)
override;
166 : art::EDProducer(config)
167 , fChannelMap(config().AssignOfflineChannelIDs()
168 ? art::ServiceHandle<icarusDB::IICARUSChannelMap const>{}.get()
171 , fRequireConsistency(config().RequireConsistentPMTconfigurations())
172 , fVerbose(config().Verbose())
178 produces<sbn::PMTconfiguration, art::InRun>();
196 run.put(std::make_unique<sbn::PMTconfiguration>(
fPMTconfig.value()));
205 if (!fPMTconfig.has_value() || (*fPMTconfig == config))
return true;
208 if (fRequireConsistency) {
209 throw cet::exception(
"PMTconfigurationExtraction")
210 <<
"Configuration from " << srcName
211 <<
" is incompatible with the previously found configuration.\n"
216 <<
"Configuration from " << srcName
217 <<
" is incompatible with the previously found configuration.\n"
219 if (fVerbose) mf::LogVerbatim(
fLogCategory) <<
"PMT readout:" << config;
sbn::PMTconfiguration extractPMTreadoutConfiguration(std::string const &srcFileName, icarus::PMTconfigurationExtractor extractor)
BEGIN_PROLOG vertical distance to the surface Name
Information from the configuration of PMT readout.
std::string to_string(WindowPattern const &pattern)
Class containing configuration for PMT readout.