302 __debug_abort_on_wrong_size_<CLBCommonHeader>(40);
303 __debug_abort_on_wrong_size_<DAQCommonHeader>(56);
304 __debug_abort_on_wrong_size_<UTCTime>(8);
306 std::string server(
"localhost");
307 std::string logger(
"localhost");
308 std::string client_name(
"DataQueue");
311 po::options_description desc(
"Options");
313 (
"help,h",
"Print this help and exit.")
314 (
"version,v",
"Print the version and exit.")
315 (
"optical,o",
"Set the optical mode.")
316 (
"acoustic,a",
"Set the acoustic mode.")
318 po::value<std::string>(&server)->default_value(server),
319 "Set the address of the SM server.")
321 po::value<std::string>(&logger)->default_value(logger),
322 "Set the address of the logger server.")
324 po::value<std::string>(&client_name)->default_value(client_name),
325 "Set the address of the client name.")
327 po::value<int>(&debug)->default_value(debug),
328 "Set the debug level.");
330 bool acou =
false, opto =
false;
334 po::variables_map vm;
336 po::command_line_parser(argc, argv).options(desc).run(),
339 if (vm.count(
"help"))
341 std::cout << desc << std::endl;
345 if (vm.count(
"version"))
347 std::cout << dataqueue::version::v() << std::endl;
353 opto = vm.count(
"optical");
355 acou = vm.count(
"acoustic");
357 if (! (acou || opto))
359 throw std::runtime_error(
"FATAL: no mode specified. Use -o, -a or both. See the help.");
362 catch (
const po::error& e)
364 std::cerr <<
"DataQueue: Error: " << e.what() <<
'\n'
365 << desc << std::endl;
368 catch (
const std::runtime_error& e)
370 std::cerr <<
"DataQueue: Error: " << e.what() <<
'\n'
371 << desc << std::endl;
391 dqueue.setClockInterval(30*1000*1000);
void initLogger(JLOGGER::JMessageLoggerThreadSafe const &second)
Message logging based on ControlHost.
static InBufferCollector & getCollector()
void store(const JString &file_name, const JDetector &detector)
Store detector to output file.
Thread-safe message logger.