Conversation
…og entry; allow for consolidated ECL logs at run-stop
| writeRunInfoTransition( | ||
| RunInfoVInterface::RunTransitionType::HALT, | ||
| getLastLogEntry(RunControlStateMachine::HALT_TRANSITION_NAME)); | ||
| writeRunInfoTransition(RunInfoVInterface::RunTransitionType::HALT_COMPLETE, ""); |
There was a problem hiding this comment.
Why is this back to back? shouldnt ```
writeRunInfoTransition(
RunInfoVInterface::RunTransitionType::HALT,
getLastLogEntry(RunControlStateMachine::HALT_TRANSITION_NAME));
rrivera747
left a comment
There was a problem hiding this comment.
Looks good, but I dont understand the location of ```
writeRunInfoTransition(
RunInfoVInterface::RunTransitionType::HALT,
getLastLogEntry(RunControlStateMachine::HALT_TRANSITION_NAME));
There was a problem hiding this comment.
Pull request overview
This PR enhances end-of-run logging by recording transitions in two steps (e.g., STOP and STOP_COMPLETE) so that a “stop started” record exists even if the transition later fails, and a “completed” record confirms success. It also adds support for writing a consolidated end-of-run summary to the logbook/ECL with an option to suppress the usual footer.
Changes:
- Add
STOP_COMPLETEandHALT_COMPLETErun transition types and use them to implement two-step end-of-run transition logging. - Write the STOP transition record at the start of
transitionStopping()and write STOP_COMPLETE upon reachingstateConfigured(). - Extend system log entry creation to pass a
SkipFooterparameter to logbook supervisors and add end-of-run consolidated ECL summary generation.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
otsdaq/GatewaySupervisor/GatewaySupervisor.h |
Adds Run Info interface usage, new helper declaration, and new cached fields used for two-step logging and consolidated summaries. |
otsdaq/GatewaySupervisor/GatewaySupervisor.cc |
Implements two-step STOP/HALT DB updates, raw comment caching, consolidated end-of-run ECL entry, and SkipFooter plumbing for logbook SOAP calls. |
otsdaq/FiniteStateMachine/RunInfoVInterface.h |
Extends RunTransitionType with STOP_COMPLETE and HALT_COMPLETE to support transition completion markers. |
| if(command == "Stop") | ||
| activeStateMachineWriteToEcl_ = | ||
| (CgiDataUtilities::postData(cgiIn, "writeToEcl") == "1"); |
| stateMachineTransitionUsername_ = | ||
| username; // set the username for this transition attempt (used for logging and logbook entry) | ||
|
|
||
| if(logEntry != "") | ||
| { | ||
| if(command == RunControlStateMachine::START_TRANSITION_NAME) | ||
| { | ||
| activeStateMachineRawStartComment_ = logEntry; | ||
| activeStateMachineRawStopComment_.clear(); | ||
| } | ||
| else if(command == RunControlStateMachine::STOP_TRANSITION_NAME) | ||
| activeStateMachineRawStopComment_ = logEntry; | ||
|
|
| // Write consolidated end-of-run summary to ECL if enabled via env var and user didn't opt out | ||
| bool doLogConsolidated = true; //default to logging consolidated run summary | ||
| try |
| ConfigurationTree configLinkNode = | ||
| CorePropertySupervisorBase::theConfigurationManager_->getSupervisorTableNode( | ||
| supervisorContextUID_, supervisorApplicationUID_); | ||
| if(!configLinkNode.isDisconnected()) | ||
| { |
| START, | ||
| STOP_COMPLETE, | ||
| HALT_COMPLETE |
Log two transitions and run ends: one when the stop starts to ensure the record is present, and a second to confirm the transition was successful.