@@ -35,13 +35,13 @@ StackErrorCounters delta_counters(const StackErrorCounters &prev, const StackErr
35
35
std::begin (result.stackErrors ),
36
36
util::delta_map<ErrorInfoCounts>);
37
37
38
- result.nonErrorFrames = calc_delta0 (curr.nonErrorFrames , prev.nonErrorFrames );
39
- result.nonErrorHeaderCounts = delta_map (prev.nonErrorHeaderCounts , curr.nonErrorHeaderCounts );
38
+ result.nonErrorFrames = util:: calc_delta0 (curr.nonErrorFrames , prev.nonErrorFrames );
39
+ result.nonErrorHeaderCounts = util:: delta_map (prev.nonErrorHeaderCounts , curr.nonErrorHeaderCounts );
40
40
41
41
return result;
42
42
}
43
43
44
- #define CALC_DELTA0 (member ) result.member = calc_delta0(curr.member, prev.member)
44
+ #define CALC_DELTA0 (member ) result.member = util:: calc_delta0(curr.member, prev.member)
45
45
46
46
ReadoutWorker::Counters delta_counters (const ReadoutWorker::Counters &prev, const ReadoutWorker::Counters &curr)
47
47
{
@@ -59,7 +59,7 @@ ReadoutWorker::Counters delta_counters(const ReadoutWorker::Counters &prev, cons
59
59
std::transform (std::begin (prev.stackHits ), std::end (prev.stackHits ),
60
60
std::begin (curr.stackHits ),
61
61
std::begin (result.stackHits ),
62
- calc_delta0<size_t >);
62
+ util:: calc_delta0<size_t >);
63
63
64
64
// TODO eth::PipeStats
65
65
// TODO ListfileWriterCounters
@@ -328,7 +328,7 @@ int main(int argc, char *argv[])
328
328
329
329
// positional args
330
330
| lyra::arg (opt_crateConfig, " crateConfig" )
331
- (" crate config yaml file" ).required ()
331
+ (" crate config YAML or JSON file" ).required ()
332
332
333
333
| lyra::arg (opt_secondsToRun, " secondsToRun" )
334
334
(" duration the DAQ should run in seconds" ).optional ()
@@ -365,15 +365,6 @@ int main(int argc, char *argv[])
365
365
if (opt_logTrace)
366
366
set_global_log_level (spdlog::level::trace);
367
367
368
-
369
- std::ifstream inConfig (opt_crateConfig);
370
-
371
- if (!inConfig.is_open ())
372
- {
373
- cerr << " Error opening crate config " << argv[1 ] << " for reading." << endl;
374
- return 1 ;
375
- }
376
-
377
368
try
378
369
{
379
370
auto timeToRun = std::chrono::seconds (opt_secondsToRun);
@@ -382,11 +373,11 @@ int main(int argc, char *argv[])
382
373
383
374
try
384
375
{
385
- crateConfig = crate_config_from_yaml (inConfig );
376
+ crateConfig = crate_config_from_file (opt_crateConfig );
386
377
}
387
378
catch (const std::runtime_error &e)
388
379
{
389
- cerr << " Error parsing CrateConfig: " << e.what () << endl ;
380
+ cerr << fmt::format ( " Error loading CrateConfig from '{}': {} \n " , opt_crateConfig, e.what ()) ;
390
381
return 1 ;
391
382
}
392
383
@@ -515,7 +506,7 @@ int main(int argc, char *argv[])
515
506
}
516
507
517
508
MiniDaqCountersUpdate counters;
518
- Stopwatch sw;
509
+ util:: Stopwatch sw;
519
510
520
511
while (!rdo.finished ())
521
512
{
0 commit comments