#include <omgexperiment.h>
Inheritance diagram for OmgExperiment:
Definition at line 45 of file omgexperiment.h.
Public Slots | |
void | abort () |
Signals | |
void | experimentMaximum (int) |
void | experimentProgress (int) |
void | modelCreationProgress (int) |
void | modelProjectionProgress (int) |
void | logMessage (QString) |
void | experimentStopped () |
void | modelCompleted (QString) |
Public Member Functions | |
OmgExperiment () | |
~OmgExperiment () | |
QString | name () |
void | setName (QString theName) |
QString | description () |
void | setDescription (QString theDescription) |
QString | workDir () |
void | setWorkDir (QString theWorkDir) |
QString | currentStatus () |
void | reset () |
bool | isRunning () |
void | addModel (OmgModel *thepModel) |
OmgModel * | getModel (int theModelNo) |
OmgModel * | getModel (QString theGuid) |
void | run () |
void | stop () |
int | count () |
void | clear () |
void | removeModel (QString theGuid) |
void | removeAlgorithm (QString theName) |
void | removeTaxon (QString theName) |
void | removeCompleted () |
OmgModellerPluginInterface * | modellerPlugin () |
void | setModellerPlugin (OmgModellerPluginInterface *theAdapter) |
const QString | toString () |
bool | isAborted () |
QString | toSummaryHtml (bool theForceFlag=false) |
QString | toPrintHtml (bool theForceFlag=false) |
QString | toAlgorithmSummaryHtml (QString theAlgorithmName, bool theForceFlag=false) |
QString | toTaxonSummaryHtml (QString theTaxonName, bool theForceFlag=false) |
void | makeAlgorithmSummaryGraphs (QString theWorkDir) |
void | save () |
QString | toXml () const |
bool | fromXml (const QString theXml) |
Private Member Functions | |
QString | getStatsHtml () |
QString | getGraphsHtml (QString theImagePrefix="", bool theForceFlag=false) |
void | addValueToSummaryGraph (QMap< QString, QList< double > > &theMap, QString theAlgorithmName, double theValue) |
void | summaryMapToGraph (QMap< QString, QList< double > > &theMap, QString theWorkDir, QString theImageSuffix) |
Private Attributes | |
QMutex | mMutex |
QWaitCondition | mCondition |
QString | mName |
QString | mDescription |
QVector< OmgModel * > | mModelVector |
int | mLastPos |
OmgModellerPluginInterface * | mpModellerPlugin |
bool | mAbortFlag |
QString | mWorkDir |
QString | mCurrentStatus |
bool | mRunningFlag |
|
Definition at line 40 of file omgexperiment.cpp. References OmgGuid::guid(), OmgGuid::setGuid(), and setName(). |
Here is the call graph for this function:
|
Definition at line 50 of file omgexperiment.cpp. References mModelVector. |
|
Set the abort flag for this experiment. The experiment will end as soon as the current model is done or sooner if the adapter allows that. Definition at line 420 of file omgexperiment.cpp. References mAbortFlag, and mCurrentStatus. Referenced by OmgExperimentTest::isAborted(). |
|
Add a new model to the experiment queue Definition at line 109 of file omgexperiment.cpp. References logMessage(), mModelVector, and mWorkDir. Referenced by fromXml(), and OmgExperimentDesigner::getExperiment(). |
|
A helper function to add a new record to the map holding data for a summary graph. Typically used by makeAlgorithmSummaryGraphs. If no key exists in theMap for theAlgorithmName, one will be added and a new associated vector will be created.
Definition at line 973 of file omgexperiment.cpp. Referenced by makeAlgorithmSummaryGraphs(). |
|
Clear the model queue for the experiment Definition at line 385 of file omgexperiment.cpp. References mModelVector. |
|
Then number of models to be run in the experiment Definition at line 380 of file omgexperiment.cpp. References mModelVector. Referenced by OmgExperimentPrinter::run(), and run(). |
|
Get the current status of the experiment. Example responses are: "Creating model definition for Acacia mearnsii" "Projecting model for Acacia mearnsii" "Experiment cancelling..." etc.
Definition at line 78 of file omgexperiment.h. |
|
get the description of this experiment Definition at line 75 of file omgexperiment.cpp. References mDescription. |
|
Notify all observers of the experiment size Referenced by run(). |
|
Notify all observers how far the total experiment has progressed Referenced by run(). |
|
Notify all observers that the experiment has stopped Referenced by run(). |
|
Implments the serialisable interface method to reinstate a model. It will try to populate all members of this class and fail gracefully when they are not available (typically by leaving the member tagged as [Not Set] Implements OmgSerialisable. Definition at line 881 of file omgexperiment.cpp. References addModel(), OmgModel::fromXml(), mDescription, mName, OmgGuid::setGuid(), and Omgui::xmlDecode(). Referenced by OmgExperimentTest::run(), and OmgExerimentPrinterTest::run(). |
Here is the call graph for this function:
|
A helper function used by the reporting functions to get graphs html for the experiment Definition at line 714 of file omgexperiment.cpp. References makeAlgorithmSummaryGraphs(), and mWorkDir. Referenced by toPrintHtml(), and toSummaryHtml(). |
Here is the call graph for this function:
|
Overloaded convenience function to Get a model from experiment given its guid. Applies a mutex lock while searching for the model. Be careful about modifying models while the experiment is running. Doing so can put the model into an undefined state.
Definition at line 131 of file omgexperiment.cpp. References OmgGuid::guid(), and mModelVector. |
Here is the call graph for this function:
|
Get a model from experiment given its number. Be careful about modifying models while the experiment is running. Doing so can put the model into an undefined state.
Definition at line 122 of file omgexperiment.cpp. References mModelVector. Referenced by OmgExperimentPrinter::run(). |
|
A helper function used by the reporting functions to get stats for the experiment. Definition at line 514 of file omgexperiment.cpp. References OmgModel::accuracy(), OmgModel::algorithm(), OmgModel::commission(), OmgModel::endDateTimeStamp(), OmgModel::hasError(), OmgModel::isCompleted(), mDescription, mModelVector, mName, OmgModel::omission(), OmgModel::percentCellsPresent(), OmgModel::rocScore(), Omgui::secondsToString(), OmgModel::startDateTimeStamp(), and Omgui::xmlEncode(). Referenced by toPrintHtml(), and toSummaryHtml(). |
Here is the call graph for this function:
|
Find out if the experiment abort flag has been set. Definition at line 415 of file omgexperiment.cpp. References mAbortFlag. Referenced by OmgExperimentTest::isAborted(). |
|
A flag indicating if the experiment is running or stopped / completed.
Definition at line 410 of file omgexperiment.cpp. References mRunningFlag. |
|
Notify listeners of a new log message Referenced by addModel(), run(), and toSummaryHtml(). |
|
A helper function to make algorithm summary graphs
Definition at line 933 of file omgexperiment.cpp. References OmgModel::accuracy(), addValueToSummaryGraph(), OmgModel::algorithm(), OmgModel::commission(), OmgModel::endDateTimeStamp(), mModelVector, OmgModel::omission(), OmgModel::percentCellsPresent(), OmgModel::rocScore(), OmgModel::startDateTimeStamp(), and summaryMapToGraph(). Referenced by getGraphsHtml(), OmgExperimentTest::loadAndGraph(), and OmgExperimentTest::run(). |
Here is the call graph for this function:
|
Notify all listeners that a model completed (including all post processing)
Referenced by run(). |
|
Notify all listeners how far the creation of the current model has progressed |
|
Get the active modeller plugin Definition at line 426 of file omgexperiment.cpp. References mpModellerPlugin. |
|
Notify all listeners how far the projection of the current model has progressed |
|
get the name of this experiment Definition at line 64 of file omgexperiment.cpp. References mName. Referenced by OmgExperimentTest::loadAndGraph(), OmgExperimentTest::run(), OmgExerimentPrinterTest::run(), run(), OmgExperimentTest::saveAndLoadExperiment(), toAlgorithmSummaryHtml(), toSummaryHtml(), and toTaxonSummaryHtml(). |
|
Remove all models that match the algorithm Name Definition at line 160 of file omgexperiment.cpp. References OmgModel::algorithm(), and mModelVector. |
Here is the call graph for this function:
|
Remove all completed models from the queue Definition at line 390 of file omgexperiment.cpp. References OmgModel::isCompleted(), and mModelVector. |
Here is the call graph for this function:
|
Remove a model from the experiment given its Guid Definition at line 145 of file omgexperiment.cpp. References OmgGuid::guid(), and mModelVector. |
Here is the call graph for this function:
|
Remove all models that match the taxon Name Definition at line 174 of file omgexperiment.cpp. References mModelVector, and OmgModel::taxonName(). |
Here is the call graph for this function:
|
Reset the experiement - mark all models reset and clear all internal vars. Definition at line 432 of file omgexperiment.cpp. References mModelVector, and OmgModel::reset(). Referenced by OmgExperimentTest::run(). |
Here is the call graph for this function:
|
Here is the call graph for this function:
|
Save the exeriment Definition at line 370 of file omgexperiment.cpp. References Omgui::createTextFile(), OmgGuid::guid(), mWorkDir, and toXml(). Referenced by run(). |
Here is the call graph for this function:
|
set the description of this experiment Definition at line 80 of file omgexperiment.cpp. References mDescription. Referenced by OmgExperimentDesigner::getExperiment(). |
|
Tell the experiment which modeller adapter instance to use Definition at line 375 of file omgexperiment.cpp. References mpModellerPlugin. Referenced by OmgExperimentDesigner::getExperiment(), and OmgExperimentTest::run(). |
|
set the name of this experiment Definition at line 69 of file omgexperiment.cpp. References mName. Referenced by OmgExperimentDesigner::getExperiment(), OmgExperiment(), OmguiTest::regression1728367(), and OmgExperimentTest::saveAndLoadExperiment(). |
|
Set the workDir of this experiment if the experiment has any models associated with it their work dirs will be updated too. Any new models added to the experiment will have their workdir set to this value.
Definition at line 90 of file omgexperiment.cpp. References OmgModel::algorithm(), mModelVector, mWorkDir, and OmgModel::setWorkDir(). Referenced by OmgExperimentSelector::on_pbnOK_clicked(), OmgExperimentTest::run(), and OmgExerimentPrinterTest::run(). |
Here is the call graph for this function:
|
Stop running anymore models |
|
A helper function to generate a graph from a QMap.
Definition at line 1004 of file omgexperiment.cpp. References OmgGraph::addSeries(), OmgGraph::clear(), OmgDataSeries::fillColor(), OmgGraph::render(), OmgGraph::setAreaFillEnabled(), OmgDataSeries::setFillColor(), OmgGraph::setGridLinesEnabled(), OmgDataSeries::setLabel(), OmgDataSeries::setLineColor(), OmgGraph::setVertexLabelsEnabled(), and OmgDataSeries::setYValuesList(). Referenced by makeAlgorithmSummaryGraphs(). |
Here is the call graph for this function:
|
Create an html formatted sumary of all the models for an Algorithm and return it as a QString suitable for use in a print report using QTextDocument. All paths will be absolute to allow for images etc to display properly..
Definition at line 770 of file omgexperiment.cpp. References OmgModel::algorithm(), mModelVector, name(), and OmgModel::thumbnailFileName(). |
Here is the call graph for this function:
|
Create an html formatted sumary of the experiment and return it as a string for use in printing. The paths to image files will be absolute so that the print properly in the QTextDocument..
Definition at line 500 of file omgexperiment.cpp. References getGraphsHtml(), getStatsHtml(), and mWorkDir. Referenced by OmgExperimentPrinter::run(). |
Here is the call graph for this function:
|
Return a string representation of the whole experiment mainly intended for debugging purposes Definition at line 442 of file omgexperiment.cpp. References mModelVector, and OmgModel::toString(). |
Here is the call graph for this function:
|
Create an html formatted sumary of the experiment and save it to disk.
Definition at line 456 of file omgexperiment.cpp. References Omgui::createTextFile(), getGraphsHtml(), Omgui::getHtmlFooter(), Omgui::getHtmlHeader(), getStatsHtml(), logMessage(), mWorkDir, and name(). Referenced by run(). |
Here is the call graph for this function:
|
Create an html formatted sumary of all the models for an Taxon and return it as a QString suitable for use in a print report using QTextDocument. All paths will be absolute to allow for images etc to display properly..
Definition at line 812 of file omgexperiment.cpp. References OmgModel::algorithm(), mModelVector, name(), OmgModel::taxonName(), and OmgModel::thumbnailFileName(). Referenced by OmgExperimentPrinter::run(). |
Here is the call graph for this function:
|
This method is required for the serialiseable interface. It will encapsulate *all* model properties so that its complete state can be serialised and later deserialised.
Implements OmgSerialisable. Definition at line 861 of file omgexperiment.cpp. References OmgGuid::guid(), mDescription, mModelVector, mName, and OmgModel::toXml(). Referenced by OmguiTest::regression1728367(), OmgExperimentTest::run(), OmgExerimentPrinterTest::run(), save(), and OmgExperimentTest::saveAndLoadExperiment(). |
Here is the call graph for this function:
|
get the workDir of this experiment Definition at line 85 of file omgexperiment.cpp. References mWorkDir. |
|
A flag that gets set when a request has been made to cancel the experiment run. The experiment will abort at the earliest convenient time, depending on the modeller adapter in use. Definition at line 309 of file omgexperiment.h. Referenced by abort(), isAborted(), and run(). |
|
Definition at line 295 of file omgexperiment.h. |
|
A string with the current status of the experiment. This property is read only and not serialised. Example responses are: "Creating model definition for Acacia mearnsii" "Projecting model for Acacia mearnsii" "Experiment cancelling..." etc. Definition at line 321 of file omgexperiment.h. |
|
A description for this experiment Definition at line 299 of file omgexperiment.h. Referenced by description(), fromXml(), getStatsHtml(), setDescription(), and toXml(). |
|
The position in the queue of the last model that was executed Definition at line 303 of file omgexperiment.h. Referenced by run(). |
|
The container for all the models in the queue Definition at line 301 of file omgexperiment.h. Referenced by addModel(), clear(), count(), getModel(), getStatsHtml(), makeAlgorithmSummaryGraphs(), removeAlgorithm(), removeCompleted(), removeModel(), removeTaxon(), reset(), run(), setWorkDir(), toAlgorithmSummaryHtml(), toString(), toTaxonSummaryHtml(), toXml(), and ~OmgExperiment(). |
|
Definition at line 294 of file omgexperiment.h. |
|
A name for this experiment Definition at line 297 of file omgexperiment.h. Referenced by fromXml(), getStatsHtml(), name(), setName(), and toXml(). |
|
The adapter that will be used to run the models Definition at line 305 of file omgexperiment.h. Referenced by modellerPlugin(), run(), and setModellerPlugin(). |
|
A flag to indicate if the experiment is currently running Definition at line 323 of file omgexperiment.h. Referenced by isRunning(), and run(). |
|
The working dir for the experiment. This will be set when the experiment is restored or created and not serialised to disk as part of the experiment. Definition at line 313 of file omgexperiment.h. Referenced by addModel(), getGraphsHtml(), run(), save(), setWorkDir(), toPrintHtml(), toSummaryHtml(), and workDir(). |