Main Page   Modules   Namespace List   Class Hierarchy   Data Structures   File List   Namespace Members   Data Fields   Globals   Related Pages  

SctData::TestResult Class Reference

This class is the Abstract Base Class for all TestResults. More...

#include <TestResult.h>

Inheritance diagram for SctData::TestResult:

Sct::Serializable Sct::Streamable SctData::FullBypassTestResult SctData::NMaskTestResult SctData::NoiseOccupancyTestResult SctData::NPtGainTestResult SctData::PipelineTestResult SctData::StrobeDelayTestResult SctData::TimeWalkTestResult SctData::TrimRangeTestResult

Public Member Functions

 ~TestResult () throw ()
 Constructor is in protected.

virtual string getUniqueID () const throw (LogicError)
 Serializable override
Exceptions:
LogicError if TestResult is empty.


unsigned int getRunNumber () const throw ()
 
Returns:
the run number


void setRunNumber (unsigned int runNumber) throw ()
string getModuleName () const throw ()
 
Returns:
the module name


void setModuleName (string name) throw ()
const ConfigurationVariablegetScanVariable () const throw ()
 Get the configuration variable associated with all the scans in this test.

void setScanVariable (const ConfigurationVariable &scanVariable) throw ()
const ConfigurationVariablegetTestVariable () const throw ()
 Get the configuration variable associated with this test.

void setTestVariable (const ConfigurationVariable &testVariable) throw ()
const ModuleConfigurationgetUpdatedConfiguration () const throw ()
 Get the updated configuration.

ModuleConfigurationgetUpdatedConfiguration () throw ()
unsigned getScanNumberAt (unsigned int i) const throw (LogicError)
 gets the scan number at a particular postition `i' within the data.

double getTestPointAt (unsigned int i) const throw (LogicError)
 gets the test point at a particular position `i' within the data.

const ModuleDefectListgetDefects () const throw ()
 Get the defects found in the TestResult.

ModuleDefectListgetDefects () throw ()
bool getPassed () const throw ()
 Return true if the module passed the Test.

void setPassed (bool passed) throw ()
 Set whether the module passed the scan.

bool getProblem () const throw ()
 Return true if the module had a problem.

void setProblem (bool problem) throw ()
 Set whether the module had a problem.

vector< string > getComments () const throw ()
 Return all the comments.

void addComment (string comment) throw ()
 Add a comment - must be a single line (no newlines).

virtual void addScan (const unsigned int scanNumber, const double testPoint) throw (LogicError)
 Add a scan to this test.

const unsigned int getNScans () const throw ()
unsigned int getIndex (const unsigned int scanNumber) const throw (LogicError)
 Find the index for a particular scanNumber.

shared_ptr< const FitScanResultgetFit (unsigned int index) const throw (LogicError,IoError)
 Gets a FitScanResult that has previously been added with addFit.

shared_ptr< const RawScanResultgetRaw (unsigned int index) const throw (LogicError,IoError)
 Gets a RawScanResult that has previously been added with addRaw.

void addFit (shared_ptr< const FitScanResult > fit) throw (LogicError)
 Add a FitScanResult.

void addRaw (shared_ptr< const RawScanResult > raw) throw (LogicError)
 Add a RawScanResult.

bool hasAllFits () const throw ()
 convenience method checks if all fits are in place.

bool hasAllRaws () const throw ()
 convenience method checks if all raws are in place.


Protected Member Functions

 TestResult () throw ()
 Default constructor.

 TestResult (const unsigned int runNumber, const string &moduleName, const ConfigurationVariable &testVariable, const ConfigurationVariable &scanVariable) throw ()
 Create a TestResult from all the stuff needed to initialize it.


Protected Attributes

vector< ScanDatadata
unsigned int runNumber
 The run number.

string moduleName
 The module name.

const ConfigurationVariabletestVariable
 The test variable.

const ConfigurationVariablescanVariable
 The scan variable for all the ScanNumbers in this TestResult.

ModuleConfiguration updatedConfig
 The updated configuration.

ModuleDefectList defects
 The ModuleDefects found in producing this TestResult.

bool passed
 True if the module passed the Test.

bool problem
 True if there was a problem with the Module.

vector< string > comments
 Comments.


Friends

class TestResultIOHelper

Detailed Description

This class is the Abstract Base Class for all TestResults.

Examples are Response Curves, Trim Range Tests and StrobeDelay Test. It provides useful data and functions to the sub-classes. For instance, identifying information such as the list of scan numbers, the run number, module name and the test points.

Todo:
Think: Do we want a TestHeader class? Such that a Test is a collection of TestHeaders
Author:
Matthew Palmer
Date:
12 March 2003

Definition at line 31 of file TestResult.h.


Constructor & Destructor Documentation

SctData::TestResult::~TestResult   throw () [inline]
 

Constructor is in protected.

Definition at line 34 of file TestResult.h.

SctData::TestResult::TestResult   throw () [protected]
 

Default constructor.

Definition at line 26 of file TestResult.cpp.

SctData::TestResult::TestResult const unsigned int    runNumber,
const string &    moduleName,
const ConfigurationVariable   testVariable,
const ConfigurationVariable   scanVariable
throw () [protected]
 

Create a TestResult from all the stuff needed to initialize it.

Definition at line 19 of file TestResult.cpp.


Member Function Documentation

void SctData::TestResult::addComment string    comment throw ()
 

Add a comment - must be a single line (no newlines).

Definition at line 83 of file TestResult.cpp.

Referenced by SctData::IO::TestResultStreamer::read().

void SctData::TestResult::addFit shared_ptr< const FitScanResult   fit throw (LogicError)
 

Add a FitScanResult.

Puts it in the correct place.

Definition at line 127 of file TestResult.cpp.

void SctData::TestResult::addRaw shared_ptr< const RawScanResult   raw throw (LogicError)
 

Add a RawScanResult.

Puts it in the correct place.

Definition at line 132 of file TestResult.cpp.

void SctData::TestResult::addScan const unsigned int    scanNumber,
const double    testPoint
throw (LogicError) [virtual]
 

Add a scan to this test.

Reimplemented in SctData::StrobeDelayTestResult.

Definition at line 87 of file TestResult.cpp.

Referenced by SctData::IO::TestResultStreamer::read().

vector< string > SctData::TestResult::getComments   const throw ()
 

Return all the comments.

Definition at line 79 of file TestResult.cpp.

Referenced by SctData::IO::TestResultStreamer::write().

ModuleDefectList & SctData::TestResult::getDefects   throw ()
 

Definition at line 43 of file TestResult.cpp.

const ModuleDefectList & SctData::TestResult::getDefects   const throw ()
 

Get the defects found in the TestResult.

Returns:
The ModuleDefects class representing all the defects found in this TestResult.

Definition at line 39 of file TestResult.cpp.

Referenced by SctData::IO::TestResultStreamer::read(), SctData::IO::TestResultStreamer::write(), SctData::TestSummary::StrobeDelaySummaryWriter::write(), and SctData::TestSummary::NPtGainSummaryWriter::write().

shared_ptr< const FitScanResult > SctData::TestResult::getFit unsigned int    index const throw (LogicError,IoError)
 

Gets a FitScanResult that has previously been added with addFit.

Returns:
A pointer to a FitScanResult corresponding to the scanNumber given.
Exceptions:
InvalidArgument if scan is not in this TestResult
IoError if fit can't be obtained

Definition at line 119 of file TestResult.cpp.

References Sct::IoError.

unsigned int SctData::TestResult::getIndex const unsigned int    scanNumber const throw (LogicError)
 

Find the index for a particular scanNumber.

Exceptions:
LogicError if not found.

Definition at line 151 of file TestResult.cpp.

string SctData::TestResult::getModuleName   const throw () [inline]
 

Returns:
the module name

Definition at line 48 of file TestResult.h.

References moduleName.

Referenced by SctCalibrationController::ConfigUpdater::getMID(), SctCalibrationController::NPtGainConfigUpdater::update(), and SctData::IO::TestResultStreamer::write().

const unsigned int SctData::TestResult::getNScans   const throw () [inline]
 

Returns:
the number of scans in this test.

Definition at line 130 of file TestResult.h.

References data.

Referenced by SctData::IO::TestResultStreamer::write(), SctData::TestSummary::NPtGainSummaryWriter::write(), and SctData::TestSummary::FullBypassSummaryWriter::write().

bool SctData::TestResult::getPassed   const throw ()
 

Return true if the module passed the Test.

Definition at line 63 of file TestResult.cpp.

Referenced by SctData::IO::TestResultStreamer::write().

bool SctData::TestResult::getProblem   const throw ()
 

Return true if the module had a problem.

Definition at line 71 of file TestResult.cpp.

Referenced by SctData::IO::TestResultStreamer::write().

shared_ptr< const RawScanResult > SctData::TestResult::getRaw unsigned int    index const throw (LogicError,IoError)
 

Gets a RawScanResult that has previously been added with addRaw.

Returns:
A pointer to a RawScanResult corresponding to the scanNumber given.
Exceptions:
InvalidArgument if scan is not in this TestResult
IoError if fit can't be obtained

Definition at line 123 of file TestResult.cpp.

References Sct::IoError.

unsigned int SctData::TestResult::getRunNumber   const throw () [inline]
 

Returns:
the run number

Definition at line 41 of file TestResult.h.

References runNumber.

Referenced by SctData::IO::TestResultStreamer::write().

unsigned SctData::TestResult::getScanNumberAt unsigned int    i const throw (LogicError)
 

gets the scan number at a particular postition `i' within the data.

Definition at line 99 of file TestResult.cpp.

Referenced by SctData::IO::TestResultStreamer::write().

const ConfigurationVariable & SctData::TestResult::getScanVariable   const throw ()
 

Get the configuration variable associated with all the scans in this test.

Definition at line 47 of file TestResult.cpp.

Referenced by SctData::IO::TestResultStreamer::write().

double SctData::TestResult::getTestPointAt unsigned int    i const throw (LogicError)
 

gets the test point at a particular position `i' within the data.

Definition at line 105 of file TestResult.cpp.

Referenced by SctData::NPtGainTestResult::getSpecialScanPointValue(), SctData::IO::TestResultStreamer::write(), and SctData::TestSummary::FullBypassSummaryWriter::write().

const ConfigurationVariable & SctData::TestResult::getTestVariable   const throw ()
 

Get the configuration variable associated with this test.

Definition at line 55 of file TestResult.cpp.

Referenced by SctData::IO::TestResultStreamer::write().

string SctData::TestResult::getUniqueID   const throw (LogicError) [virtual]
 

Serializable override

Exceptions:
LogicError if TestResult is empty.

Implements Sct::Serializable.

Definition at line 92 of file TestResult.cpp.

ModuleConfiguration & SctData::TestResult::getUpdatedConfiguration   throw ()
 

Definition at line 115 of file TestResult.cpp.

const ModuleConfiguration & SctData::TestResult::getUpdatedConfiguration   const throw ()
 

Get the updated configuration.

Definition at line 111 of file TestResult.cpp.

Referenced by SctData::IO::TestResultStreamer::read(), and SctData::IO::TestResultStreamer::write().

bool SctData::TestResult::hasAllFits   const throw ()
 

convenience method checks if all fits are in place.

Returns:
true if none of the fits are null pointers.

Definition at line 137 of file TestResult.cpp.

bool SctData::TestResult::hasAllRaws   const throw ()
 

convenience method checks if all raws are in place.

Returns:
true if none of the raws are null pointers.

Definition at line 144 of file TestResult.cpp.

void SctData::TestResult::setModuleName string    name throw ()
 

Definition at line 35 of file TestResult.cpp.

Referenced by SctData::IO::TestResultStreamer::read().

void SctData::TestResult::setPassed bool    passed throw ()
 

Set whether the module passed the scan.

Definition at line 67 of file TestResult.cpp.

Referenced by SctData::IO::TestResultStreamer::read().

void SctData::TestResult::setProblem bool    problem throw ()
 

Set whether the module had a problem.

Definition at line 75 of file TestResult.cpp.

Referenced by SctData::IO::TestResultStreamer::read().

void SctData::TestResult::setRunNumber unsigned int    runNumber throw ()
 

Definition at line 31 of file TestResult.cpp.

Referenced by SctData::IO::TestResultStreamer::read().

void SctData::TestResult::setScanVariable const ConfigurationVariable   scanVariable throw ()
 

Definition at line 51 of file TestResult.cpp.

Referenced by SctData::IO::TestResultStreamer::read().

void SctData::TestResult::setTestVariable const ConfigurationVariable   testVariable throw ()
 

Definition at line 59 of file TestResult.cpp.

Referenced by SctData::IO::TestResultStreamer::read().


Friends And Related Function Documentation

friend class TestResultIOHelper [friend]
 

Definition at line 234 of file TestResult.h.


Field Documentation

vector<string> SctData::TestResult::comments [protected]
 

Comments.

Definition at line 231 of file TestResult.h.

vector<ScanData> SctData::TestResult::data [protected]
 

Definition at line 221 of file TestResult.h.

Referenced by getNScans().

ModuleDefectList SctData::TestResult::defects [protected]
 

The ModuleDefects found in producing this TestResult.

Definition at line 228 of file TestResult.h.

string SctData::TestResult::moduleName [protected]
 

The module name.

Definition at line 223 of file TestResult.h.

Referenced by getModuleName().

bool SctData::TestResult::passed [protected]
 

True if the module passed the Test.

Definition at line 229 of file TestResult.h.

bool SctData::TestResult::problem [protected]
 

True if there was a problem with the Module.

Definition at line 230 of file TestResult.h.

unsigned int SctData::TestResult::runNumber [protected]
 

The run number.

Definition at line 222 of file TestResult.h.

Referenced by getRunNumber().

const ConfigurationVariable* SctData::TestResult::scanVariable [protected]
 

The scan variable for all the ScanNumbers in this TestResult.

Definition at line 226 of file TestResult.h.

const ConfigurationVariable* SctData::TestResult::testVariable [protected]
 

The test variable.

Definition at line 225 of file TestResult.h.

ModuleConfiguration SctData::TestResult::updatedConfig [protected]
 

The updated configuration.

Definition at line 227 of file TestResult.h.


The documentation for this class was generated from the following files:
Generated on Mon Dec 15 19:37:54 2003 for SCT DAQ/DCS Software by doxygen1.3-rc3