This is related to my request question about the event-loop macro. I want to turn on tracking verbosity for just a few events deep in a very long job. So I wrote the following macro:
/control/getVal EVENT /CDMS/getEventID
/tracking/verbose 0
/control/doif {EVENT} == 150466 /tracking/verbose 1
/control/doif {EVENT} == 263804 /tracking/verbose 1
[...]
where /CDMS/getEventID
is a UI command we wrote ourselves to fetch the current event number in a way that is usable with GetCurrentValue()
.
I tested this with a simple /control/echo
action which printed out exactly the selected events.
But the above action is not working: tracking verbosity is not being turned on. I checked that the TrackingManager instantiates its own TrackingMessenger, and the TrackingManager is created by the EventManager, and the EventManager is a thread-local singleton. So in principle, the macro command above should be applied to the specific thread in which it’s invoked.
Am I missing something? Or do I need to modify our simulation framework with a code block to do what I want to do in this special case, because you can’t use the macro command the way I want to use it?