Project

General

Profile

Feature #24129

DAQInterface should allow for the possibility of a trace script executing before start and after stop

Added by John Freeman 7 months ago. Updated 7 months ago.

Status:
Reviewed
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Start date:
03/04/2020
Due date:
% Done:

100%

Estimated time:
Experiment:
-
Co-Assignees:
Duration:

Description

A while ago, on Ron's request, I gave DAQInterface the ability to execute a script "/nfs/sw/control_files/trace/trace_control.sh" on the ProtoDUNE cluster. It was suggested at this week's meeting that this be made a generic feature for all experiments. After conversation with Ron, we agreed on the following:
  • The name of the script should be set by an optional environment variable, DAQINTERFACE_TRACE_SCRIPT
  • Since /nfs/sw/control_files/trace/trace_control.sh doesn't contain any experiment-specific info, it should be added somewhere in the DAQInterface repo if people want to use it
  • If the script returns nonzero, DAQInterface should throw an exception rather than merely printing out a warning

Associated revisions

Revision 0bfe126e (diff)
Added by John Freeman 7 months ago

JCF: Issue #24129: add check for DAQINTERFACE_TRACE_SCRIPT variable

Revision a6e3bafb (diff)
Added by John Freeman 7 months ago

JCF: Issue #24129: if the bin/trace_control.sh script is run as-is, have it exit out immediately with an error message explaining why this can't be done

Revision 85db0201 (diff)
Added by John Freeman 7 months ago

JCF: Issue #24129: finalize support for DAQINTERFACE_TRACE_SCRIPT, including appropriate error messages for when things aren't set up correctly

Revision a5852f83 (diff)
Added by John Freeman 7 months ago

JCF: Issue #24129: add check for DAQINTERFACE_TRACE_SCRIPT variable

Revision 4e7952c7 (diff)
Added by John Freeman 7 months ago

JCF: Issue #24129: if the bin/trace_control.sh script is run as-is, have it exit out immediately with an error message explaining why this can't be done

Revision a899ac8a (diff)
Added by John Freeman 7 months ago

JCF: Issue #24129: finalize support for DAQINTERFACE_TRACE_SCRIPT, including appropriate error messages for when things aren't set up correctly

History

#1 Updated by John Freeman 7 months ago

  • % Done changed from 0 to 100
  • Status changed from New to Resolved

Resolved with commit 85db020188d47700102b40b00e9ac3f88a1791cc at the head of feature/24129_trace_script. If the user defines a script $DAQINTERFACE_TRACE_SCRIPT, DAQInterface will execute it just before sending the start transitions to the artdaq processes and just after sending the stop transitions to the artdaq processes with an argument list that looks, e.g., like the following:

/home/jcfree/Documents/trace_control.sh /tmp/delete_this_trace --run 3526 --transition start --node-list="mu2edaq13 mu2edaq12 localhost" 

The following conditions have to hold, however, otherwise you'll get an error condition if you've got DAQINTERFACE_TRACE_SCRIPT defined for DAQInterface:
  • The file $DAQINTERFACE_TRACE_SCRIPT actually has to exist
  • TRACE_FILE must be defined in the DAQ setup script
  • The trace script, when executed, must return 0
  • The trace script must not be in a subdirectory of the ups/git repo itself (pointed to by $ARTDAQ_DAQINTERFACE_DIR)

A sample trace_control.sh script has been added to the bin/ subdirectory of the DAQInterface package. Note that you can't execute it as-is, both because its location violates the location rule described above, and also because there's ProtoDUNE-cluster specific code in it.

#2 Updated by Gennadiy Lukhanin 7 months ago

  • Status changed from Resolved to Reviewed

Capturing of trace buffers works as expected. I ran tests on mu2edaq13 and icarus. However, there is a small wrinkle -- no errors are reported if the directory pointed by the trace_control_logfile variable in trace_control.sh does not exist. I've cut a test release v3_07_02CH11c7c4 and deployed it to /software/product_dev for icarus and sbnd.



Also available in: Atom PDF