[us-commits] r2825 - in trunk/programs: us_com_project us_xpn_viewer
svn at svn.aucsolutions.com
svn at svn.aucsolutions.com
Tue Aug 27 00:01:40 MDT 2019
Author: alexey
Date: 2019-08-27 06:01:38 +0000 (Tue, 27 Aug 2019)
New Revision: 2825
Modified:
trunk/programs/us_com_project/us_com_project_gui.cpp
trunk/programs/us_com_project/us_com_project_gui.h
trunk/programs/us_xpn_viewer/us_xpn_viewer_gui.cpp
trunk/programs/us_xpn_viewer/us_xpn_viewer_gui.h
Log:
A seemingly stable solution is finally found for arbitrary switching to Manage Optima Runs from actively on-going LIVE UPDATE phase:
* tested transition from all stages of data acqusition (beginning, reloading, updating, together with/without sysdata update)
* all processes are properly finished (sysdata thread/timer, data retrieval/update timers)
* tested from home machine (long DB interaction times) and from demeler3 (short DB interaction times)
* tested on infinitely looped initial data retreival/ data update processes for selected runs; NEEDS testing on real-time experiments
Modified: trunk/programs/us_com_project/us_com_project_gui.cpp
===================================================================
--- trunk/programs/us_com_project/us_com_project_gui.cpp 2019-08-24 13:08:23 UTC (rev 2824)
+++ trunk/programs/us_com_project/us_com_project_gui.cpp 2019-08-27 06:01:38 UTC (rev 2825)
@@ -27,8 +27,6 @@
#endif
-//ALEXEY: reverted, based on v2802
-
//// Constructor: ACADEMIC: 'Data Acquision' / us_comproject_academic programs
US_ComProjectMain::US_ComProjectMain(QString us_mode) : US_Widgets()
{
@@ -344,6 +342,7 @@
connect( this, SIGNAL( import_data_us_convert( QMap < QString, QString > & ) ), epanPostProd, SLOT( import_data_us_convert( QMap < QString, QString > & ) ) );
connect( epanObserv, SIGNAL( close_everything() ), this, SLOT( close_all() ));
connect( this, SIGNAL( reset_live_update() ), epanObserv, SLOT( reset_live_update( ) ) );
+ connect( epanObserv, SIGNAL( processes_stopped() ), this, SLOT( liveupdate_stopped() ));
connect( epanPostProd, SIGNAL( switch_to_editing( QString &, QString &) ), this, SLOT( switch_to_editing( QString &, QString & ) ) );
connect( this, SIGNAL( reset_lims_import() ), epanPostProd, SLOT( reset_lims_import( ) ) );
@@ -386,12 +385,23 @@
/*
1. Avaiting for run to be launched ("Back to Managing Optima Runs") -- SET
2. More complex: Back to Managing runs from active LIVE_UPDATE stage -- stop all timers and other processes...
- */
+ */
+
qDebug() << "Jumping from LIVE UPDATE.";
-
+
//2. Stop all timers/threads, reset GUI - when stopping fully working LIVE UPDATE
if ( !xpn_viewer_closed_soft )
- emit reset_live_update();
+ {
+ show_liveupdate_finishing_msg();
+
+ epanObserv->sdiag->reset_liveupdate_panel_public();
+ qApp->processEvents();
+
+ xpn_viewer_closed_soft = false;
+ //epanInit ->initAutoflowPanel();
+
+ return;
+ }
}
if ( curr_panx == 3 )
@@ -411,6 +421,43 @@
//curr_panx = panx; // Set new current panel
}
+
+// Slot to define new exp. (from initial dialog)
+void US_ComProjectMain::show_liveupdate_finishing_msg( void )
+{
+
+ msg_liveupdate_finishing = new QMessageBox(this);
+ msg_liveupdate_finishing->setIcon(QMessageBox::Information);
+
+ msg_liveupdate_finishing->setWindowFlags ( Qt::CustomizeWindowHint | Qt::WindowTitleHint | Qt::WindowStaysOnTopHint);
+ msg_liveupdate_finishing->setStandardButtons(0);
+ msg_liveupdate_finishing->setWindowTitle(tr("Updating..."));
+ msg_liveupdate_finishing->setText(tr( "Finishing LIVE UPDATE processes... Please wait...") );
+ msg_liveupdate_finishing->setStyleSheet("background-color: #36454f; color : #D3D9DF;");
+
+
+ int tab_width = this->tabWidget->tabBar()->width();
+ int upper_height = this->gen_banner->height() + //this->welcome->height()
+ + this->logWidget->height() + this->test_footer->height();
+
+ int pos_x = this->width()/2 - tab_width;
+ int pos_y = this->height()/2 - upper_height;
+ msg_liveupdate_finishing->move(pos_x, pos_y);
+
+ msg_liveupdate_finishing->show();
+
+ qApp->processEvents();
+
+}
+
+void US_ComProjectMain::liveupdate_stopped( void )
+{
+ //Close message on finishing LIVE_UPDATE processes...
+ msg_liveupdate_finishing->accept();
+
+ epanInit ->initAutoflowPanel();
+}
+
void US_ComProjectMain::closeEvent( QCloseEvent* event )
{
window_closed = true;
@@ -563,7 +610,7 @@
msg_expsetup->setWindowFlags ( Qt::CustomizeWindowHint | Qt::WindowTitleHint | Qt::WindowStaysOnTopHint);
msg_expsetup->setStandardButtons(0);
msg_expsetup->setWindowTitle(tr("Updating..."));
- msg_expsetup->setText(tr( "Setting up Experiment panel... Please wait...") );
+ msg_expsetup->setText(tr( "Setting up EXPERIMENT panel... Please wait...") );
msg_expsetup->setStyleSheet("background-color: #36454f; color : #D3D9DF;");
@@ -1681,6 +1728,8 @@
//ALEXEY: close program, emitted from sdiag
connect( sdiag, SIGNAL( close_program() ), this, SLOT( to_close_program() ) );
+
+ connect( sdiag, SIGNAL( liveupdate_processes_stopped() ), this, SLOT( processes_stopped_passed() ) );
offset = 0;
sdiag->move(offset, 2*offset);
@@ -1722,6 +1771,11 @@
QWidget::resizeEvent(event);
}
+void US_ObservGui::processes_stopped_passed( void )
+{
+ emit processes_stopped();
+}
+
void US_ObservGui::reset_live_update( void )
{
emit reset_live_update_passed();
Modified: trunk/programs/us_com_project/us_com_project_gui.h
===================================================================
--- trunk/programs/us_com_project/us_com_project_gui.h 2019-08-24 13:08:23 UTC (rev 2824)
+++ trunk/programs/us_com_project/us_com_project_gui.h 2019-08-27 06:01:38 UTC (rev 2825)
@@ -35,8 +35,6 @@
#include "us_license.h"
#include "us_select_item.h"
-//ALEXEY: reverted, based on v2802
-
class US_ComProjectMain;
class VerticalTabStyle : public QProxyStyle {
@@ -155,6 +153,7 @@
void pass_used_instruments( QStringList & );
void expsetup_msg_closed( void );
+
signals:
void switch_to_live_update( QMap < QString, QString > & protocol_details );
void set_auto_mode( void );
@@ -174,9 +173,11 @@
US_ObservGui( QWidget* );
~US_ObservGui() {};
+ US_XpnDataViewer* sdiag;
+
private:
US_ComProjectMain* mainw; // Parent to all panels
- US_XpnDataViewer* sdiag;
+ //US_XpnDataViewer* sdiag;
int offset;
protected:
@@ -188,12 +189,14 @@
void to_post_processing( QMap < QString, QString > & );
void to_close_program( void );
void reset_live_update( void );
+ void processes_stopped_passed( void );
signals:
void to_xpn_viewer( QMap < QString, QString > & protocol_details );
//void switch_to_post_processing( QString & currDir, QString & protocolName, QString & invID_passed, QString & correctRadii );
void switch_to_post_processing( QMap < QString, QString > & );
void close_everything( void );
void reset_live_update_passed( void );
+ void processes_stopped( void );
};
@@ -330,6 +333,8 @@
bool us_mode_bool;
QMessageBox * msg_expsetup;
+ QMessageBox * msg_liveupdate_finishing;
+
QDialog * diag_expsetup;
//QList< QStringList > autoflowdata;
@@ -393,8 +398,11 @@
void define_new_experiment( QStringList & );
void delete_psql_record( int );
- //void update_autoflow_data( void );
+ void liveupdate_stopped( void );
+
+ void show_liveupdate_finishing_msg( void );
+
signals:
void pass_to_live_update( QMap < QString, QString > & protocol_details );
//void import_data_us_convert( QString & currDir, QString & protocolName, QString & invID_passed, QString & correctRadii );
Modified: trunk/programs/us_xpn_viewer/us_xpn_viewer_gui.cpp
===================================================================
--- trunk/programs/us_xpn_viewer/us_xpn_viewer_gui.cpp 2019-08-24 13:08:23 UTC (rev 2824)
+++ trunk/programs/us_xpn_viewer/us_xpn_viewer_gui.cpp 2019-08-27 06:01:38 UTC (rev 2825)
@@ -45,8 +45,6 @@
#define DbgLv(a) if(dbg_level>=a)qDebug()
#endif
-//ALEXEY: reverted, based on v2802
-
// DialBox
DialBox::DialBox( QWidget *parent ):
QWidget( parent )
@@ -243,10 +241,12 @@
rlt_id = 0;
currentDir = "";
in_reload_auto = false;
+ finishing_live_update = false;
in_reload_all_data = false;
in_reload_data_init = false;
in_reload_check_sysdata = false;
-
+ in_reload_end_processes = false;
+
ElapsedTimeOffset = 0;
//ALEXEY: new way
@@ -1164,6 +1164,12 @@
le_runID ->setText( runID );
//le_dbhost ->setText( xpnhost + ":" + xpnport + " (" + xpndesc + ")" ); //New
+ //Also clear Wavelengths && Lambda ranges:
+ cb_pltrec ->disconnect();
+ cb_pltrec ->clear();
+ le_lrange ->setText("");
+
+
pb_loadXpn ->setEnabled( true );
pb_loadAUC ->setEnabled( true );
pb_details ->setEnabled( false );
@@ -1230,9 +1236,14 @@
le_elapsed ->setText("00:00:00");
le_remaining->setText("00:00:00");
le_running ->setText("00:00:00");
-
+
connect( cb_cellchn, SIGNAL( currentIndexChanged( int ) ),
- this, SLOT ( changeCellCh( ) ) );
+ this, SLOT ( changeCellCh( ) ) );
+
+ connect( cb_pltrec, SIGNAL( currentIndexChanged( int ) ),
+ this, SLOT ( changeRecord( ) ) );
+
+
// connect( plot, SIGNAL( zoomedCorners( QRectF ) ),
// this, SLOT ( currentRectf ( QRectF ) ) );
@@ -1248,6 +1259,8 @@
xpn_data->clear();
le_status->setText( tr( "(no data loaded)" ) );
+ runID = "";
+ data_plot->setTitle( tr( "Intensity Data" ) );
}
// Slot to read all Optima machines <------------------------------- // New
@@ -1536,8 +1549,8 @@
int dbport = xpnport.toInt();
if ( xpn_data->connect_data( dbhost, dbport, xpnname, xpnuser, xpnpasw ) )
{
- if ( dbg_level > 0 )
- xpn_data->dump_tables();
+ // if ( dbg_level > 0 )
+ // xpn_data->dump_tables();
// Implement: query ExperiementRun and based on ExpID build array of RunIDs, find the bigger (the latest) and call it RunID_to_retrieve
RunID_to_retrieve = QString::number(xpn_data->get_runid( ExpID_to_use ));
@@ -1582,6 +1595,17 @@
msg_data_avail->accept();
//msg_data_avail->close();
//ok_msg_data->click();
+
+ //ALEXEY: make sure ExpID is coupled to the RunID which is already in the autoflow DB
+ if ( !runID_passed.isEmpty() || runID_passed != "NULL" )
+ {
+ if ( runID_passed.toInt() != RunID_to_retrieve.toInt() )
+ {
+ RunID_to_retrieve = runID_passed;
+ qDebug() << "Correcting RunID to : " << RunID_to_retrieve;
+ }
+ }
+
//ALEXEY: need to update 'autoflow' table with the unique RunID_to_retrieve && Start Run Time fields !!!
//Conditional: Do it ONLY once !!!
@@ -1618,7 +1642,7 @@
time_data.clear();
// Check if all triple info is available
- timer_all_data_avail = new QTimer;
+ //timer_all_data_avail = new QTimer;
connect(timer_all_data_avail, SIGNAL(timeout()), this, SLOT( retrieve_xpn_raw_auto ( ) ));
timer_all_data_avail->start(5000); // 5 sec
@@ -1942,10 +1966,10 @@
qApp->processEvents();
qDebug() << "SYS_STAT: After replot(), BEFORE CheExpStat!! ";
-
+
int exp_status = CheckExpComplete_auto( RunID_to_retrieve );
- if ( exp_status == 5 || exp_status == 0 )
+ if ( exp_status == 55 || exp_status == 10 )
{
if ( exp_status == 0)
experimentAborted = true;
@@ -1986,6 +2010,9 @@
//emit experiment_complete_auto( currentDir, ProtocolName, invID_passed, correctRadii ); // Updtade later: what should be passed with signal ??
reset_auto();
+
+ in_reload_check_sysdata = false;
+
emit experiment_complete_auto( details_at_live_update );
return;
@@ -2079,6 +2106,9 @@
//Query for Optima DB periodically, see if data available
void US_XpnDataViewer::check_for_data( QMap < QString, QString > & protocol_details)
{
+ //Also reset the panel before reattachement
+ //reset_auto();
+
xpn_data->setEtimOffZero(); //ALEXEY: intialize etimoff to zero for the first time
experimentAborted = false;
@@ -2102,7 +2132,13 @@
details_at_live_update = protocol_details;
selectOptimaByName_auto( OptimaName ); //New
-
+
+ //ALEXEY: just define all QTimers here for later safe stopping
+ timer_all_data_avail = new QTimer;
+ timer_data_reload = new QTimer;
+ timer_end_processes = new QTimer;
+
+
timer_data_init = new QTimer;
connect(timer_data_init, SIGNAL(timeout()), this, SLOT( load_xpn_raw_auto( ) ));
timer_data_init->start(5000); // 5 sec
@@ -2143,7 +2179,16 @@
}
}
+
// Reset LIVE UPDATE panel && stop timers && quit threads
+void US_XpnDataViewer::reset_liveupdate_panel_public ( void )
+{
+ finishing_live_update = true;
+ reset_liveupdate_panel();
+}
+
+
+// Reset LIVE UPDATE panel && stop timers && quit threads
void US_XpnDataViewer::reset_liveupdate_panel ( void )
{
//Quit sys_thread, emit finished() to stop timer_check_sysdata from withing thread
@@ -2158,6 +2203,8 @@
{
timer_check_sysdata->stop();
disconnect(timer_check_sysdata, SIGNAL(timeout()), 0, 0);
+
+ qDebug() << "Stopping timer_check_sysdata";
}
//Stop other timers if active
@@ -2165,18 +2212,24 @@
{
timer_all_data_avail->stop();
disconnect(timer_all_data_avail, SIGNAL(timeout()), 0, 0);
+
+ qDebug() << "Stopping timer_all_data_avail";
}
if ( timer_data_reload->isActive() )
{
timer_data_reload->stop();
disconnect(timer_data_reload, SIGNAL(timeout()), 0, 0);
+
+ qDebug() << "Stopping timer_data_reload";
}
if ( timer_data_init->isActive() )
{
timer_data_init->stop();
disconnect(timer_data_init, SIGNAL(timeout()), 0, 0);
+
+ qDebug() << "Stopping timer_data_init";
}
qApp->processEvents();
@@ -2197,20 +2250,59 @@
if ( !timer_data_reload->isActive() )
qDebug() << "QTimer timer_data_reload STOPPED by clickig Manage Optima runs !!! ";
/*************************************/
-
- reset_auto();
- qDebug() << in_reload_auto << ", " << in_reload_all_data << ", " << in_reload_data_init << ", " << in_reload_check_sysdata;
+ qDebug() << "BEFORE: " << in_reload_auto << ", " << in_reload_all_data << ", " << in_reload_data_init << ", " << in_reload_check_sysdata;
- in_reload_auto = false;
- in_reload_all_data = false;
- in_reload_data_init = false;
- in_reload_check_sysdata = false;
+ //ALEXEY: should wait for execution of all below variables to be false (end of all timer functions) BEFORE reset_all();
+ // Introduce QTimer which checks for all abpve vartibales to be false (check all related functions to always reset them to false on completion)
+ // Put reset_auto() into the timer && and stop/disconnect timer from within connected SLOT.
+ //timer_end_processes = new QTimer;
+ connect(timer_end_processes, SIGNAL(timeout()), this, SLOT( end_processes ( ) ));
+ timer_end_processes->start(1000); // 5 sec
qApp->processEvents();
}
+//to end all existing update processes
+void US_XpnDataViewer::end_processes( void )
+{
+ qDebug() << "In the END process: in_reload_end_processes = " << in_reload_end_processes;
+
+ if ( in_reload_end_processes ) // If already doing a reload,
+ return; // skip starting a new one
+
+ in_reload_end_processes = true; // Flag in the midst of a reload
+
+ qDebug() << "Checking if processes STOPPED.";
+ qDebug() << "MIDDLE: " << in_reload_auto << ", " << in_reload_all_data << ", " << in_reload_data_init << ", " << in_reload_check_sysdata;
+
+ if ( !in_reload_auto && !in_reload_all_data && !in_reload_data_init && !in_reload_check_sysdata )
+ {
+
+ timer_end_processes->stop();
+ disconnect(timer_end_processes, SIGNAL(timeout()), 0, 0); //Disconnect timer from anything
+ //ALEXEY: may not be needed
+ qDebug() << "LIVE UPDATE panel has been reset!";
+ qDebug() << "AFTER: " << in_reload_auto << ", " << in_reload_all_data << ", " << in_reload_data_init << ", " << in_reload_check_sysdata;
+
+ reset_auto();
+ qApp->processEvents();
+
+ in_reload_end_processes = false;
+
+ emit liveupdate_processes_stopped();
+
+ //in_reload_end_processes = false;
+ }
+ else
+ {
+ in_reload_end_processes = false;
+ qApp->processEvents();
+ }
+}
+
+
//void US_XpnDataViewer::retrieve_xpn_raw_auto( QString & RunID )
void US_XpnDataViewer::retrieve_xpn_raw_auto( void )
{
@@ -2499,7 +2591,7 @@
qDebug() << "TripleNumber, ntriple " << TripleNumber.toInt() << ", " << ntriple;
//ALEXEY: Add Exp. Abortion Exception HERE...
- if ( CheckExpComplete_auto( RunID_to_retrieve ) == 0 ) //ALEXEY should be == 3 as per documentation
+ if ( CheckExpComplete_auto( RunID_to_retrieve ) == 10 ) //ALEXEY should be == 3 as per documentation
{
qDebug() << "ABORTION IN EARLY STAGE...";
@@ -2514,70 +2606,32 @@
updateautoflow_record_atLiveUpdate();
reset_auto();
+
+ in_reload_all_data = false;
+
emit experiment_complete_auto( details_at_live_update );
return;
}
}
+
- // //ALEXEY: Add Exp. Abortion Exception HERE...
- // if ( CheckExpComplete_auto( RunID_to_retrieve ) == 0 ) //ALEXEY should be == 3 as per documentation
- // {
- // experimentAborted = true;
-
- // timer_all_data_avail->stop();
- // disconnect(timer_all_data_avail, SIGNAL(timeout()), 0, 0); //Disconnect timer from anything
-
- // if ( !timer_check_sysdata->isActive() ) // Check if sys_data Timer is stopped
- // {
- // // Ask if data retrived so far should be saved:
-
- // QMessageBox msgBox;
- // msgBox.setText(tr("Experiment was aborted!"));
- // msgBox.setInformativeText("The data retrieved so far can be saved or disregarded. If saved, the program will proceed to the next stage (Editing). Otherwise, it will return to the initial stage (Experiment), all data will be lost.");
- // msgBox.setWindowTitle(tr("Experiment Abortion"));
- // QPushButton *Save = msgBox.addButton(tr("Save Data"), QMessageBox::YesRole);
- // QPushButton *Ignore = msgBox.addButton(tr("Ignore Data"), QMessageBox::RejectRole);
-
- // msgBox.setIcon(QMessageBox::Question);
- // msgBox.exec();
-
- // if (msgBox.clickedButton() == Save)
- // {
- // export_auc_auto();
-
- // QString mtitle_complete = tr( "Complete!" );
- // QString message_done = tr( "Experiment was completed. Optima data saved..." );
- // QMessageBox::information( this, mtitle_complete, message_done );
-
- // updateautoflow_record_atLiveUpdate();
- // emit experiment_complete_auto( currentDir, ProtocolName, invID_passed, correctRadii ); // Updtade later: what should be passed with signal ??
- // return;
- // }
-
- // else if (msgBox.clickedButton() == Ignore)
- // {
- // reset();
- // delete_autoflow_record();
- // emit return_to_experiment( ProtocolName );
- // return;
- // }
- // }
- // }
-
-
if ( cellchans.count() == CellChNumber.toInt() && ntriple == TripleNumber.toInt() ) // <--- Change to the values from the protocol
{
//stop timer
timer_all_data_avail->stop();
disconnect(timer_all_data_avail, SIGNAL(timeout()), 0, 0); //Disconnect timer from anything
+
+ in_reload_all_data = false;
// Auto-update hereafter
- timer_data_reload = new QTimer;
- connect(timer_data_reload, SIGNAL(timeout()), this, SLOT( reloadData_auto( ) ));
- timer_data_reload->start(10000); // 5 sec
+ //timer_data_reload = new QTimer;
- in_reload_all_data = false;
+ if ( !finishing_live_update )
+ {
+ connect(timer_data_reload, SIGNAL(timeout()), this, SLOT( reloadData_auto( ) ));
+ timer_data_reload->start(10000); // 5 sec
+ }
}
in_reload_all_data = false;
@@ -3081,9 +3135,9 @@
// Make sure ranges are set up, then build an averaged data vector
compute_ranges();
-//DbgLv(1) << "PltA: kpoint" << kpoint << "datsize" << curr_adata.size();
-DbgLv(1) << "PltA: kpoint" << kpoint << "trpxs" << trpxs
- << "nscan" << nscan << allData[trpxs].scanCount();
+ // DbgLv(1) << "PltA: kpoint" << kpoint << "datsize" << curr_adata.size();
+ DbgLv(1) << "PltA: kpoint" << kpoint << "trpxs" << trpxs;
+// << "nscan" << nscan << allData[trpxs].scanCount();
// Build the X,Y vectors
QVector< double > rvec( kpoint );
QVector< double > vvec( kpoint );
@@ -3907,7 +3961,7 @@
/*** Check Experiement Status: if completed, kill the timer, export the data into AUC format, return, signal to switch panels in US_comproject ***/
int statusExp = CheckExpComplete_auto( RunID_to_retrieve );
- if ( statusExp == 5 || statusExp == 0 )
+ if ( statusExp == 55 || statusExp == 10 )
{
if ( statusExp == 0 )
experimentAborted = true;
@@ -3929,8 +3983,11 @@
// QMessageBox::information( this, mtitle_complete, message_done );
updateautoflow_record_atLiveUpdate();
+
reset_auto();
-
+
+ in_reload_auto = false;
+
//emit experiment_complete_auto( currentDir, ProtocolName, invID_passed, correctRadii ); // Updtade later: what should be passed with signal ??
emit experiment_complete_auto( details_at_live_update );
@@ -3939,54 +3996,11 @@
}
- // /** Experiment Aborted ***/
-
- // if ( statusExp == 0 ) //ALEXEY should be == 3 as per documentation
- // {
- // experimentAborted = true;
-
- // timer_data_reload->stop();
- // disconnect(timer_data_reload, SIGNAL(timeout()), 0, 0); //Disconnect timer from anything
-
- // if ( !timer_check_sysdata->isActive() ) // Check if sys_data Timer is stopped
- // {
- // // Ask if data retrived so far should be saved:
-
- // QMessageBox msgBox;
- // msgBox.setText(tr("Experiment was aborted!"));
- // msgBox.setInformativeText("The data retrieved so far can be saved or disregarded. If saved, the program will proceed to the next stage (Editing). Otherwise, it will return to the initial stage (Experiment), all data will be lost.");
- // msgBox.setWindowTitle(tr("Experiment Abortion"));
- // QPushButton *Save = msgBox.addButton(tr("Save Data"), QMessageBox::YesRole);
- // QPushButton *Ignore = msgBox.addButton(tr("Ignore Data"), QMessageBox::RejectRole);
-
- // msgBox.setIcon(QMessageBox::Question);
- // msgBox.exec();
-
- // if (msgBox.clickedButton() == Save)
- // {
- // export_auc_auto();
-
- // QString mtitle_complete = tr( "Complete!" );
- // QString message_done = tr( "Experiment was completed. Optima data saved..." );
- // QMessageBox::information( this, mtitle_complete, message_done );
-
- // updateautoflow_record_atLiveUpdate();
- // emit experiment_complete_auto( currentDir, ProtocolName, invID_passed, correctRadii ); // Updtade later: what should be passed with signal ??
- // return;
- // }
-
- // else if (msgBox.clickedButton() == Ignore)
- // {
- // reset();
- // delete_autoflow_record();
- // emit return_to_experiment( ProtocolName );
- // return;
- // }
- // }
- // }
-
-
+
in_reload_auto = false; // Flag no longer in the midst of reload
+
+ qDebug() << "Exit from reloaData with no change!";
+
return; // Return with no change in AUC data
}
double tm1=(double)sttime.msecsTo(QDateTime::currentDateTime())/1000.0;
@@ -4014,7 +4028,10 @@
// Do resets and re-plot the current triple
changeCellCh();
+
in_reload_auto = false; // Flag no longer in the midst of reload
+
+ qDebug() << "Exit from reloaData with SOME change!";
}
Modified: trunk/programs/us_xpn_viewer/us_xpn_viewer_gui.h
===================================================================
--- trunk/programs/us_xpn_viewer/us_xpn_viewer_gui.h 2019-08-24 13:08:23 UTC (rev 2824)
+++ trunk/programs/us_xpn_viewer/us_xpn_viewer_gui.h 2019-08-27 06:01:38 UTC (rev 2825)
@@ -25,8 +25,6 @@
#include "us_xpn_run_auc.h"
-//ALEXEY: reverted, based on v2802
-
class SpeedoMeter: public QwtDial
{
@@ -97,6 +95,8 @@
// New constructor for automated read/upload/update
US_XpnDataViewer(QString auto_mode);
+ void reset_liveupdate_panel_public ( void );
+
private:
bool auto_mode_bool;
@@ -250,11 +250,14 @@
bool haveData;
bool haveTmst;
bool in_reload;
+
bool in_reload_auto;
+ bool finishing_live_update;
bool in_reload_data_init;
bool in_reload_all_data;
bool in_reload_check_sysdata;
+ bool in_reload_end_processes;
double last_xmin;
@@ -269,6 +272,8 @@
QTimer* timer_all_data_avail;
QTimer* timer_check_sysdata;
+ QTimer* timer_end_processes;
+
QElapsedTimer* elapsed_timer;
QTimer* timer_sys_thread;
@@ -310,6 +315,7 @@
//void retrieve_xpn_raw_auto ( QString & );
void retrieve_xpn_raw_auto ( void );
+ void end_processes ( void );
void reloadData_auto ( void );
int CheckExpComplete_auto( QString & );
void update_autoflow_runId_timeStarted( void );
@@ -367,6 +373,7 @@
void return_to_experiment( QString & );
void close_program( void );
+ void liveupdate_processes_stopped( void );
};
#endif
More information about the us-commits
mailing list