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 Sct;
00015 using boost::shared_ptr;
00016 
00017 namespace SctData {
00018 class FitScanResult;
00019 class RawScanResult;
00020 class ConfigurationVariable;
00021 class DcsData;
00022 class OpeResult;
00023 
00031 class TestResult:public virtual Result {
00032 public:
00034     ~TestResult() throw() {};
00035     
00038     virtual Sct::UniqueID getUniqueID() const throw(LogicError) ;    
00039     
00041     unsigned int getRunNumber() const throw();
00042 
00043     void setRunNumber(unsigned int runNumber) throw();
00044 
00046     string getModuleName() const throw();
00047 
00048     void setModuleName(string name) throw();
00049 
00053     const ConfigurationVariable& getScanVariable() const throw();
00054 
00055     void setScanVariable(const ConfigurationVariable& scanVariable) throw();
00056     
00061     virtual const ResultHeader& getHeader() const;
00062     
00067     virtual ResultHeader& getHeader();
00068     
00069 
00073     const ConfigurationVariable& getTestVariable() const throw();
00074 
00075     void setTestVariable(const ConfigurationVariable& testVariable) throw();
00076 
00078     unsigned getScanNumberAt(unsigned int i) const throw(LogicError);
00079 
00081     double getTestPointAt(unsigned int i) const throw(LogicError);
00082 
00087     const DefectList& getDefects() const throw() ;
00088     DefectList& getDefects() throw() ;
00089 
00093     bool getPassed() const throw();
00094     
00098     void setPassed(bool passed) throw();
00099     
00103     bool getProblem() const throw();
00104     
00108     void setProblem(bool problem) throw();
00109     
00113     vector<string> getComments() const throw(); 
00114     
00118     void addComment(string comment) throw();
00119     
00121     virtual void addScan(const unsigned int scanNumber, const double testPoint) throw(LogicError);
00122 
00123 
00128     //ScanNumberIterator& getScanNumbers();
00129 
00133     const unsigned int getNScans() const throw() {
00134         return data.size();
00135     }
00136 
00141     unsigned int getIndex(const unsigned int scanNumber) const throw(LogicError) ;
00142 
00146     shared_ptr<const DcsData> getDcsData() const;
00150     void setDcsData(boost::shared_ptr<const DcsData> dcs);
00154     shared_ptr<const OpeResult> getOpeResult() const;
00158     void setOpeResult(boost::shared_ptr<const OpeResult> ope);
00159 protected:
00163     TestResult() throw();
00164 
00168     TestResult(const unsigned int runNumber, const string & moduleName, const ConfigurationVariable& testVariable,
00169            const ConfigurationVariable& scanVariable) throw ();
00170 
00174     class ScanData {
00175     public:
00176 
00182         ScanData(const unsigned int scanNumber, const double testPoint) throw();
00183 
00185 
00186         bool operator<(const ScanData & s) const throw();
00187         bool operator>(const ScanData & s) const throw();
00188         bool operator==(const unsigned int aScanNumber) const throw();
00190 
00191         unsigned int scanNumber;    
00192         double testPoint;   
00193     };
00194 
00195     vector <ScanData> data; 
00196     ResultHeader header;                
00197     const ConfigurationVariable* testVariable;      
00198     DefectList defects;                                 
00199     bool passed;                    
00200     bool problem;                   
00201     vector<string> comments;                
00202     boost::shared_ptr<const DcsData> m_dcsData;         
00203     boost::shared_ptr<const OpeResult> m_opeResult;     
00204 };
00205 
00206 }               // end of namespace SctData
00207 #endif              //SCTDATA_TESTRESULT_H

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