metrics fileName - path existance needs to be checked (and maybe adjusted) by daqinterface
When I ran the demo on a new system, no file metrics were produced because the metric file parent directories did not exist.
It would be extremely nice if an environment variable could be specified in the fileName fcl value.
It seems that daqinterface could (and perhaps should) make sure the parent directory exists.
In that case, either daqinterface could adjust the fileName (to resolve the variable) or both daqinterface and the metric code could be able to handle the classic shell variable syntax in
the fileName specification.
Maybe all the fileName specifications in all the simple_test_config's need to be adjusted to that a user of the demo
will get the file metrics he expects the first time the demo is run.
#1 Updated by John Freeman over 1 year ago
I'll address the points raised in this issue one-by-one:
"It would be extremely nice if an environment variable could be specified in the fileName fcl value.": that would be convenient, although a counterargument to that is that it would weaken the connection between the configuration chosen and what actually happens during the run. Is the idea that DAQInterface, if it saw a token like "$ENVVAR" in a FHiCL document, would just swap in the contents of $ENVVAR and throw an exception if the variable wasn't set?
"It seems that daqinterface could (and perhaps should) make sure the parent directory exists": do you mean in the sense of, DAQInterface should throw an exception if the directory doesn't exist, or it should actually create the directory?
"Maybe all the fileName specifications in all the simple_test_config's need to be adjusted to that a user of the demo will get the file metrics he expects the first time the demo is run": what we should probably do is make the necessary directories in quick-mrb-start.sh, so by the time run_demo.sh is called the output directories needed will already be there.
#2 Updated by John Freeman over 1 year ago
- % Done changed from 0 to 100
- Status changed from New to Resolved
After discussion at today's artdaq meeting, it was agreed that DAQInterface should provide a hook so experiments - including the "artdaq-demo experiment" - can implement these sorts of checks. This was done by adding check_config_base; see Issue #22806, to be reviewed by Wes.
#4 Updated by Ron Rechenmacher over 1 year ago
- Status changed from Resolved to Reviewed
merged artdaq_utilities feature/22823_FileMetric_RelativeDirectory into develop (added error
message if metrics file is not open).
mergeed artdaq_daqinterface feature/22823_simple_test_configs_FileMetricsToLogRoot into develop.
Artdaq_demo metrics files are now created under $ARTDAQ_LOG_ROOT/metrics.