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

CEndCommand Class Reference

#include <CEndCommand.h>

Inheritance diagram for CEndCommand:

CStateTransitionCommand List of all members.

Public Methods

 CEndCommand ()
 Default constructor.

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

 CEndCommand (const CEndCommand &rhs)
 Copy constructor.

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

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

int operator!= (const CEndCommand &rhs) const

Detailed Description

Encapsulates the "end" command. This command ends a run. It must interact in a thread aware manner with the experiment which has a free running trigger thread. See the docuentation of operator() for more info.

Definition at line 294 of file CEndCommand.h.


Constructor & Destructor Documentation

CEndCommand::CEndCommand  
 

Default constructor.

Create the command ("end"):

Definition at line 289 of file CEndCommand.cpp.

CEndCommand::~CEndCommand   [inline]
 

Destructor.

Definition at line 302 of file CEndCommand.h.

CEndCommand::CEndCommand const CEndCommand &    rhs [private]
 

Copy constructor.


Member Function Documentation

int CEndCommand::ExecutePostFunction   [virtual]
 

Executest the PostEnd script. Returns the result and status code of that script.

Implements CStateTransitionCommand.

Definition at line 368 of file CEndCommand.cpp.

int CEndCommand::ExecutePreFunction   [virtual]
 

Executes the PostEnd procedure; returns the return value from that script as well as the return status code from that script.

NO-OP at present.

Implements CStateTransitionCommand.

Definition at line 356 of file CEndCommand.cpp.

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

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

Executes the end command. At this time, since the global mutex is held, the trigger response loop is frozen. Therefore in this context we ask the experiment to end the run which:

  • Calls ExecutePreFunction in our thread context.
  • Does the C++ shutdown on the electronics in our thread context
  • Closes off any partial event buffer,
  • Emits a scaler buffer
  • Emits the end run buffer in our thread context,
  • Calls the ExecutePostFunction in our thread context and finally
  • Asks the trigger thread to exit.
Parameters:
rInterp  - Reference to the interpreter on which this command is running.
rResult  - Reference to the object encapsulation of the result string which will be returned by command.
argc,argv  - The parameters of the command, argv[0] is the command itself.
Note:
No parameters are expected or allowed.

Definition at line 319 of file CEndCommand.cpp.

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

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

Assignment.

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

Comparison for equality.

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

Append usage information to the result string

Parameters:
rResult  - The result string to append to.

Definition at line 379 of file CEndCommand.cpp.

Referenced by operator()().


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