FACT++  1.0
int DataLogger::SetDebugOnOff ( const Event evt)
private

turn debug mode on and off

Parameters
evtthe current event. contains the instruction string: On, Off, on, off, ON, OFF, 0 or 1
Returns
the new state. Which, in that case, is the current state

Definition at line 1669 of file datalogger.cc.

References fDebugIsOn, EventImp::GetBool(), StateMachineImp::GetCurrentState(), MessageImp::Message(), DimWriteStatistics::SetDebugMode(), and str.

Referenced by DataLogger().

1670 {
1671  const bool backupDebug = fDebugIsOn;
1672 
1673  fDebugIsOn = evt.GetBool();
1674 
1675  if (fDebugIsOn == backupDebug)
1676  Message("Debug mode was already in the requested state.");
1677 
1678  ostringstream str;
1679  str << "Debug mode is now " << fDebugIsOn;
1680  Message(str);
1681 
1682  fFilesStats.SetDebugMode(fDebugIsOn);
1683 
1684  return GetCurrentState();
1685 }
DimWriteStatistics fFilesStats
Definition: datalogger.cc:235
int GetCurrentState() const
return the current state of the machine
char str[80]
Definition: test_client.c:7
bool fDebugIsOn
configuration flags
Definition: datalogger.cc:315
bool GetBool() const
Definition: EventImp.h:90
int Message(const std::string &str)
Definition: MessageImp.h:46

+ Here is the call graph for this function:

+ Here is the caller graph for this function: