artdaq  v3_02_01
ArtConfig.hh
1 #include "fhiclcpp/types/Atom.h"
2 #include "fhiclcpp/types/Table.h"
3 #include "fhiclcpp/types/OptionalAtom.h"
4 #include "fhiclcpp/types/OptionalTable.h"
5 #include "artdaq/ArtModules/NetMonTransportService.h"
6 #include "artdaq/ArtModules/RootNetOutput.hh"
7 #include "art/Framework/Core/OutputModule.h"
8 #if ART_HEX_VERSION >= 0x21002
9 # include "art/Framework/IO/ClosingCriteria.h"
10 #else
11 # include "art/Framework/IO/Root/RootOutputClosingCriteria.h"
12 #endif
13 
14 namespace art {
19  {
21  fhicl::Atom<bool> errorOnFailureToPut{ fhicl::Name{"errorOnFailureToPut"}, fhicl::Comment{"This parameter is necessary for correct function of artdaq. Do not modify."}, false };
22  };
27  {
28  fhicl::Table<ServicesSchedulerConfig> scheduler{ fhicl::Name{"scheduler"} };
29  fhicl::OptionalTable<NetMonTransportService::Config> netMonTransportServiceInterface{ fhicl::Name{ "NetMonTransportServiceInterface" } };
30  };
31 
32  struct AnalyzersConfig {};
33  struct ProducersConfig {};
34  struct FiltersConfig {};
35 
40  {
41  fhicl::Table<AnalyzersConfig> analyzers{ fhicl::Name{"analyzers"} };
42  fhicl::Table<ProducersConfig> producers{ fhicl::Name{"producers"} };
43  fhicl::Table<FiltersConfig> filters{ fhicl::Name{"filters"} };
44  fhicl::Sequence<std::string> my_output_modules{ fhicl::Name{"my_output_modules"}, fhicl::Comment{"Output modules (configured in the outputs block) to use"} };
46  };
47 
52  {
53  using Name = fhicl::Name;
54  using Comment = fhicl::Comment;
55  template <typename T> using Atom = fhicl::Atom<T>;
58  template <typename T> using OptionalAtom = fhicl::OptionalAtom<T>;
59 
60  fhicl::TableFragment<art::OutputModule::Config> omConfig;
61  Atom<std::string> catalog{ Name("catalog"), "" };
62  OptionalAtom<bool> dropAllEvents{ Name("dropAllEvents") };
63  Atom<bool> dropAllSubRuns{ Name("dropAllSubRuns"), false };
64  OptionalAtom<bool> fastCloning{ Name("fastCloning") };
65  Atom<std::string> tmpDir{ Name("tmpDir"), "/tmp" };
66  Atom<int> compressionLevel{ Name("compressionLevel"), 7 };
67  Atom<int64_t> saveMemoryObjectThreshold{ Name("saveMemoryObjectThreshold"), -1l };
68  Atom<int64_t> treeMaxVirtualSize{ Name("treeMaxVirtualSize"), -1 };
69  Atom<int> splitLevel{ Name("splitLevel"), 99 };
70  Atom<int> basketSize{ Name("basketSize"), 16384 };
71  Atom<bool> dropMetaDataForDroppedData{ Name("dropMetaDataForDroppedData"), false };
72  Atom<std::string> dropMetaData{ Name("dropMetaData"), "NONE" };
73  Atom<bool> writeParameterSets{ Name("writeParameterSets"), true };
74  fhicl::Table<ClosingCriteria::Config> fileProperties{ Name("fileProperties") };
75 
79  struct KeysToIgnore
80  {
85  std::set<std::string> operator()() const
86  {
87  std::set<std::string> keys{ art::OutputModule::Config::KeysToIgnore::get() };
88  keys.insert("results");
89  return keys;
90  }
91  };
92 
93  };
94 
99  {
100  fhicl::OptionalTable<art::RootNetOutput::Config> rootNetOutput{ fhicl::Name{"rootNetOutput"} };
101  fhicl::OptionalTable<RootOutputConfig> normalOutput{ fhicl::Name{"normalOutput"} };
102  fhicl::OptionalTable<RootOutputConfig> rootDAQOutFile{ fhicl::Name{"rootDAQOutFile"} };
103  };
104 
109  {
111  fhicl::Atom<std::string> module_type{ fhicl::Name{ "module_type" }, fhicl::Comment{ "Module type of source. Should be \"RawInput\", \"NetMonInput\", or an experiment-defined input type (e.g. \"DemoInput\")" } };
112  };
113 
117  struct Config
118  {
119  fhicl::Table<art::ServicesConfig> services{ fhicl::Name{"services"} };
120  fhicl::Table<art::PhysicsConfig> physics{ fhicl::Name{"physics"} };
121  fhicl::Table<art::OutputsConfig> outputs{ fhicl::Name{"outputs"} };
122  fhicl::Table<art::SourceConfig> source{ fhicl::Name{"source"} };
123  fhicl::Atom<std::string> process_name{ fhicl::Name{"process_name" },fhicl::Comment{"Name of this art processing job"}, "DAQ" };
125  };
126 }
Atom< bool > dropAllSubRuns
Whether to drop all subruns ???
Definition: ArtConfig.hh:63
fhicl::OptionalTable< NetMonTransportService::Config > netMonTransportServiceInterface
Configuration for the NetMonTranportService. See art::NetMonTransportService::Config.
Definition: ArtConfig.hh:29
Atom< int64_t > saveMemoryObjectThreshold
???
Definition: ArtConfig.hh:67
fhicl::Table< FiltersConfig > filters
Definition: ArtConfig.hh:43
fhicl::TableFragment< art::OutputModule::Config > omConfig
Configuration common to all OutputModules.
Definition: ArtConfig.hh:60
Atom< int > splitLevel
???
Definition: ArtConfig.hh:69
fhicl::OptionalAtom< T > OptionalAtom
Optional Configuration Parameter.
Definition: ArtConfig.hh:58
fhicl::Atom< T > Atom
Configuration Parameter.
Definition: ArtConfig.hh:56
Atom< int > basketSize
???
Definition: ArtConfig.hh:70
fhicl::Sequence< std::string > my_output_modules
Output modules (configured in the outputs block) to use.
Definition: ArtConfig.hh:45
Configuration for the source block of artdaq art processes
Definition: ArtConfig.hh:108
Atom< bool > dropMetaDataForDroppedData
???
Definition: ArtConfig.hh:71
Configuration of the services.scheduler block for artdaq art processes
Definition: ArtConfig.hh:18
fhicl::Table< art::PhysicsConfig > physics
Physics block.
Definition: ArtConfig.hh:120
Artdaq does not provide any producers.
Definition: ArtConfig.hh:33
Required configuration for art processes started by artdaq, with artdaq-specific defaults where appli...
Definition: ArtConfig.hh:117
Atom< int > compressionLevel
Compression level to use. artdaq recommends &lt;= 3.
Definition: ArtConfig.hh:66
fhicl::OptionalTable< RootOutputConfig > normalOutput
Normal art/ROOT output.
Definition: ArtConfig.hh:101
fhicl::Name Name
Parameter Name.
Definition: ArtConfig.hh:53
fhicl::Table< art::OutputsConfig > outputs
Outputs block.
Definition: ArtConfig.hh:121
Confgiguration for ROOT output modules
Definition: ArtConfig.hh:51
Atom< std::string > dropMetaData
Which metadata to drop (Default: &quot;NONE&quot;)
Definition: ArtConfig.hh:72
Configuration for the outputs block of artdaq art processes
Definition: ArtConfig.hh:98
fhicl::Atom< std::string > process_name
&quot;process_name&quot; (Default: &quot;DAQ&quot;): Name of this art processing job
Definition: ArtConfig.hh:124
Configuration of the physics block for artdaq art processes
Definition: ArtConfig.hh:39
fhicl::Table< ClosingCriteria::Config > fileProperties
When should the file be closed.
Definition: ArtConfig.hh:74
fhicl::Atom< bool > errorOnFailureToPut
&quot;errorOnFailureToPut&quot; (Default: false): This parameter is necessary for correct function of artdaq...
Definition: ArtConfig.hh:21
fhicl::Table< AnalyzersConfig > analyzers
Analyzer module configuration.
Definition: ArtConfig.hh:41
fhicl::Table< ServicesSchedulerConfig > scheduler
Artdaq requires a services.scheduler parameter. See art::ServicesSchedulerConfig. ...
Definition: ArtConfig.hh:28
Atom< int64_t > treeMaxVirtualSize
???
Definition: ArtConfig.hh:68
Configuration of the services block for artdaq art processes
Definition: ArtConfig.hh:26
Atom< bool > writeParameterSets
Write art ParameterSet to output file (Default: true)
Definition: ArtConfig.hh:73
fhicl::Table< art::SourceConfig > source
Definition: ArtConfig.hh:122
fhicl::Atom< std::string > module_type
&quot;module_type&quot;: Module type of source. Should be &quot;RawInput&quot;, &quot;NetMonInput&quot;, or an experiment-defined i...
Definition: ArtConfig.hh:111
fhicl::Table< ProducersConfig > producers
Producer module configuration.
Definition: ArtConfig.hh:42
fhicl::OptionalTable< art::RootNetOutput::Config > rootNetOutput
For transferring data from EventBuilders to DataLoggers.
Definition: ArtConfig.hh:100
OptionalAtom< bool > dropAllEvents
Whether to drop all events ???
Definition: ArtConfig.hh:62
std::set< std::string > operator()() const
Get the keys to ignore
Definition: ArtConfig.hh:85
OptionalAtom< bool > fastCloning
Whether to try to use fastCloning on the file.
Definition: ArtConfig.hh:64
fhicl::Table< art::ServicesConfig > services
Services block.
Definition: ArtConfig.hh:119
Atom< std::string > tmpDir
Temporary directory.
Definition: ArtConfig.hh:65
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:102
fhicl::Comment Comment
Definition: ArtConfig.hh:54
Atom< std::string > catalog
???
Definition: ArtConfig.hh:61
These keys should be ignored by the configuration validation processor
Definition: ArtConfig.hh:79