00001 #ifndef TESTDATA_H
00002 #define TESTDATA_H
00003
00004 #include <is/isinfo.h>
00005
00006
00007
00008
00015 class TestData: public ISInfo {
00016 public:
00017 enum status_E {EXECUTING,COMPLETED,ABORTED};
00018
00022 std::string testName;
00023
00027 unsigned long runNumber;
00028
00032 unsigned long nScans;
00033
00037 unsigned long startScanNumber;
00038
00042 unsigned short testVariable;
00043
00047 double * testPoints;
00051 size_t testPoints_size;
00052
00055 status_E status;
00056
00057
00058 TestData( )
00059 : ISInfo( "TestData" )
00060 {
00061 testPoints_size = 0;
00062 status = EXECUTING;
00063
00064
00065
00066
00067 }
00068
00069 ~TestData(){
00070 if ( testPoints_size != 0 ) delete[] testPoints;
00071
00072
00073
00074
00075 }
00076
00077 protected:
00078 TestData( const char * type )
00079 : ISInfo( type )
00080 {
00081 testPoints_size = 0;
00082 status = EXECUTING;
00083
00084
00085
00086
00087 }
00088
00089 void publishGuts( ISostream & out ){
00090 out << testName << runNumber << nScans << startScanNumber << testVariable;
00091 out.put( testPoints, testPoints_size );
00092 out << (int)status;
00093 }
00094
00095 void refreshGuts( ISistream & in ){
00096 in >> testName >> runNumber >> nScans >> startScanNumber >> testVariable;
00097 if ( testPoints_size != 0 ) delete[] testPoints;
00098 in.get( &testPoints, testPoints_size );
00099 in >> (int&)status;
00100 }
00101
00102
00103
00104
00105 };
00106
00107
00108
00109
00110 #endif // TESTDATA_H