DAQInterface functions to send trace_set and trace_get commands to all artdaq processes
We are working on improving the OTS console display, and one feature that would be really nice to have would be the ability to adjust TRACE levels from within the ots GUI environment. However, since we now use DAQInterface to manage artdaq, it is possible for artdaq processes to run on hosts where there are no ots processes, and it would be most convenient to have the artdaq processes manage their TRACE levels themselves in that case.
What I would like is a couple of functions in the rc.control.daqinterface object which send trace_get and trace_set XMLRPC commands to the artdaq processes, and collect the output and present it in some reasonable way in the returned string/object.
JCF: Issue #23792: rudimentary, proof-of-concept implementation of trace_get call from DAQInterface
JCF: Issue #23792: wrap up implementation of trace_get, with trace_get.sh script provided
JCF: Issue #23792: added support for trace_set with the assumption that artdaq's trace_set takes the mask in string form (see soon-to-be-filed artdaq Issue)
JCF: Issue #23792: change order of trace_set arguments to masktype, name, mask rather than name, masktype, mask
JCF: Issue #23792: make sure the new trace_set argument order of name, type, mask appears everywhere + remove a couple of debug prints
#2 Updated by John Freeman 9 months ago
- % Done changed from 0 to 100
- Status changed from New to Resolved
This issue is resolved with commit 930e425dc822fb70fd45e4b4f2405ff52eb5b64f at the head of feature/23792_trace_get_and_set. DAQInterface now has functions "trace_get" and "trace_set" which calls the functions of the same name on the individual artdaq processes via XML-RPC. While typically under otsdaq I believe a DAQInterface object has its functions called directly, it's also possible to call the DAQInterface trace_get and trace_set functions via two scripts I've added. Surprise, they're named trace_set.sh and trace_get.sh.
One thing to be aware of is that these calls express the mask as a string, rather than an integer; for this reason you'll need to be using an artdaq which includes the fix described in Issue #23824.
#4 Updated by Eric Flumerfelt 9 months ago
- Assignee set to John Freeman
- Co-Assignees Eric Flumerfelt added
I have tested this functionality, and made a couple tweaks on the daqinterface branch, related to #23824. I think it's really interesting that python didn't support the XMLRPC i8 data type until version 3.6, and it is still not clear if an actual 64-bit value will work properly from a python client. daqinterface|45f21274be52
#5 Updated by John Freeman 9 months ago
- Status changed from Resolved to Reviewed
At the head of feature/23792_trace_get_and_set, I've confirmed that trace_set and trace_get continue to work, and that the trace_set arguments are in name, type, mask order everywhere. The artdaq version on which my tests were done was commit f42d46947a03 on the feature/23824_fix_trace_set branch. However, DAQInterface continues to work with artdaq versions which predate feature/23824_fix_trace_set and thus expect the run number to be sent as a string rather than an int.