FACT++  1.0
string StateMachineDim::SetCurrentState ( int  state,
const char *  txt = "",
const std::string &  cmd = "" 
)
protectedvirtual

This is an internal function to do some action in case of a state change, like updating the corresponding service.

Overwrite StateMachineImp::SetCurrentState. In addition to calling StateMachineImo::SetCurrentState the new state is also distributed via the DimService STATE.

For parameter description see StateMachineImp.

Reimplemented from StateMachineImp.

Definition at line 135 of file StateMachineDim.cc.

References fSrvState, StateMachineImp::SetCurrentState(), DimService::setQuality(), and DimDescribedService::Update().

Referenced by DataLogger::AddNewRunNumber(), DataLogger::GoToNightlyWriteErrorState(), DataLogger::GoToRunWriteErrorState(), DataLogger::infoCallback(), and DataLogger::Report().

136 {
137  const string msg = StateMachineImp::SetCurrentState(state, txt, cmd);
138  if (msg.empty())
139  return "";
140 
141  fSrvState.setQuality(state);
142  fSrvState.Update(msg);
143 
144  return msg;
145 }
void setQuality(int quality)
Definition: discpp.cxx:1256
DimDescribedService fSrvState
DimService propagating the state descriptions.
virtual std::string SetCurrentState(int state, const char *txt="", const std::string &cmd="")

+ Here is the call graph for this function:

+ Here is the caller graph for this function: