00001 #ifndef SEQUENCE_H 00002 #define SEQUENCE_H 00003 00004 #include <vector> 00005 #include <list> 00006 #include <memory> 00007 #include <boost/shared_ptr.hpp> 00008 #include "IS/SequenceData.h" 00009 #include "Test.h" 00010 00011 using std::vector; 00012 using std::list; 00013 using std::auto_ptr; 00014 using boost::shared_ptr; 00015 00016 namespace SctCalibrationController { 00017 00023 class Sequence { 00024 public: 00034 static shared_ptr<Sequence> create(const string& name, unsigned long runNumber, unsigned long startScanNumber, const list<string>& list); 00035 00039 virtual ~Sequence(); 00040 00044 void addTest(auto_ptr<Test> test); 00045 00049 const SequenceData& getData() const; 00050 00051 00056 list<string> getModuleList() const; 00057 00064 void setStatus(SequenceData::status_E status); 00065 00069 string getUniqueID() const; 00070 00075 shared_ptr<Test> Sequence::getTest(unsigned int index) const; 00076 00077 private: 00082 Sequence(const string& name, unsigned long runNumber, unsigned long startScanNumber, const list<string>& list); 00083 SequenceData data; 00084 00090 unsigned int realSize; 00091 00096 void publish(); 00097 00102 void withdraw(); 00103 00104 typedef vector<shared_ptr<Test> > TestVector; 00105 TestVector tests; 00106 }; 00107 00108 } 00109 00110 #endif //TESTSEQUENCEIMPL_H