00001 #include "MarkSpaceRatioTestResult.h" 00002 #include "NullVariable.h" 00003 #include "DefaultVariable.h" 00004 #include <Sct/AbcdScans.h> 00005 00007 00008 namespace SctData{ 00009 string MarkSpaceRatioTestResult::vector_name("MarkSpaceRatio:msr_result"); 00010 00011 MarkSpaceRatioTestResult::MarkSpaceRatioTestResult() throw() : msr_result(vector_name) { 00012 } 00013 00014 MarkSpaceRatioTestResult::MarkSpaceRatioTestResult(unsigned int runNumber, const string& moduleName) throw() 00015 : TestResult(runNumber, moduleName, NullVariable::instance(), *DefaultVariable::instance(ST_ELAPSED)), 00016 msr_result(vector_name) 00017 { 00018 } 00019 00020 MarkSpaceRatioTestResult::~MarkSpaceRatioTestResult() throw() {} 00021 00022 string MarkSpaceRatioTestResult::getClassName() const throw(){ 00023 return string("SctData::MarkSpaceRatioTestResult"); 00024 } 00025 00026 void MarkSpaceRatioTestResult::addPoint(const MsrPoint& r) { 00027 msr_result.push_back(r); 00028 } 00029 00030 unsigned MarkSpaceRatioTestResult::getNPoints() const { 00031 return msr_result.size(); 00032 } 00033 00034 MarkSpaceRatioTestResult::MsrPoint MarkSpaceRatioTestResult::getPoint(unsigned index) const{ 00035 return msr_result[index]; 00036 } 00037 00038 double MarkSpaceRatioTestResult::getOptimum() const { 00039 return optimum; 00040 } 00041 00042 void MarkSpaceRatioTestResult::setOptimum(double o) { 00043 optimum=o; 00044 } 00045 00046 double MarkSpaceRatioTestResult::MsrPoint::getOccupancy(unsigned ilink) const{ 00047 return ilink ? occ1 : occ0; 00048 } 00049 00050 double MarkSpaceRatioTestResult::MsrPoint::getOccupancyFlipped(unsigned ilink) const{ 00051 return ilink ? occ1flip : occ0flip; 00052 } 00053 00054 }