artdaq  v3_09_00
ArtConfig.hh
1 #include "art/Framework/Core/OutputModule.h"
2 #include "art/Framework/IO/ClosingCriteria.h"
3 #include "artdaq-utilities/Plugins/MetricManager.hh"
4 #include "fhiclcpp/types/Atom.h"
5 #include "fhiclcpp/types/OptionalAtom.h"
6 #include "fhiclcpp/types/OptionalSequence.h"
7 #include "fhiclcpp/types/OptionalTable.h"
8 #include "fhiclcpp/types/Sequence.h"
9 #include "fhiclcpp/types/Table.h"
10 #include "fhiclcpp/types/Tuple.h"
11 
12 namespace art {
17 {
19  fhicl::Atom<std::string> service_provider{fhicl::Name{"service_provider"}, fhicl::Comment{"Name of the provider for the ArtdaqFragmentNamingServiceInterface (e.g. ArtdaqFragmentNamingService)"}};
21  fhicl::Atom<std::string> helper_plugin{ fhicl::Name{"helper_plugin"}, fhicl::Comment{"Name of the helper plugin used by ArtdaqFragmentNamingService"}, "Artdaq"};
23  fhicl::Atom<std::string> unidentified_instance_name{fhicl::Name{"unidentified_instance_name"}, fhicl::Comment{"Name to use for Fragment types which are not identified by the ArtdaqFragmentNamingServiceInterface implementation."}, "unidentified"};
25  fhicl::OptionalSequence<fhicl::Tuple<artdaq::Fragment::type_t, std::string>> fragment_type_map{fhicl::Name{"fragment_type_map"}, fhicl::Comment{"Additional types to register with the ArtdaqFragmentNamingServiceInterface"}};
26 };
27 
32 {
34  fhicl::Atom<std::string> service_provider{fhicl::Name{"service_provider"}, fhicl::Comment{"Name of the provider for the ArtdaqSharedMemoryServiceInterface (e.g. ArtdaqSharedMemoryService)"}};
36  fhicl::Atom<size_t> read_timeout_us{fhicl::Name{"read_timeout_us"}, fhicl::Comment{"Amount of time (in us) to wait for events from shared memory. Defaults to waiting_time if unspecified."}, 600000000};
38  fhicl::Atom<double> waiting_time{fhicl::Name{"waiting_time"}, fhicl::Comment{"Amount of time (in s) to wait for events from shared memory. Overridden by read_timeout_us if specified."}, 600.0};
40  fhicl::Atom<bool> resume_after_timeout{fhicl::Name{"resume_after_timeout"}, fhicl::Comment{"Whether to continue to attempt to receive events after a timeout occurs"}, true};
42  fhicl::OptionalAtom<int> shared_memory_key{fhicl::Name{"shared_memory_key"}, fhicl::Comment{"Key to use for Data shared memory segment. Automatically generated using parent PID."}};
44  fhicl::OptionalAtom<int> broadcast_shared_memory_key{fhicl::Name{"broadcast_shared_memory_key"}, fhicl::Comment{"Key to use for Broadcast shared memory segment. Automatically generated using parent PID."}};
46  fhicl::OptionalTable<artdaq::MetricManager::Config> metrics{fhicl::Name{"metrics"}, fhicl::Comment{"Configuration for artdaq Metrics"}};
47 };
48 
53 {
54  fhicl::Table<ArtdaqSharedMemoryServiceInterfaceConfig> ArtdaqSharedMemoryServiceInterface{fhicl::Name{"ArtdaqSharedMemoryServiceInterface"}};
55  fhicl::OptionalTable<ArtdaqFragmentNamingServiceInterfaceConfig> ArtdaqFragmentNamingServiceInterface{fhicl::Name{"ArtdaqFragmentNamingServiceInterface"}};
56 };
57 
59 {};
61 {};
63 {};
64 
69 {
70  fhicl::Table<AnalyzersConfig> analyzers{fhicl::Name{"analyzers"}};
71  fhicl::Table<ProducersConfig> producers{fhicl::Name{"producers"}};
72  fhicl::Table<FiltersConfig> filters{fhicl::Name{"filters"}};
73  fhicl::Sequence<std::string> my_output_modules{fhicl::Name{"my_output_modules"}, fhicl::Comment{"Output modules (configured in the outputs block) to use"}};
75 };
76 
81 {
82  using Name = fhicl::Name;
83  using Comment = fhicl::Comment;
84  template<typename T>
86  using Atom = fhicl::Atom<T>;
88  template<typename T>
89  using OptionalAtom = fhicl::OptionalAtom<T>;
90 
91  fhicl::TableFragment<art::OutputModule::Config> omConfig;
92  Atom<std::string> catalog{Name("catalog"), ""};
94  Atom<bool> dropAllSubRuns{Name("dropAllSubRuns"), false};
96  Atom<std::string> tmpDir{Name("tmpDir"), "/tmp"};
97  Atom<int> compressionLevel{Name("compressionLevel"), 7};
98  Atom<int64_t> saveMemoryObjectThreshold{Name("saveMemoryObjectThreshold"), -1l};
99  Atom<int64_t> treeMaxVirtualSize{Name("treeMaxVirtualSize"), -1};
100  Atom<int> splitLevel{Name("splitLevel"), 99};
101  Atom<int> basketSize{Name("basketSize"), 16384};
102  Atom<bool> dropMetaDataForDroppedData{Name("dropMetaDataForDroppedData"), false};
103  Atom<std::string> dropMetaData{Name("dropMetaData"), "NONE"};
104  Atom<bool> writeParameterSets{Name("writeParameterSets"), true};
105  fhicl::Table<ClosingCriteria::Config> fileProperties{Name("fileProperties")};
106 
111  {
116  std::set<std::string> operator()() const
117  {
118  std::set<std::string> keys{art::OutputModule::Config::KeysToIgnore::get()};
119  keys.insert("results");
120  return keys;
121  }
122  };
123 };
124 
129 {
130  fhicl::OptionalTable<art::OutputModule::Config> rootNetOutput{fhicl::Name{"rootNetOutput"}};
131  fhicl::OptionalTable<RootOutputConfig> normalOutput{fhicl::Name{"normalOutput"}};
132  fhicl::OptionalTable<RootOutputConfig> rootDAQOutFile{fhicl::Name{"rootDAQOutFile"}};
133 };
134 
139 {
141  fhicl::Atom<std::string> module_type{fhicl::Name{"module_type"}, fhicl::Comment{"Module type of source. Should be \"ArtdaqInput\""}};
143  fhicl::Atom<double> init_fragment_timeout_seconds{fhicl::Name{"init_fragment_timeout_seconds"}, fhicl::Comment{"Amount of time ArtdaqInput should wait for an Init Fragment before simply returning Fragments"}, 600.0};
145  fhicl::Atom<std::string> raw_data_label{fhicl::Name{"raw_data_label"}, fhicl::Comment{"Label to use for raw data (i.e. Fragments from the DAQ)"}, "daq"};
147  fhicl::Atom<bool> register_fragment_types{fhicl::Name{"register_fragment_types"}, fhicl::Comment{"Whether ArtdaqInputHelper should register the known Fragment types from the ArtdaqFragmentNamingServiceInterface. Required for EventBuilders. Disable for processes that don't handle Fragments."}, true};
148 };
149 
153 struct Config
154 {
155  fhicl::Table<art::ServicesConfig> services{fhicl::Name{"services"}};
156  fhicl::Table<art::PhysicsConfig> physics{fhicl::Name{"physics"}};
157  fhicl::Table<art::OutputsConfig> outputs{fhicl::Name{"outputs"}};
158  fhicl::Table<art::SourceConfig> source{fhicl::Name{"source"}};
159  fhicl::Atom<std::string> process_name{fhicl::Name{"process_name"}, fhicl::Comment{"Name of this art processing job"}, "DAQ"};
161 };
162 } // namespace art
Atom< bool > dropAllSubRuns
Whether to drop all subruns ???
Definition: ArtConfig.hh:94
Atom< int64_t > saveMemoryObjectThreshold
???
Definition: ArtConfig.hh:98
fhicl::Table< FiltersConfig > filters
Definition: ArtConfig.hh:72
fhicl::TableFragment< art::OutputModule::Config > omConfig
Configuration common to all OutputModules.
Definition: ArtConfig.hh:91
Atom< int > splitLevel
???
Definition: ArtConfig.hh:100
Interface for ArtdaqSharedMemoryService. This interface is declared to art as part of the required re...
fhicl::OptionalAtom< T > OptionalAtom
Optional Configuration Parameter.
Definition: ArtConfig.hh:89
fhicl::Atom< T > Atom
Configuration Parameter.
Definition: ArtConfig.hh:86
Atom< int > basketSize
???
Definition: ArtConfig.hh:101
fhicl::OptionalAtom< int > shared_memory_key
&quot;shared_memory_key&quot; (OPTIONAL): Key to use for Data shared memory segment. Automatically generated us...
Definition: ArtConfig.hh:42
Configuration for the ArtdaqFragmentNamingServiceInterface
Definition: ArtConfig.hh:16
fhicl::Sequence< std::string > my_output_modules
Output modules (configured in the outputs block) to use.
Definition: ArtConfig.hh:74
fhicl::Atom< std::string > unidentified_instance_name
&quot;unidentified_instance_name&quot; (Default: &quot;unidentified&quot;): Name to use for Fragment types which are not ...
Definition: ArtConfig.hh:23
Configuration for the source block of artdaq art processes
Definition: ArtConfig.hh:138
Atom< bool > dropMetaDataForDroppedData
???
Definition: ArtConfig.hh:102
fhicl::OptionalAtom< int > broadcast_shared_memory_key
&quot;broadcast_shared_memory_key&quot; (OPTIONAL): Key to use for Broadcast shared memory segment. Automatically generated using parent PID.
Definition: ArtConfig.hh:44
fhicl::Table< art::PhysicsConfig > physics
Physics block.
Definition: ArtConfig.hh:156
Artdaq does not provide any producers.
Definition: ArtConfig.hh:60
Configuration for the ArtdaqSharedMemoryServiceInterface
Definition: ArtConfig.hh:31
Required configuration for art processes started by artdaq, with artdaq-specific defaults where appli...
Definition: ArtConfig.hh:153
Atom< int > compressionLevel
Compression level to use. artdaq recommends &lt;= 3.
Definition: ArtConfig.hh:97
fhicl::OptionalTable< RootOutputConfig > normalOutput
Normal art/ROOT output.
Definition: ArtConfig.hh:131
fhicl::OptionalTable< artdaq::MetricManager::Config > metrics
&quot;metrics&quot; (OPTIONAL): Configuration for artdaq Metrics
Definition: ArtConfig.hh:46
fhicl::Atom< bool > resume_after_timeout
&quot;resume_after_timeout&quot; (Default: true): Whether to continue to attempt to receive events after a time...
Definition: ArtConfig.hh:40
fhicl::Name Name
Parameter Name.
Definition: ArtConfig.hh:82
fhicl::Table< art::OutputsConfig > outputs
Outputs block.
Definition: ArtConfig.hh:157
Confgiguration for ROOT output modules
Definition: ArtConfig.hh:80
Atom< std::string > dropMetaData
Which metadata to drop (Default: &quot;NONE&quot;)
Definition: ArtConfig.hh:103
Configuration for the outputs block of artdaq art processes
Definition: ArtConfig.hh:128
fhicl::Atom< std::string > process_name
&quot;process_name&quot; (Default: &quot;DAQ&quot;): Name of this art processing job
Definition: ArtConfig.hh:160
fhicl::OptionalTable< art::OutputModule::Config > rootNetOutput
For transferring data from EventBuilders to DataLoggers.
Definition: ArtConfig.hh:130
fhicl::Atom< std::string > service_provider
&quot;service_provider&quot; (REQUIRED): Name of the provider for the ArtdaqSharedMemoryServiceInterface (e...
Definition: ArtConfig.hh:34
Configuration of the physics block for artdaq art processes
Definition: ArtConfig.hh:68
fhicl::Atom< bool > register_fragment_types
&quot;register_fragment_types&quot; (Default: true): Whether ArtdaqInputHelper should register the known Frag...
Definition: ArtConfig.hh:147
fhicl::Atom< double > init_fragment_timeout_seconds
&quot;init_fragment_timeout_seconds&quot; (Default: 600.0): Amount of time (in s) ArtdaqInput should wait for a...
Definition: ArtConfig.hh:143
fhicl::Table< ClosingCriteria::Config > fileProperties
When should the file be closed.
Definition: ArtConfig.hh:105
fhicl::Table< AnalyzersConfig > analyzers
Analyzer module configuration.
Definition: ArtConfig.hh:70
Atom< int64_t > treeMaxVirtualSize
???
Definition: ArtConfig.hh:99
Configuration of the services block for artdaq art processes
Definition: ArtConfig.hh:52
Atom< bool > writeParameterSets
Write art ParameterSet to output file (Default: true)
Definition: ArtConfig.hh:104
fhicl::Table< art::SourceConfig > source
Definition: ArtConfig.hh:158
fhicl::Atom< std::string > module_type
&quot;module_type&quot;: REQUIRED: Module type of source. Should be &quot;ArtdaqInput&quot;
Definition: ArtConfig.hh:141
fhicl::Atom< std::string > helper_plugin
&quot;helper_plugin&quot; (Default: &quot;Artdaq&quot;): Name of the helper plugin used by ArtdaqFragmentNamingService ...
Definition: ArtConfig.hh:21
fhicl::Table< ProducersConfig > producers
Producer module configuration.
Definition: ArtConfig.hh:71
fhicl::Atom< std::string > raw_data_label
&quot;raw_data_label&quot; (Default: &quot;daq&quot;): Label to use for raw data (i.e. Fragments from the DAQ) ...
Definition: ArtConfig.hh:145
OptionalAtom< bool > dropAllEvents
Whether to drop all events ???
Definition: ArtConfig.hh:93
std::set< std::string > operator()() const
Get the keys to ignore
Definition: ArtConfig.hh:116
Interface for ArtdaqFragmentNamingService. This interface is declared to art as part of the required ...
OptionalAtom< bool > fastCloning
Whether to try to use fastCloning on the file.
Definition: ArtConfig.hh:95
fhicl::Atom< size_t > read_timeout_us
&quot;read_timeout_us&quot; (Default: &quot;waiting_time&quot; * 1000000): Amount of time (in us) to wait for events from...
Definition: ArtConfig.hh:36
fhicl::Table< art::ServicesConfig > services
Services block.
Definition: ArtConfig.hh:155
Atom< std::string > tmpDir
Temporary directory.
Definition: ArtConfig.hh:96
fhicl::OptionalTable< RootOutputConfig > rootDAQOutFile
art/ROOT output where the filename can be specified at initialization (e.g. to /dev/null), for testing
Definition: ArtConfig.hh:132
fhicl::Comment Comment
Definition: ArtConfig.hh:83
fhicl::Atom< std::string > service_provider
&quot;service_provider&quot; (REQUIRED): Name of the provider for the ArtdaqFragmentNamingServiceInterface (e...
Definition: ArtConfig.hh:19
Atom< std::string > catalog
???
Definition: ArtConfig.hh:92
These keys should be ignored by the configuration validation processor
Definition: ArtConfig.hh:110
fhicl::Atom< double > waiting_time
&quot;waiting_time&quot; (Default: 600.0): Amount of time (in s) to wait for events from shared memory...
Definition: ArtConfig.hh:38
fhicl::OptionalSequence< fhicl::Tuple< artdaq::Fragment::type_t, std::string > > fragment_type_map
&quot;fragment_type_map&quot; (OPTIONAL): Additional types to register with the ArtdaqFragmentNamingServiceInte...
Definition: ArtConfig.hh:25