UltraScan III
us_experiment.h
Go to the documentation of this file.
1 #ifndef US_EXPERIMENT_H
3 #define US_EXPERIMENT_H
4 
5 #include "us_extern.h"
6 #include "us_convert.h"
7 #include "us_project.h"
8 #include "us_simparms.h"
9 #include "us_rotor.h"
10 
11 #ifndef SP_SPEEDPROFILE
12 #define SP_SPEEDPROFILE US_SimulationParameters::SpeedProfile
13 #endif
14 
22 {
23  public:
24 
26  {
28  double rotorCoeff1;
29  double rotorCoeff2;
30  };
31 
32  struct RotorInfo
33  {
34  int rotorID;
35  QString rotorGUID;
36  QString rotorSerial;
37  QList< CalibrationInfo > calibrationInfo;
38  };
39 
40  int invID;
41  QString invGUID;
42 
43  QString name;
44  int expID;
45  QString expGUID;
47  QString runID;
48  int labID;
50  QString instrumentSerial;
51  int operatorID;
52  QString operatorGUID;
53  int rotorID;
54  QString rotorGUID;
55  QString rotorSerial;
56  QString rotorName;
58  double rotorCoeff1;
59  double rotorCoeff2;
60  QDate rotorUpdated;
61  QString expType;
62  QByteArray opticalSystem;
63  QList< double > rpms;
64  QString runTemp;
65  QString label;
66  QString comments;
68  QString date;
69  bool syncOK;
70  QStringList experimentTypes;
71  QVector< double > RIProfile;
72  QVector< int > RIwvlns;
73  int RI_nscans;
74  int RI_nwvlns;
75 
78  US_Experiment( void );
79 
85  int checkRunID( US_DB2* = 0 );
86 
94  int saveToDB( bool, US_DB2*, QVector< SP_SPEEDPROFILE >& );
95 
103  int readFromDB( QString, US_DB2*, QVector< SP_SPEEDPROFILE >& );
104 
118  int saveToDisk( QList< US_Convert::TripleInfo >&,
119  QString, QString, QString,
120  QVector< SP_SPEEDPROFILE >& );
121 
133  int readFromDisk( QList< US_Convert::TripleInfo >&,
134  QString, QString, QString );
135 
141  int saveRIDisk( QString , QString );
142 
148  int readRIDisk( QString , QString );
149 
150  void clear( void );
151  void show ( void );
152 
154 
155  private:
156  void readExperiment( QXmlStreamReader&,
157  QList< US_Convert::TripleInfo >&, QString , QString );
158 
159  void readDataset( QXmlStreamReader&, US_Convert::TripleInfo& );
160 
161  void createRIXml( QByteArray& );
162 
163  int importRIxml( QByteArray& );
164 };
165 #endif