SingleVariableTestResult.cpp

00001 #include "SingleVariableTestResult.h"
00002 #include "NullVariable.h"
00003 
00004 #include "Sct/LogicErrors.h"
00005 #include "Sct/OutOfRangeError.h"
00006 
00007 using namespace Sct;
00008 
00009 namespace SctData {
00010 
00011 SingleVariableTestResult::SingleVariableTestResult() throw() : m_optima(nChipModule){
00012 }
00013   
00014 SingleVariableTestResult::SingleVariableTestResult(const ConfigurationVariable& scanVariable, const unsigned int runNumber, const string& moduleName) throw() 
00015     : TestResult(runNumber, moduleName, NullVariable::instance(), scanVariable), m_optima(nChipModule){
00016 }
00017 
00018 void SingleVariableTestResult::addScan(unsigned int scanNumber, double testPoint) throw (LogicError) {
00019     if (data.size() != 0) throw InvariantViolatedError("SingleVariableTestResult::addScan - can only contain 1 scan", __FILE__, __LINE__);
00020     TestResult::addScan(scanNumber, testPoint);
00021 }
00022 
00023 double SingleVariableTestResult::getOptimum(unsigned i) const throw(LogicError) {
00024     if (i>=nChipModule)
00025         throw OutOfRangeError<unsigned>("SingleVariableTestResult::getOptimum", __FILE__, __LINE__, i,0,nChipModule-1);
00026     return m_optima[i];
00027 }
00028 
00029 
00030     void SingleVariableTestResult::setOptimum(unsigned int chip, double optimum) throw(Sct::LogicError) {
00031     if (chip>=nChipModule)
00032         throw OutOfRangeError<unsigned>("SingleVariableTestResult::setOptimum", __FILE__, __LINE__,chip,0,nChipModule-1);
00033     m_optima[chip] = optimum;    
00034 }
00035 }

Generated on Mon Feb 6 14:01:29 2006 for SCT DAQ/DCS Software - C++ by  doxygen 1.4.6