Writes the art configuration into the TFileService
file.
More...
Classes | |
struct | Config |
Public Types | |
using | Parameters = art::EDAnalyzer::Table< Config > |
Public Member Functions | |
SaveConfigurationIntoTFile (Parameters const &config) | |
Standard art analyzer moduel constructor. More... | |
virtual void | beginJob () override |
Writes the configuration information of the current process. More... | |
virtual void | analyze (art::Event const &event) override |
Writes the configuration information of the input processes. More... | |
Private Member Functions | |
void | saveProcessConfiguration (std::string const &procName, fhicl::ParameterSet const &config) |
Writes the specified configuration into a ROOT directory. More... | |
bool | isProcessConfigurationSaved (std::string const &procName) const |
Returns whether we have already saved configuration for procName . More... | |
Static Private Member Functions | |
static fhicl::ParameterSet | processConfiguration (art::Event const &event, std::string const &procName) |
Extracts the configuration of the specified process from event . More... | |
static void | storeString (std::string const &key, std::string const &value) |
Saves a string via TFileService (as TNamed ). More... | |
static fhicl::ParameterSet | currentProcessConfiguration (std::string const &procName) |
Returns the configuration of the current art process. More... | |
static bool | isProcessConfiguration (fhicl::ParameterSet const &pset) |
Returns whether the specified one is a process configuration. More... | |
static bool | isProcessConfiguration (fhicl::ParameterSet const &pset, std::string const &procName) |
Returns whether pset is the configuration of procName process. More... | |
Private Attributes | |
bool | fIncludePreviousProcesses = false |
Whether to save the configuration of the input file. More... | |
std::set< std::string > | fProcessedProcesses |
Process names already saved. More... | |
Writes the art configuration into the TFileService
file.
A TStringObj
object is written into the directory assigned by TFileService
to this analyzer for every selected process configuration. The TObjString
will have the same ROOT name as the process itself. In addition, the following are saved:
current_process
(TNamed
): the name of this processThe selection of processes is controlled by the module configuration. The current process is always selected.
This module takes a simplistic approach, and prints only the first occurrence of each process name. When saving configuration of processes from the input files, and they contain different configurations for the same process name, only one of them (the first one encountered) will be saved.
false
): saves also the configuration of all the processes the input file has seen; this has limitations when there are multiple input files (see above). Definition at line 61 of file SaveConfigurationIntoTFile_module.cc.
using SaveConfigurationIntoTFile::Parameters = art::EDAnalyzer::Table<Config> |
Definition at line 78 of file SaveConfigurationIntoTFile_module.cc.
SaveConfigurationIntoTFile::SaveConfigurationIntoTFile | ( | Parameters const & | config | ) |
Standard art analyzer moduel constructor.
Definition at line 147 of file SaveConfigurationIntoTFile_module.cc.
|
overridevirtual |
Writes the configuration information of the input processes.
Definition at line 178 of file SaveConfigurationIntoTFile_module.cc.
|
overridevirtual |
Writes the configuration information of the current process.
Definition at line 154 of file SaveConfigurationIntoTFile_module.cc.
|
staticprivate |
Returns the configuration of the current art process.
Definition at line 248 of file SaveConfigurationIntoTFile_module.cc.
|
staticprivate |
Returns whether the specified one is a process configuration.
Definition at line 292 of file SaveConfigurationIntoTFile_module.cc.
|
staticprivate |
Returns whether pset
is the configuration of procName
process.
Definition at line 322 of file SaveConfigurationIntoTFile_module.cc.
|
inlineprivate |
Returns whether we have already saved configuration for procName
.
Definition at line 103 of file SaveConfigurationIntoTFile_module.cc.
|
staticprivate |
Extracts the configuration of the specified process from event
.
Definition at line 216 of file SaveConfigurationIntoTFile_module.cc.
|
private |
Writes the specified configuration into a ROOT directory.
Definition at line 201 of file SaveConfigurationIntoTFile_module.cc.
|
staticprivate |
Saves a string via TFileService
(as TNamed
).
Definition at line 226 of file SaveConfigurationIntoTFile_module.cc.
|
private |
Whether to save the configuration of the input file.
Definition at line 93 of file SaveConfigurationIntoTFile_module.cc.
|
private |
Process names already saved.
Definition at line 96 of file SaveConfigurationIntoTFile_module.cc.