artdaq  v3_12_02
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/TableFragment.h"
11 #include "fhiclcpp/types/Tuple.h"
12 
13 namespace art {
18 {
20  fhicl::Atom<std::string> service_provider{fhicl::Name{"service_provider"}, fhicl::Comment{"Name of the provider for the ArtdaqFragmentNamingServiceInterface (e.g. ArtdaqFragmentNamingService)"}};
22  fhicl::Atom<std::string> helper_plugin{fhicl::Name{"helper_plugin"}, fhicl::Comment{"Name of the helper plugin used by ArtdaqFragmentNamingService"}, "Artdaq"};
24  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"};
26  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"}};
27 };
28 
33 {
35  fhicl::Atom<std::string> service_provider{fhicl::Name{"service_provider"}, fhicl::Comment{"Name of the provider for the ArtdaqSharedMemoryServiceInterface (e.g. ArtdaqSharedMemoryService)"}};
37  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};
39  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};
41  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};
43  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."}};
45  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."}};
47  fhicl::OptionalTable<artdaq::MetricManager::Config> metrics{fhicl::Name{"metrics"}, fhicl::Comment{"Configuration for artdaq Metrics"}};
48 };
49 
54 {
55  fhicl::Table<ArtdaqSharedMemoryServiceInterfaceConfig> ArtdaqSharedMemoryServiceInterface{fhicl::Name{"ArtdaqSharedMemoryServiceInterface"}};
56  fhicl::OptionalTable<ArtdaqFragmentNamingServiceInterfaceConfig> ArtdaqFragmentNamingServiceInterface{fhicl::Name{"ArtdaqFragmentNamingServiceInterface"}};
57 };
58 
60 {};
62 {};
64 {};
65 
70 {
71  fhicl::Table<AnalyzersConfig> analyzers{fhicl::Name{"analyzers"}};
72  fhicl::Table<ProducersConfig> producers{fhicl::Name{"producers"}};
73  fhicl::Table<FiltersConfig> filters{fhicl::Name{"filters"}};
74  fhicl::Sequence<std::string> my_output_modules{fhicl::Name{"my_output_modules"}, fhicl::Comment{"Output modules (configured in the outputs block) to use"}};
76 };
77 
82 {
83  using Name = fhicl::Name;
84  using Comment = fhicl::Comment;
85  template<typename T>
87  using Atom = fhicl::Atom<T>;
89  template<typename T>
90  using OptionalAtom = fhicl::OptionalAtom<T>;
91 
92  fhicl::TableFragment<art::OutputModule::Config> omConfig;
93  Atom<std::string> catalog{Name("catalog"), ""};
95  Atom<bool> dropAllSubRuns{Name("dropAllSubRuns"), false};
97  Atom<std::string> tmpDir{Name("tmpDir"), "/tmp"};
98  Atom<int> compressionLevel{Name("compressionLevel"), 7};
99  Atom<int64_t> saveMemoryObjectThreshold{Name("saveMemoryObjectThreshold"), -1l};
100  Atom<int64_t> treeMaxVirtualSize{Name("treeMaxVirtualSize"), -1};
101  Atom<int> splitLevel{Name("splitLevel"), 99};
102  Atom<int> basketSize{Name("basketSize"), 16384};
103  Atom<bool> dropMetaDataForDroppedData{Name("dropMetaDataForDroppedData"), false};
104  Atom<std::string> dropMetaData{Name("dropMetaData"), "NONE"};
105  Atom<bool> writeParameterSets{Name("writeParameterSets"), true};
106  fhicl::Table<ClosingCriteria::Config> fileProperties{Name("fileProperties")};
107 
112  {
117  std::set<std::string> operator()() const
118  {
119  std::set<std::string> keys{art::OutputModule::Config::KeysToIgnore::get()};
120  keys.insert("results");
121  return keys;
122  }
123  };
124 };
125 
130 {
131  fhicl::OptionalTable<art::OutputModule::Config> rootNetOutput{fhicl::Name{"rootNetOutput"}};
132  fhicl::OptionalTable<RootOutputConfig> normalOutput{fhicl::Name{"normalOutput"}};
133  fhicl::OptionalTable<RootOutputConfig> rootDAQOutFile{fhicl::Name{"rootDAQOutFile"}};
134 };
135 
140 {
142  fhicl::Atom<std::string> module_type{fhicl::Name{"module_type"}, fhicl::Comment{"Module type of source. Should be \"ArtdaqInput\""}};
144  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};
146  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"};
148  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};
149 };
150 
154 struct Config
155 {
156  fhicl::Table<art::ServicesConfig> services{fhicl::Name{"services"}};
157  fhicl::Table<art::PhysicsConfig> physics{fhicl::Name{"physics"}};
158  fhicl::Table<art::OutputsConfig> outputs{fhicl::Name{"outputs"}};
159  fhicl::Table<art::SourceConfig> source{fhicl::Name{"source"}};
160  fhicl::Atom<std::string> process_name{fhicl::Name{"process_name"}, fhicl::Comment{"Name of this art processing job"}, "DAQ"};
162 };
163 } // namespace art
Atom< bool > dropAllSubRuns
Whether to drop all subruns ???
Definition: ArtConfig.hh:95
Atom< int64_t > saveMemoryObjectThreshold
???
Definition: ArtConfig.hh:99
fhicl::Table< FiltersConfig > filters
Definition: ArtConfig.hh:73
fhicl::TableFragment< art::OutputModule::Config > omConfig
Configuration common to all OutputModules.
Definition: ArtConfig.hh:92
Atom< int > splitLevel
???
Definition: ArtConfig.hh:101
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:90
fhicl::Atom< T > Atom
Configuration Parameter.
Definition: ArtConfig.hh:87
Atom< int > basketSize
???
Definition: ArtConfig.hh:102
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:43
Configuration for the ArtdaqFragmentNamingServiceInterface
Definition: ArtConfig.hh:17
fhicl::Sequence< std::string > my_output_modules
Output modules (configured in the outputs block) to use.
Definition: ArtConfig.hh:75
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:24
Configuration for the source block of artdaq art processes
Definition: ArtConfig.hh:139
Atom< bool > dropMetaDataForDroppedData
???
Definition: ArtConfig.hh:103
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:45
fhicl::Table< art::PhysicsConfig > physics
Physics block.
Definition: ArtConfig.hh:157
Artdaq does not provide any producers.
Definition: ArtConfig.hh:61
Configuration for the ArtdaqSharedMemoryServiceInterface
Definition: ArtConfig.hh:32
Required configuration for art processes started by artdaq, with artdaq-specific defaults where appli...
Definition: ArtConfig.hh:154
Atom< int > compressionLevel
Compression level to use. artdaq recommends &lt;= 3.
Definition: ArtConfig.hh:98
fhicl::OptionalTable< RootOutputConfig > normalOutput
Normal art/ROOT output.
Definition: ArtConfig.hh:132
fhicl::OptionalTable< artdaq::MetricManager::Config > metrics
&quot;metrics&quot; (OPTIONAL): Configuration for artdaq Metrics
Definition: ArtConfig.hh:47
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:41
fhicl::Name Name
Parameter Name.
Definition: ArtConfig.hh:83
fhicl::Table< art::OutputsConfig > outputs
Outputs block.
Definition: ArtConfig.hh:158
Confgiguration for ROOT output modules
Definition: ArtConfig.hh:81
Atom< std::string > dropMetaData
Which metadata to drop (Default: &quot;NONE&quot;)
Definition: ArtConfig.hh:104
Configuration for the outputs block of artdaq art processes
Definition: ArtConfig.hh:129
fhicl::Atom< std::string > process_name
&quot;process_name&quot; (Default: &quot;DAQ&quot;): Name of this art processing job
Definition: ArtConfig.hh:161
fhicl::OptionalTable< art::OutputModule::Config > rootNetOutput
For transferring data from EventBuilders to DataLoggers.
Definition: ArtConfig.hh:131
fhicl::Atom< std::string > service_provider
&quot;service_provider&quot; (REQUIRED): Name of the provider for the ArtdaqSharedMemoryServiceInterface (e...
Definition: ArtConfig.hh:35
Configuration of the physics block for artdaq art processes
Definition: ArtConfig.hh:69
fhicl::Atom< bool > register_fragment_types
&quot;register_fragment_types&quot; (Default: true): Whether ArtdaqInputHelper should register the known Frag...
Definition: ArtConfig.hh:148
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:144
fhicl::Table< ClosingCriteria::Config > fileProperties
When should the file be closed.
Definition: ArtConfig.hh:106
fhicl::Table< AnalyzersConfig > analyzers
Analyzer module configuration.
Definition: ArtConfig.hh:71
Atom< int64_t > treeMaxVirtualSize
???
Definition: ArtConfig.hh:100
Configuration of the services block for artdaq art processes
Definition: ArtConfig.hh:53
Atom< bool > writeParameterSets
Write art ParameterSet to output file (Default: true)
Definition: ArtConfig.hh:105
fhicl::Table< art::SourceConfig > source
Definition: ArtConfig.hh:159
fhicl::Atom< std::string > module_type
&quot;module_type&quot;: REQUIRED: Module type of source. Should be &quot;ArtdaqInput&quot;
Definition: ArtConfig.hh:142
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:22
fhicl::Table< ProducersConfig > producers
Producer module configuration.
Definition: ArtConfig.hh:72
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:146
OptionalAtom< bool > dropAllEvents
Whether to drop all events ???
Definition: ArtConfig.hh:94
std::set< std::string > operator()() const
Get the keys to ignore
Definition: ArtConfig.hh:117
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:96
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:37
fhicl::Table< art::ServicesConfig > services
Services block.
Definition: ArtConfig.hh:156
Atom< std::string > tmpDir
Temporary directory.
Definition: ArtConfig.hh:97
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:133
fhicl::Comment Comment
Definition: ArtConfig.hh:84
fhicl::Atom< std::string > service_provider
&quot;service_provider&quot; (REQUIRED): Name of the provider for the ArtdaqFragmentNamingServiceInterface (e...
Definition: ArtConfig.hh:20
Atom< std::string > catalog
???
Definition: ArtConfig.hh:93
These keys should be ignored by the configuration validation processor
Definition: ArtConfig.hh:111
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:39
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:26