artdaq  v3_08_00
ArtConfig.hh
1 #include "art/Framework/Core/OutputModule.h"
2 #include "art/Framework/IO/ClosingCriteria.h"
3 #include "fhiclcpp/types/Atom.h"
4 #include "fhiclcpp/types/Sequence.h"
5 #include "fhiclcpp/types/Tuple.h"
6 #include "fhiclcpp/types/OptionalAtom.h"
7 #include "fhiclcpp/types/OptionalSequence.h"
8 #include "fhiclcpp/types/OptionalTable.h"
9 #include "fhiclcpp/types/Table.h"
10 #include "artdaq-utilities/Plugins/MetricManager.hh"
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. ArtdaqDemoFragmentNamingService)"} };
21  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" };
23  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"}};
24  };
25 
30  {
32  fhicl::Atom<std::string> service_provider{ fhicl::Name{"service_provider"}, fhicl::Comment{"Name of the provider for the ArtdaqSharedMemoryServiceInterface (e.g. ArtdaqSharedMemoryService)"} };
34  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};
36  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};
38  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};
40  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."}};
42  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."}};
44  fhicl::OptionalTable<artdaq::MetricManager::Config> metrics{ fhicl::Name{"metrics"}, fhicl::Comment{"Configuration for artdaq Metrics"}};
45 
46  };
47 
52  {
53  fhicl::Table< ArtdaqSharedMemoryServiceInterfaceConfig> ArtdaqSharedMemoryServiceInterface{ fhicl::Name{"ArtdaqSharedMemoryServiceInterface"} };
54  fhicl::OptionalTable<ArtdaqFragmentNamingServiceInterfaceConfig> ArtdaqFragmentNamingServiceInterface{ fhicl::Name{"ArtdaqFragmentNamingServiceInterface"} };
55  };
56 
58  {};
60  {};
62  {};
63 
68  {
69  fhicl::Table<AnalyzersConfig> analyzers{ fhicl::Name{"analyzers"} };
70  fhicl::Table<ProducersConfig> producers{ fhicl::Name{"producers"} };
71  fhicl::Table<FiltersConfig> filters{ fhicl::Name{"filters"} };
72  fhicl::Sequence<std::string> my_output_modules{ fhicl::Name{"my_output_modules"}, fhicl::Comment{"Output modules (configured in the outputs block) to use"} };
74  };
75 
80  {
81  using Name = fhicl::Name;
82  using Comment = fhicl::Comment;
83  template<typename T>
85  using Atom = fhicl::Atom<T>;
87  template<typename T>
88  using OptionalAtom = fhicl::OptionalAtom<T>;
89 
90  fhicl::TableFragment<art::OutputModule::Config> omConfig;
91  Atom<std::string> catalog{ Name("catalog"), "" };
92  OptionalAtom<bool> dropAllEvents{ Name("dropAllEvents") };
93  Atom<bool> dropAllSubRuns{ Name("dropAllSubRuns"), false };
94  OptionalAtom<bool> fastCloning{ Name("fastCloning") };
95  Atom<std::string> tmpDir{ Name("tmpDir"), "/tmp" };
96  Atom<int> compressionLevel{ Name("compressionLevel"), 7 };
97  Atom<int64_t> saveMemoryObjectThreshold{ Name("saveMemoryObjectThreshold"), -1l };
98  Atom<int64_t> treeMaxVirtualSize{ Name("treeMaxVirtualSize"), -1 };
99  Atom<int> splitLevel{ Name("splitLevel"), 99 };
100  Atom<int> basketSize{ Name("basketSize"), 16384 };
101  Atom<bool> dropMetaDataForDroppedData{ Name("dropMetaDataForDroppedData"), false };
102  Atom<std::string> dropMetaData{ Name("dropMetaData"), "NONE" };
103  Atom<bool> writeParameterSets{ Name("writeParameterSets"), true };
104  fhicl::Table<ClosingCriteria::Config> fileProperties{ Name("fileProperties") };
105 
110  {
115  std::set<std::string> operator()() const
116  {
117  std::set<std::string> keys{ art::OutputModule::Config::KeysToIgnore::get() };
118  keys.insert("results");
119  return keys;
120  }
121  };
122  };
123 
128  {
129  fhicl::OptionalTable<art::OutputModule::Config> rootNetOutput{ fhicl::Name{"rootNetOutput"} };
130  fhicl::OptionalTable<RootOutputConfig> normalOutput{ fhicl::Name{"normalOutput"} };
131  fhicl::OptionalTable<RootOutputConfig> rootDAQOutFile{ fhicl::Name{"rootDAQOutFile"} };
132  };
133 
138  {
140  fhicl::Atom<std::string> module_type{ fhicl::Name{"module_type"}, fhicl::Comment{"Module type of source. Should be \"ArtdaqInput\""} };
142  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 };
144  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" };
146  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 };
147  };
148 
152  struct Config
153  {
154  fhicl::Table<art::ServicesConfig> services{ fhicl::Name{"services"} };
155  fhicl::Table<art::PhysicsConfig> physics{ fhicl::Name{"physics"} };
156  fhicl::Table<art::OutputsConfig> outputs{ fhicl::Name{"outputs"} };
157  fhicl::Table<art::SourceConfig> source{ fhicl::Name{"source"} };
158  fhicl::Atom<std::string> process_name{ fhicl::Name{"process_name"}, fhicl::Comment{"Name of this art processing job"}, "DAQ" };
160  };
161 } // namespace art
Atom< bool > dropAllSubRuns
Whether to drop all subruns ???
Definition: ArtConfig.hh:93
Atom< int64_t > saveMemoryObjectThreshold
???
Definition: ArtConfig.hh:97
fhicl::Table< FiltersConfig > filters
Definition: ArtConfig.hh:71
fhicl::TableFragment< art::OutputModule::Config > omConfig
Configuration common to all OutputModules.
Definition: ArtConfig.hh:90
Atom< int > splitLevel
???
Definition: ArtConfig.hh:99
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:88
fhicl::Atom< T > Atom
Configuration Parameter.
Definition: ArtConfig.hh:85
Atom< int > basketSize
???
Definition: ArtConfig.hh:100
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:40
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:73
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:21
Configuration for the source block of artdaq art processes
Definition: ArtConfig.hh:137
Atom< bool > dropMetaDataForDroppedData
???
Definition: ArtConfig.hh:101
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:42
fhicl::Table< art::PhysicsConfig > physics
Physics block.
Definition: ArtConfig.hh:155
Artdaq does not provide any producers.
Definition: ArtConfig.hh:59
Configuration for the ArtdaqSharedMemoryServiceInterface
Definition: ArtConfig.hh:29
Required configuration for art processes started by artdaq, with artdaq-specific defaults where appli...
Definition: ArtConfig.hh:152
Atom< int > compressionLevel
Compression level to use. artdaq recommends &lt;= 3.
Definition: ArtConfig.hh:96
fhicl::OptionalTable< RootOutputConfig > normalOutput
Normal art/ROOT output.
Definition: ArtConfig.hh:130
fhicl::OptionalTable< artdaq::MetricManager::Config > metrics
&quot;metrics&quot; (OPTIONAL): Configuration for artdaq Metrics
Definition: ArtConfig.hh:44
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:38
fhicl::Name Name
Parameter Name.
Definition: ArtConfig.hh:81
fhicl::Table< art::OutputsConfig > outputs
Outputs block.
Definition: ArtConfig.hh:156
Confgiguration for ROOT output modules
Definition: ArtConfig.hh:79
Atom< std::string > dropMetaData
Which metadata to drop (Default: &quot;NONE&quot;)
Definition: ArtConfig.hh:102
Configuration for the outputs block of artdaq art processes
Definition: ArtConfig.hh:127
fhicl::Atom< std::string > process_name
&quot;process_name&quot; (Default: &quot;DAQ&quot;): Name of this art processing job
Definition: ArtConfig.hh:159
fhicl::OptionalTable< art::OutputModule::Config > rootNetOutput
For transferring data from EventBuilders to DataLoggers.
Definition: ArtConfig.hh:129
fhicl::Atom< std::string > service_provider
&quot;service_provider&quot; (REQUIRED): Name of the provider for the ArtdaqSharedMemoryServiceInterface (e...
Definition: ArtConfig.hh:32
Configuration of the physics block for artdaq art processes
Definition: ArtConfig.hh:67
fhicl::Atom< bool > register_fragment_types
&quot;register_fragment_types&quot; (Default: true): Whether ArtdaqInputHelper should register the known Frag...
Definition: ArtConfig.hh:146
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:142
fhicl::Table< ClosingCriteria::Config > fileProperties
When should the file be closed.
Definition: ArtConfig.hh:104
fhicl::Table< AnalyzersConfig > analyzers
Analyzer module configuration.
Definition: ArtConfig.hh:69
Atom< int64_t > treeMaxVirtualSize
???
Definition: ArtConfig.hh:98
Configuration of the services block for artdaq art processes
Definition: ArtConfig.hh:51
Atom< bool > writeParameterSets
Write art ParameterSet to output file (Default: true)
Definition: ArtConfig.hh:103
fhicl::Table< art::SourceConfig > source
Definition: ArtConfig.hh:157
fhicl::Atom< std::string > module_type
&quot;module_type&quot;: REQUIRED: Module type of source. Should be &quot;ArtdaqInput&quot;
Definition: ArtConfig.hh:140
fhicl::Table< ProducersConfig > producers
Producer module configuration.
Definition: ArtConfig.hh:70
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:144
OptionalAtom< bool > dropAllEvents
Whether to drop all events ???
Definition: ArtConfig.hh:92
std::set< std::string > operator()() const
Get the keys to ignore
Definition: ArtConfig.hh:115
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:94
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:34
fhicl::Table< art::ServicesConfig > services
Services block.
Definition: ArtConfig.hh:154
Atom< std::string > tmpDir
Temporary directory.
Definition: ArtConfig.hh:95
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:131
fhicl::Comment Comment
Definition: ArtConfig.hh:82
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:91
These keys should be ignored by the configuration validation processor
Definition: ArtConfig.hh:109
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:36
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:23