UltraScan III
List of all members | Classes | Public Member Functions | Public Attributes | Private Member Functions
US_Experiment Class Reference

#include "us_experiment.h"

Collaboration diagram for US_Experiment:
Collaboration graph
[legend]

Classes

struct  CalibrationInfo
 
struct  RotorInfo
 

Public Member Functions

 US_Experiment (void)
 Generic constructor for the US_Experiment class. More...
 
int checkRunID (US_DB2 *=0)
 Determine if the current experiment runID exists in the DB. Updates expID accordingly, or to 0 if not found. More...
 
int saveToDB (bool, US_DB2 *, QVector< SP_SPEEDPROFILE > &)
 Function to save the experiment information to db. More...
 
int readFromDB (QString, US_DB2 *, QVector< SP_SPEEDPROFILE > &)
 Reads experiment information from the db. More...
 
int saveToDisk (QList< US_Convert::TripleInfo > &, QString, QString, QString, QVector< SP_SPEEDPROFILE > &)
 Writes an xml file. More...
 
int readFromDisk (QList< US_Convert::TripleInfo > &, QString, QString, QString)
 Reads an xml file. More...
 
int saveRIDisk (QString, QString)
 Writes the radial intensity profile data to the HD. More...
 
int readRIDisk (QString, QString)
 Reads radial intensity profile data from the HD. More...
 
void clear (void)
 Function to reset all class variables to defaults. More...
 
void show (void)
 Temporary function to display current exp info. More...
 

Public Attributes

int invID
 The personID of the investigator. More...
 
QString invGUID
 The GUID of the investigator. More...
 
QString name
 The name of the investigator. More...
 
int expID
 The ID of the experiment itself. More...
 
QString expGUID
 The GUID of the experiment. More...
 
US_Project project
 The project this experiment is associated with. More...
 
QString runID
 The run ID. More...
 
int labID
 The lab in which the experiment was conducted. More...
 
int instrumentID
 The identifier of the ultra-centrifuge. More...
 
QString instrumentSerial
 The serial number of the instrument. More...
 
int operatorID
 The personID of the person who operated the centrifuge. More...
 
QString operatorGUID
 The GUID of the operator. More...
 
int rotorID
 The rotor that was used. More...
 
QString rotorGUID
 The GUID of the rotor. More...
 
QString rotorSerial
 The serial number of the rotor. More...
 
QString rotorName
 The name of the rotor. More...
 
int calibrationID
 The ID of the rotor calibration. More...
 
double rotorCoeff1
 The first rotor stretch calibration coefficient. More...
 
double rotorCoeff2
 The second rotor stretch coefficient. More...
 
QDate rotorUpdated
 The date of the calibration. More...
 
QString expType
 The type of experiment. More...
 
QByteArray opticalSystem
 The type of optical system used. More...
 
QList< double > rpms
 A list of rotor speeds observed during the experiment. More...
 
QString runTemp
 The run temperature. More...
 
QString label
 The experiment label, or identifying information. More...
 
QString comments
 Comments that were associated with the experiment. More...
 
QString centrifugeProtocol
 The governing centrifuge protocol. More...
 
QString date
 The date the record was entered or last updated. More...
 
bool syncOK
 The user has connected with the db. More...
 
QStringList experimentTypes
 A list of possible experiment types. More...
 
QVector< double > RIProfile
 If RI data, the intensity profile. More...
 
QVector< int > RIwvlns
 For RI+MWL, wavelengths present. More...
 
int RI_nscans
 RI+MWL scans per profile. More...
 
int RI_nwvlns
 RI+MWL wavelengths (profiles count) More...
 
RotorInfo hwInfo
 

Private Member Functions

void readExperiment (QXmlStreamReader &, QList< US_Convert::TripleInfo > &, QString, QString)
 
void readDataset (QXmlStreamReader &, US_Convert::TripleInfo &)
 
void createRIXml (QByteArray &)
 
int importRIxml (QByteArray &)
 

Detailed Description

This class provides a data structure and associated routines to represent the relevant experiment parameters, such as the lab, instrument, and rotor on which the experiment was run.

Definition at line 21 of file us_experiment.h.

Constructor & Destructor Documentation

US_Experiment::US_Experiment ( void  )

Generic constructor for the US_Experiment class.

Definition at line 13 of file us_experiment.cpp.

Member Function Documentation

int US_Experiment::checkRunID ( US_DB2 db = 0)

Determine if the current experiment runID exists in the DB. Updates expID accordingly, or to 0 if not found.

Parameters
dbFor database access, an open database connection

Definition at line 26 of file us_experiment.cpp.

void US_Experiment::clear ( void  )

Function to reset all class variables to defaults.

Definition at line 923 of file us_experiment.cpp.

void US_Experiment::createRIXml ( QByteArray &  str)
private

Definition at line 810 of file us_experiment.cpp.

int US_Experiment::importRIxml ( QByteArray &  str)
private

Definition at line 872 of file us_experiment.cpp.

void US_Experiment::readDataset ( QXmlStreamReader &  xml,
US_Convert::TripleInfo triple 
)
private

Definition at line 703 of file us_experiment.cpp.

void US_Experiment::readExperiment ( QXmlStreamReader &  xml,
QList< US_Convert::TripleInfo > &  triples,
QString  runType,
QString  runID 
)
private

Definition at line 527 of file us_experiment.cpp.

int US_Experiment::readFromDB ( QString  runID,
US_DB2 db,
QVector< SP_SPEEDPROFILE > &  speedsteps 
)

Reads experiment information from the db.

Parameters
runIDThe run ID of the experiment.
dbFor database access, an open database connection
speedstepsReference to vector of experiment speed steps
Returns
One of the US_DB2 error codes

Definition at line 164 of file us_experiment.cpp.

int US_Experiment::readFromDisk ( QList< US_Convert::TripleInfo > &  triples,
QString  runType,
QString  runID,
QString  dirname 
)

Reads an xml file.

Parameters
triplesA reference to a structure provided by the calling function that will contain all the different cell/channel/wavelength defined by the xml file.
runTypeA reference to a variable that will contain the type of data ( "RA", "IP", "RI", "FI", "WA", or "WI"). This information will affect how the data is stored.
runIDThe run ID of the experiment.
dirnameThe directory from which the files are read.

Definition at line 484 of file us_experiment.cpp.

int US_Experiment::readRIDisk ( QString  runID,
QString  dirname 
)

Reads radial intensity profile data from the HD.

Parameters
runIDThe run ID associated with the RI data
dirnameThe location where the RI Profile is.

Definition at line 753 of file us_experiment.cpp.

int US_Experiment::saveRIDisk ( QString  runID,
QString  dirname 
)

Writes the radial intensity profile data to the HD.

Parameters
runIDThe run ID associated with the RI data
dirnameThe location where the RI Profile is to go.

Definition at line 732 of file us_experiment.cpp.

int US_Experiment::saveToDB ( bool  update,
US_DB2 db,
QVector< SP_SPEEDPROFILE > &  speedsteps 
)

Function to save the experiment information to db.

Parameters
updateIs it ok to update an existing database runID (maybe the user is updating a DB record)?
dbFor database access, an open database connection
speedstepsReference to vector of experiment speed steps

Definition at line 43 of file us_experiment.cpp.

int US_Experiment::saveToDisk ( QList< US_Convert::TripleInfo > &  triples,
QString  runType,
QString  runID,
QString  dirname,
QVector< SP_SPEEDPROFILE > &  speedsteps 
)

Writes an xml file.

Parameters
triplesA reference to a structure provided by the calling function that already contains all the different cell/channel/wavelength combinations in the data.
runTypeA reference to a variable that already contains the type of data ( "RA", "IP", "RI", "FI", "WA", or "WI"). This information will affect how the data is written.
runIDThe run ID of the experiment.
dirnameThe directory in which the files are to be written.
speedstepsReference to a vector of speed steps for the experiment.

Definition at line 316 of file us_experiment.cpp.

void US_Experiment::show ( void  )

Temporary function to display current exp info.

Definition at line 958 of file us_experiment.cpp.

Member Data Documentation

int US_Experiment::calibrationID

The ID of the rotor calibration.

Definition at line 57 of file us_experiment.h.

QString US_Experiment::centrifugeProtocol

The governing centrifuge protocol.

Definition at line 67 of file us_experiment.h.

QString US_Experiment::comments

Comments that were associated with the experiment.

Definition at line 66 of file us_experiment.h.

QString US_Experiment::date

The date the record was entered or last updated.

Definition at line 68 of file us_experiment.h.

QStringList US_Experiment::experimentTypes

A list of possible experiment types.

Definition at line 70 of file us_experiment.h.

QString US_Experiment::expGUID

The GUID of the experiment.

Definition at line 45 of file us_experiment.h.

int US_Experiment::expID

The ID of the experiment itself.

Definition at line 44 of file us_experiment.h.

QString US_Experiment::expType

The type of experiment.

Definition at line 61 of file us_experiment.h.

RotorInfo US_Experiment::hwInfo

Definition at line 153 of file us_experiment.h.

int US_Experiment::instrumentID

The identifier of the ultra-centrifuge.

Definition at line 49 of file us_experiment.h.

QString US_Experiment::instrumentSerial

The serial number of the instrument.

Definition at line 50 of file us_experiment.h.

QString US_Experiment::invGUID

The GUID of the investigator.

Definition at line 41 of file us_experiment.h.

int US_Experiment::invID

The personID of the investigator.

Definition at line 40 of file us_experiment.h.

QString US_Experiment::label

The experiment label, or identifying information.

Definition at line 65 of file us_experiment.h.

int US_Experiment::labID

The lab in which the experiment was conducted.

Definition at line 48 of file us_experiment.h.

QString US_Experiment::name

The name of the investigator.

Definition at line 43 of file us_experiment.h.

QString US_Experiment::operatorGUID

The GUID of the operator.

Definition at line 52 of file us_experiment.h.

int US_Experiment::operatorID

The personID of the person who operated the centrifuge.

Definition at line 51 of file us_experiment.h.

QByteArray US_Experiment::opticalSystem

The type of optical system used.

Definition at line 62 of file us_experiment.h.

US_Project US_Experiment::project

The project this experiment is associated with.

Definition at line 46 of file us_experiment.h.

int US_Experiment::RI_nscans

RI+MWL scans per profile.

Definition at line 73 of file us_experiment.h.

int US_Experiment::RI_nwvlns

RI+MWL wavelengths (profiles count)

Definition at line 74 of file us_experiment.h.

QVector< double > US_Experiment::RIProfile

If RI data, the intensity profile.

Definition at line 71 of file us_experiment.h.

QVector< int > US_Experiment::RIwvlns

For RI+MWL, wavelengths present.

Definition at line 72 of file us_experiment.h.

double US_Experiment::rotorCoeff1

The first rotor stretch calibration coefficient.

Definition at line 58 of file us_experiment.h.

double US_Experiment::rotorCoeff2

The second rotor stretch coefficient.

Definition at line 59 of file us_experiment.h.

QString US_Experiment::rotorGUID

The GUID of the rotor.

Definition at line 54 of file us_experiment.h.

int US_Experiment::rotorID

The rotor that was used.

Definition at line 53 of file us_experiment.h.

QString US_Experiment::rotorName

The name of the rotor.

Definition at line 56 of file us_experiment.h.

QString US_Experiment::rotorSerial

The serial number of the rotor.

Definition at line 55 of file us_experiment.h.

QDate US_Experiment::rotorUpdated

The date of the calibration.

Definition at line 60 of file us_experiment.h.

QList< double > US_Experiment::rpms

A list of rotor speeds observed during the experiment.

Definition at line 63 of file us_experiment.h.

QString US_Experiment::runID

The run ID.

Definition at line 47 of file us_experiment.h.

QString US_Experiment::runTemp

The run temperature.

Definition at line 64 of file us_experiment.h.

bool US_Experiment::syncOK

The user has connected with the db.

Definition at line 69 of file us_experiment.h.


The documentation for this class was generated from the following files: