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

CBeginCommand Class Reference

#include <CBeginCommand.h>

Inheritance diagram for CBeginCommand:

CStateTransitionCommand List of all members.

Public Methods

 CBeginCommand ()
 Default constructor.

 ~CBeginCommand ()
 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

 CBeginCommand (const CBeginCommand &rhs)
 Copy constructor.

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

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

int operator!= (const CBeginCommand &rhs) const

Detailed Description

Encapsulates the begin command. This command attempts to start a run by:

Definition at line 296 of file CBeginCommand.h.


Constructor & Destructor Documentation

CBeginCommand::CBeginCommand  
 

Default constructor.

Construct a begin command.

Definition at line 290 of file CBeginCommand.cpp.

CBeginCommand::~CBeginCommand   [inline]
 

Destructor.

Definition at line 304 of file CBeginCommand.h.

CBeginCommand::CBeginCommand const CBeginCommand &    rhs [private]
 

Copy constructor.


Member Function Documentation

int CBeginCommand::ExecutePostFunction   [virtual]
 

Called to execute the PostBegin script (if defined).

Note:
This will be called back from the start function of CExperiment so that that object doesn't have to know much about scripts. etc.

Implements CStateTransitionCommand.

Definition at line 385 of file CBeginCommand.cpp.

int CBeginCommand::ExecutePreFunction   [virtual]
 

Executes the PreBegin script; returning the status and result string.

Note:
This is a callback given to the Experiment begin run function so that it does not need to know how to execute Tcl scripts.

Implements CStateTransitionCommand.

Definition at line 370 of file CBeginCommand.cpp.

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

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

Executes the begin command. For the most part, all we do is validate that the run can be started, and then ask the experiment to start itself. The experiment will perform all initializations in our context:

  • PreBegin script which, if it fails, makes the begin fail in error.
  • Emission of the Begin Run Buffer.
  • C++ Initializations of hardware.
  • PostBegin script which, if it fails causes the begin to succeed but the result code warns of this fact.
  • Removal of computer busy signal.
  • Schedule the execution of the trigger thread. Readout will then occur in a separate thread, allowing the command interpreter to continue to 'run'.
Parameters:
rInterp  - The interpreter on which the command is running.
rResult  - The result of to be returned to the interpreter (empty string if ok error message otherwise).
argc,argv  - The parameters for the command.
Syntax:

begin

No parameters are allowed or supported.

Definition at line 326 of file CBeginCommand.cpp.

References CRunState::Begin(), CReadoutMain::getExperiment(), CReadoutMain::getInstance(), CReadoutMain::getRunState(), CExperiment::Start(), and Usage().

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

Assignment.

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

Comparison for equality.

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

Provide command online help.

Parameters:
CTCLResult&  rResult: Reference to the result string.

Definition at line 397 of file CBeginCommand.cpp.

Referenced by operator()().


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