Writes trigger 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 | |
TriggerConfigurationExtraction (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 (icarus::TriggerConfiguration const &newConfig, std::string const &srcName) const |
Throws an exception if the newConfig is not compatible with the current. More... | |
Private Attributes | |
std::optional < icarus::TriggerConfiguration > | fTriggerConfig |
Current Trigger configuration (may be still unassigned). More... | |
bool | fRequireConsistency = true |
Whether trigger configuration inconsistency is fatal. More... | |
std::string | fTriggerFragmentType |
Name of the trigger fragment type. More... | |
bool | fVerbose = false |
Whether to print the configuration we read. More... | |
std::string | fLogCategory |
Category tag for messages. More... | |
Writes trigger configuration from FHiCL into a data product.
This module reads the configuration related to the Trigger 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::TriggerConfigurationExtractor
, which is the utility used for the actual extraction.
A data product of type icarus::TriggerConfiguration
is placed in each run. Note that the module itself does not enforce any coherence in the configuration.
The following configuration parameters are supported:
ICARUSTriggerV2
): name of the type of trigger fragment, used to identify the configuration of the trigger.false
): if set to true
, it will print in full the configuration of the trigger the first time it is read and each time a different one is found.ICARUSConfigurationExtraction
): 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 83 of file TriggerConfigurationExtraction_module.cc.
using icarus::TriggerConfigurationExtraction::Parameters = art::EDProducer::Table<Config> |
Definition at line 122 of file TriggerConfigurationExtraction_module.cc.
icarus::TriggerConfigurationExtraction::TriggerConfigurationExtraction | ( | Parameters const & | config | ) |
Constructor: just reads the configuration.
Definition at line 148 of file TriggerConfigurationExtraction_module.cc.
|
overridevirtual |
Action on new run: configuration is written.
Definition at line 163 of file TriggerConfigurationExtraction_module.cc.
|
private |
Throws an exception if the newConfig
is not compatible with the current.
Definition at line 182 of file TriggerConfigurationExtraction_module.cc.
|
inlineoverridevirtual |
Mandatory method, unused.
Definition at line 133 of file TriggerConfigurationExtraction_module.cc.
|
private |
Category tag for messages.
Definition at line 95 of file TriggerConfigurationExtraction_module.cc.
|
private |
Whether trigger configuration inconsistency is fatal.
Definition at line 89 of file TriggerConfigurationExtraction_module.cc.
|
private |
Current Trigger configuration (may be still unassigned).
Definition at line 86 of file TriggerConfigurationExtraction_module.cc.
|
private |
Name of the trigger fragment type.
Definition at line 91 of file TriggerConfigurationExtraction_module.cc.
|
private |
Whether to print the configuration we read.
Definition at line 93 of file TriggerConfigurationExtraction_module.cc.