1 #include "proto/artdaqapp.hh"
2 #include "artdaq/Application/LoadParameterSet.hh"
4 int main(
int argc,
char* argv[])
8 fhicl::TableFragment<artdaq::artdaqapp::Config> artdaqapp_config;
9 fhicl::Atom<std::string> app_type{ fhicl::Name{
"app_type"}, fhicl::Comment{
"Type of the artdaq application to run"},
"" };
12 fhicl::ParameterSet config_ps = LoadParameterSet<Config>(argc, argv,
"artdaq",
"This meta-application may be configured to run any of the core artdaq processes through the \"app_type\" configuration parameter.");
15 if (config_ps.has_key(
"app_type"))
17 task = artdaq::detail::StringToTaskType(config_ps.get<std::string>(
"app_type",
""));
18 if (task == artdaq::detail::TaskType::UnknownTask) {
19 task = artdaq::detail::IntToTaskType(config_ps.get<
int>(
"app_type"));
22 else if (config_ps.has_key(
"application_type"))
24 task = artdaq::detail::StringToTaskType(config_ps.get<std::string>(
"application_type",
""));
25 if (task == artdaq::detail::TaskType::UnknownTask) {
26 task = artdaq::detail::IntToTaskType(config_ps.get<
int>(
"application_type"));
29 artdaq::artdaqapp::runArtdaqApp(task, config_ps);
TaskType
The types of applications in artdaq.