Writes PMT configuration from FHiCL into a data product. More...
Classes | |
struct | Config |
Configuration of the module. More... | |
Public Types | |
using | Parameters = art::EDProducer::Table< Config > |
Public Member Functions | |
PMTconfigurationExtraction (Parameters const &config) | |
Constructor: just reads the configuration. More... | |
virtual void | beginRun (art::Run &run) override |
Action on new run: configuration is written. More... | |
virtual void | produce (art::Event &) override |
Mandatory method, unused. More... | |
Private Member Functions | |
bool | checkConsistency (sbn::PMTconfiguration const &newConfig, std::string const &srcName) const |
Throws an exception if the newConfig is not compatible with the current. More... | |
Private Attributes | |
std::optional < sbn::PMTconfiguration > | fPMTconfig |
Current PMT configuration (may be still unassigned). More... | |
icarusDB::IICARUSChannelMap const * | fChannelMap = nullptr |
Pointer to the online channel mapping service. More... | |
bool | fRequireConsistency = true |
Whether PMT configuration inconsistency is fatal. More... | |
bool | fVerbose = false |
Whether to print the configuration we read. More... | |
std::string | fLogCategory |
Category tag for messages. More... | |
Writes PMT configuration from FHiCL into a data product.
This module reads the configuration related to PMT from the FHiCL configuration of the input runs and puts it into each run as a data product.
This module requires any input with art run objects in it. The format expected for that configuration is defined in icarus::PMTconfigurationExtractor
, which is the utility used for the actual extraction.
A data product of type sbn::PMTconfiguration
is placed in each run. Note that the module itself does not enforce any coherence in the configuration.
The following configuration parameters are supported:
true
): when set, service IICARUSChannelMap
is used to track the channel numbers back to the LArSoft PMT channel IDs, and this information is saved together with the channel information; if the service is not available, this flag should be set to false
, in which case the channel ID will be marked as unknown (sbn::V1730channelConfiguration::NoChannelID
).true
): requires that all input files contain compatible PMT configuration; while this is in general desired during decoding, when mixing files with different runs in the same process this check might fail.false
): if set to true
, it will print in full the configuration of the PMT the first time it is read and each time a different one is found.PMTconfigurationExtraction
): category tag used for messages to message facility.This module does not support multithreading, and art does not provide multithreading for its functionality anyway: the only action is performed at run and input file level, and the only concurrency in art is currently (art 3.7) at event level.
Definition at line 91 of file PMTconfigurationExtraction_module.cc.
using icarus::PMTconfigurationExtraction::Parameters = art::EDProducer::Table<Config> |
Definition at line 139 of file PMTconfigurationExtraction_module.cc.
icarus::PMTconfigurationExtraction::PMTconfigurationExtraction | ( | Parameters const & | config | ) |
Constructor: just reads the configuration.
Definition at line 165 of file PMTconfigurationExtraction_module.cc.
|
overridevirtual |
Action on new run: configuration is written.
Definition at line 184 of file PMTconfigurationExtraction_module.cc.
|
private |
Throws an exception if the newConfig
is not compatible with the current.
Definition at line 203 of file PMTconfigurationExtraction_module.cc.
|
inlineoverridevirtual |
Mandatory method, unused.
Definition at line 150 of file PMTconfigurationExtraction_module.cc.
|
private |
Pointer to the online channel mapping service.
Definition at line 97 of file PMTconfigurationExtraction_module.cc.
|
private |
Category tag for messages.
Definition at line 104 of file PMTconfigurationExtraction_module.cc.
|
private |
Current PMT configuration (may be still unassigned).
Definition at line 94 of file PMTconfigurationExtraction_module.cc.
|
private |
Whether PMT configuration inconsistency is fatal.
Definition at line 100 of file PMTconfigurationExtraction_module.cc.
|
private |
Whether to print the configuration we read.
Definition at line 102 of file PMTconfigurationExtraction_module.cc.