00001 #ifndef SEQUENCE_H
00002 #define SEQUENCE_H
00003
00004 #include <vector>
00005 #include <memory>
00006 #include <boost/shared_ptr.hpp>
00007 #include "IS/SequenceData.h"
00008 #include "Test.h"
00009
00010 using std::vector;
00011 using std::auto_ptr;
00012 using boost::shared_ptr;
00013
00014 namespace SctCalibrationController {
00015
00021 class Sequence {
00022 public:
00032 static shared_ptr<Sequence> create(const string& name, unsigned long runNumber, unsigned long startScanNumber);
00033
00037 virtual ~Sequence();
00038
00042 void addTest(auto_ptr<Test> test);
00043
00047 const SequenceData& getData() const;
00048
00055 void setStatus(SequenceData::status_E status);
00056
00060 string getUniqueID() const;
00061
00066 shared_ptr<Test> Sequence::getTest(unsigned int index) const;
00067
00068 private:
00073 Sequence(const string& name, unsigned long runNumber, unsigned long startScanNumber);
00074 SequenceData data;
00075
00081 unsigned int realSize;
00082
00087 void publish();
00088
00093 void withdraw();
00094
00095 typedef vector<shared_ptr<Test> > TestVector;
00096 TestVector tests;
00097 };
00098
00099 }
00100
00101 #endif //TESTSEQUENCEIMPL_H