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

TestResult.h

00001 #ifndef SCTDATA_TESTRESULT_H
00002 #define SCTDATA_TESTRESULT_H
00003 
00004 #include <string>
00005 #include <vector>
00006 #include <boost/shared_ptr.hpp>
00007 #include "Sct/LogicErrors.h"
00008 #include "Sct/IoExceptions.h"
00009 #include "Sct/Exception.h"
00010 #include "ModuleConfiguration.h"
00011 #include "DefectList.h"
00012 #include "Result.h"
00013 
00014 using namespace std;
00015 using namespace Sct;
00016 using boost::shared_ptr;
00017 
00018 namespace SctData {
00019 class FitScanResult;
00020 class RawScanResult;
00021 class ConfigurationVariable;
00022 class DcsData;
00023 class OpeResult;
00024 
00032 class TestResult:public virtual Result {
00033 public:
00035     ~TestResult() throw() {};
00036     
00039     virtual Sct::UniqueID getUniqueID() const throw(LogicError) ;    
00040     
00042     unsigned int getRunNumber() const throw();
00043 
00044     void setRunNumber(unsigned int runNumber) throw();
00045 
00047     string getModuleName() const throw();
00048 
00049     void setModuleName(string name) throw();
00050 
00054     const ConfigurationVariable& getScanVariable() const throw();
00055 
00056     void setScanVariable(const ConfigurationVariable& scanVariable) throw();
00057     
00062     virtual const ResultHeader& getHeader() const;
00063     
00068     virtual ResultHeader& getHeader();
00069     
00070 
00074     const ConfigurationVariable& getTestVariable() const throw();
00075 
00076     void setTestVariable(const ConfigurationVariable& testVariable) throw();
00077 
00079     unsigned getScanNumberAt(unsigned int i) const throw(LogicError);
00080 
00082     double getTestPointAt(unsigned int i) const throw(LogicError);
00083 
00088     const DefectList& getDefects() const throw() ;
00089     DefectList& getDefects() throw() ;
00090 
00094     bool getPassed() const throw();
00095     
00099     void setPassed(bool passed) throw();
00100     
00104     bool getProblem() const throw();
00105     
00109     void setProblem(bool problem) throw();
00110     
00114     vector<string> getComments() const throw(); 
00115     
00119     void addComment(string comment) throw();
00120     
00122     virtual void addScan(const unsigned int scanNumber, const double testPoint) throw(LogicError);
00123 
00124 
00129     //ScanNumberIterator& getScanNumbers();
00130 
00134     const unsigned int getNScans() const throw() {
00135         return data.size();
00136     }
00137 
00142     unsigned int getIndex(const unsigned int scanNumber) const throw(LogicError) ;
00143 
00147     shared_ptr<const DcsData> getDcsData() const;
00151     void setDcsData(boost::shared_ptr<const DcsData> dcs);
00155     shared_ptr<const OpeResult> getOpeResult() const;
00159     void setOpeResult(boost::shared_ptr<const OpeResult> ope);
00160 protected:
00164     TestResult() throw();
00165 
00169     TestResult(const unsigned int runNumber, const string & moduleName, const ConfigurationVariable& testVariable,
00170            const ConfigurationVariable& scanVariable) throw ();
00171 
00175     class ScanData {
00176     public:
00177 
00183         ScanData(const unsigned int scanNumber, const double testPoint) throw();
00184 
00186 
00187         bool operator<(const ScanData & s) const throw();
00188         bool operator>(const ScanData & s) const throw();
00189         bool operator==(const unsigned int aScanNumber) const throw();
00191 
00192         unsigned int scanNumber;    
00193         double testPoint;   
00194     };
00195 
00196     vector <ScanData> data; 
00197     ResultHeader header;                
00198     const ConfigurationVariable* testVariable;      
00199     DefectList defects;                                 
00200     bool passed;                    
00201     bool problem;                   
00202     vector<string> comments;                
00203     boost::shared_ptr<const DcsData> m_dcsData;         
00204     boost::shared_ptr<const OpeResult> m_opeResult;     
00205 };
00206 
00207 }               // end of namespace SctData
00208 #endif              //SCTDATA_TESTRESULT_H

Generated on Fri Dec 16 19:38:24 2005 for SCT DAQ/DCS Software - C++ by doxygen 1.3.5