SctCalibrationController::Sequence Class Reference

This is a record of each Sequence that is done. More...

#include <Sequence.h>

Collaboration diagram for SctCalibrationController::Sequence:

Collaboration graph
[legend]

Public Member Functions

virtual ~Sequence ()
 Removes the SequenceData from IS.
void addTest (auto_ptr< Test > test)
 Adds a Test to this Sequence.
const SequenceDatagetData () const
 Access the underlying SequenceData.
list< string > getModuleList () const
 Get the list of modules in this Sequence.
void setStatus (SequenceData::status_E status)
 Set the status of this Sequence - see SequenceData.
virtual Sct::UniqueID getUniqueID () const
 Get a unique ID for this Sequence - used by IS.
shared_ptr< TestSequence::getTest (unsigned int index) const
 Get a Test.

Static Public Member Functions

static shared_ptr< Sequencecreate (const string &name, unsigned long runNumber, unsigned long startScanNumber, const list< string > &list)
 Force creation using shared_ptrs and new.

Private Types

typedef vector< shared_ptr<
Test > > 
TestVector
 A vector of Tests!

Private Member Functions

 Sequence (const string &name, unsigned long runNumber, unsigned long startScanNumber, const list< string > &list)
 Creates a Sequence -.
void publish ()
 Put (create or update) the SequenceData into IS.
void withdraw ()
 Remove the SequenceData from IS Will not throw - just reports the problem.s.

Private Attributes

SequenceData data
 The underlying data.
unsigned int realSize
 For efficiency we allocate a slightly larger array in SequenceData than necessary for the Test names.
TestVector tests
 The constituent Tests.

Detailed Description

This is a record of each Sequence that is done.

It holds an underlying SequenceData that is put into IS and also references to the constituent Tests.

Definition at line 23 of file Sequence.h.


Member Typedef Documentation

typedef vector<shared_ptr<Test> > SctCalibrationController::Sequence::TestVector [private]
 

A vector of Tests!

Definition at line 104 of file Sequence.h.


Constructor & Destructor Documentation

SctCalibrationController::Sequence::~Sequence  )  [virtual]
 

Removes the SequenceData from IS.

Definition at line 49 of file Sequence.cpp.

References data, getUniqueID(), SequenceData::sequenceName, and withdraw().

Here is the call graph for this function:

SctCalibrationController::Sequence::Sequence const string &  name,
unsigned long  runNumber,
unsigned long  startScanNumber,
const list< string > &  list
[private]
 

Creates a Sequence -.

See also:
create

Definition at line 23 of file Sequence.cpp.

References data, SequenceData::modules, SequenceData::modules_size, SequenceData::nTests, realSize, SequenceData::runNumber, SequenceData::sequenceName, SequenceData::startScanNumber, SequenceData::startTime, SequenceData::testNames, and SequenceData::testNames_size.

Referenced by create().


Member Function Documentation

void SctCalibrationController::Sequence::addTest auto_ptr< Test test  ) 
 

Adds a Test to this Sequence.

Note transfer of ownership semantics.

Definition at line 76 of file Sequence.cpp.

References data, getUniqueID(), SequenceData::nTests, realSize, SequenceData::testNames, and tests.

Here is the call graph for this function:

shared_ptr< Sequence > SctCalibrationController::Sequence::create const string &  name,
unsigned long  runNumber,
unsigned long  startScanNumber,
const list< string > &  list
[static]
 

Force creation using shared_ptrs and new.

This is because each Sequence is automatically added to the SequenceMap. Puts the SequenceData into IS.

Parameters:
name the name of this Sequence
runNumber the run number
startScanNumber the scan number of the first Scan in this Sequence
Note:
Problems can be caused if there is a significant gap between the creation of the Sequence and the execution of the Scans as this would mean things get out of step/wrong!

Definition at line 54 of file Sequence.cpp.

References SctCalibrationController::SequenceMap::addSequence(), SctCalibrationController::SequenceMap::instance(), and Sequence().

Referenced by SctCalibrationController::CalibrationControllerImpl::executeSequence().

Here is the call graph for this function:

const SequenceData & SctCalibrationController::Sequence::getData  )  const
 

Access the underlying SequenceData.

Definition at line 107 of file Sequence.cpp.

References data.

list< string > SctCalibrationController::Sequence::getModuleList  )  const
 

Get the list of modules in this Sequence.

Note:
Nothrow

Definition at line 60 of file Sequence.cpp.

References data, SequenceData::modules, and SequenceData::modules_size.

Sct::UniqueID SctCalibrationController::Sequence::getUniqueID  )  const [virtual]
 

Get a unique ID for this Sequence - used by IS.

Definition at line 68 of file Sequence.cpp.

References data, SequenceData::runNumber, SequenceData::sequenceName, and SequenceData::startScanNumber.

Referenced by addTest(), publish(), setStatus(), withdraw(), and ~Sequence().

void SctCalibrationController::Sequence::publish  )  [private]
 

Put (create or update) the SequenceData into IS.

Will not throw - just reports the problem.

Definition at line 128 of file Sequence.cpp.

References Sct::ISUtilities::addOrUpdateOrMessage(), data, and getUniqueID().

Referenced by setStatus().

Here is the call graph for this function:

shared_ptr<Test> SctCalibrationController::Sequence::Sequence::getTest unsigned int  index  )  const
 

Get a Test.

Exceptions:
InvalidArgumentError if index is too large

void SctCalibrationController::Sequence::setStatus SequenceData::status_E  status  ) 
 

Set the status of this Sequence - see SequenceData.

Once a Sequence has entered the ABORTED or COMPLETED states, it cannot be changed.

Exceptions:
InvalidArgumentError if the status is currently ABORTED or COMPLETED and status is not ABORTED or COMPLETED respectively.

Definition at line 111 of file Sequence.cpp.

References data, SequenceData::endTime, getUniqueID(), publish(), and SequenceData::status.

Here is the call graph for this function:

void SctCalibrationController::Sequence::withdraw  )  [private]
 

Remove the SequenceData from IS Will not throw - just reports the problem.s.

Definition at line 135 of file Sequence.cpp.

References getUniqueID(), and Sct::AbstractThrowable::sendToMrs().

Referenced by ~Sequence().

Here is the call graph for this function:


Field Documentation

SequenceData SctCalibrationController::Sequence::data [private]
 

The underlying data.

Definition at line 83 of file Sequence.h.

Referenced by addTest(), getData(), getModuleList(), getUniqueID(), publish(), Sequence(), setStatus(), and ~Sequence().

unsigned int SctCalibrationController::Sequence::realSize [private]
 

For efficiency we allocate a slightly larger array in SequenceData than necessary for the Test names.

This is the real size of that array.

Definition at line 90 of file Sequence.h.

Referenced by addTest(), and Sequence().

TestVector SctCalibrationController::Sequence::tests [private]
 

The constituent Tests.

Definition at line 105 of file Sequence.h.

Referenced by addTest().


The documentation for this class was generated from the following files:
Generated on Mon Feb 6 14:05:40 2006 for SCT DAQ/DCS Software - C++ by  doxygen 1.4.6