Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

CPauseCommand Class Reference

#include <CPauseCommand.h>

Inheritance diagram for CPauseCommand:

CStateTransitionCommand List of all members.

Public Methods

 CPauseCommand ()
 Default constructor.

 ~CPauseCommand ()
 Destructor.

virtual int operator() (CTCLInterpreter &rInterp, CTCLResult &rResult, int argc, char **argv)
virtual int ExecutePreFunction ()
virtual int ExecutePostFunction ()

Static Protected Methods

void Usage (CTCLResult &rResult)

Private Methods

 CPauseCommand (const CPauseCommand &rhs)
 Copy constructor.

CPauseCommand & operator= (const CPauseCommand &rhs)
 Assignment.

int operator== (const CPauseCommand &rhs) const
 Comparison for equality.

int operator!= (const CPauseCommand &rhs) const

Detailed Description

Encapsulates the core 'pause' command. There are some interesting threading issues which are dealt with by the executor for this command.

Definition at line 293 of file CPauseCommand.h.


Constructor & Destructor Documentation

CPauseCommand::CPauseCommand  
 

Default constructor.

Default constructor creates the "pause" command.

Definition at line 287 of file CPauseCommand.cpp.

CPauseCommand::~CPauseCommand   [inline]
 

Destructor.

Definition at line 301 of file CPauseCommand.h.

CPauseCommand::CPauseCommand const CPauseCommand &    rhs [private]
 

Copy constructor.


Member Function Documentation

int CPauseCommand::ExecutePostFunction   [virtual]
 

Invokes the PostPause script. The result of that script is set in our interpreter's result field. The status of the script is returned.

Implements CStateTransitionCommand.

Definition at line 382 of file CPauseCommand.cpp.

int CPauseCommand::ExecutePreFunction   [virtual]
 

Executes the PrePause script. The result of the script is returned as the current interpreter's result string and the status is the return value of this function.

Implements CStateTransitionCommand.

Definition at line 368 of file CPauseCommand.cpp.

int CPauseCommand::operator!= const CPauseCommand &    rhs const [private]
 

int CPauseCommand::operator() CTCLInterpreter &    rInterp,
CTCLResult &    rResult,
int    argc,
char **    argv
[virtual]
 

Executes the pause command. The pause command requires an active run. The run is temporarily suspended. paused runs can be either resumed or directly stopped. There are two threads of interest: This thread ( the Tcl interpreter), and the trigger thread. Actions done are:

  • The prePause TCL script is executed. Failures in that script can abort the pause.
  • The C++ electronics shutdown software is run.
  • The final scaler buffer is emitted.
  • The pause buffer is emitted.
  • The PostPause script is executed. failures in it result in non-fatal warnings.
  • The trigger thread, which is blocked since we hold the mutex, is requested to stop. It will either timeout out and stop or respond to the next trigger by stopping rather than processing it.
Parameters:
rInterp  - CTCLInterpreter& [in] reference to the interpreter object that is running this command.
rResult  - CTCLResult& [inout] Reference to the result string that will be modified by the execution of this command. The result string will either be:
  • empty on success.
  • an error message on failure.
Parameters:
argc  - int [in] Number of words in the command.
argv  - char** [in] Pointer to the list of words on the command. Note that: # One round of substitution has already occured. # The command itself is a word.

Definition at line 327 of file CPauseCommand.cpp.

References CReadoutMain::getExperiment(), CReadoutMain::getInstance(), CReadoutMain::getRunState(), CRunState::Pause(), CExperiment::Stop(), and Usage().

CPauseCommand& CPauseCommand::operator= const CPauseCommand &    rhs [private]
 

Assignment.

int CPauseCommand::operator== const CPauseCommand &    rhs const [private]
 

Comparison for equality.

void CPauseCommand::Usage CTCLResult &    rResult [static, protected]
 

Add command usage information to the rResult string:

Definition at line 392 of file CPauseCommand.cpp.

Referenced by operator()().


The documentation for this class was generated from the following files:
Generated on Fri Nov 8 13:37:20 2002 for Event Readout system. by doxygen1.2.16