Changeset 2827


Ignore:
Timestamp:
Aug 27, 2019 1:05:47 PM (3 months ago)
Author:
alexey
Message:

autoflow: LIVE_UPDATE to Manage Opt. Runs, small further updates...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/programs/us_xpn_viewer/us_xpn_viewer_gui.cpp

    r2826 r2827  
    16561656      //Alternativly: put it in separate thread:
    16571657      //QThread* sys_thread = new QThread(this);
    1658       sys_thread = new QThread(this);
    1659       timer_check_sysdata = new QTimer(0); // parent to 0 !
     1658      //sys_thread = new QThread(this);
     1659      //timer_check_sysdata = new QTimer(0); // parent to 0 !
    16601660      timer_check_sysdata->setInterval(2000);
    16611661      timer_check_sysdata->moveToThread(sys_thread);
     
    19721972  if ( exp_status == 5 || exp_status == 0 )
    19731973    {
    1974       if ( exp_status == 0)
    1975   experimentAborted  = true;
    1976      
    19771974      //timer_check_sysdata->stop();
    19781975      //ALEXEY: This timer cannot be stopped from another thread, but can be dealt with signal/slot upon Qthread termination..
     
    19941991      le_remaining->setText( "00:00:00" );
    19951992      qApp->processEvents();
     1993
     1994      if ( finishing_live_update )
     1995  {
     1996    in_reload_check_sysdata   = false;
     1997    return;
     1998  }
     1999
     2000      if ( exp_status == 0)
     2001  experimentAborted  = true;
    19962002     
    19972003      if ( !timer_all_data_avail->isActive() ) // Check if reload_data Timer is stopped
     
    20002006      {
    20012007        qDebug() << "TRY PROCEED INTO == 5/0 from check_for_sys_data()....";
    2002 
     2008       
    20032009        export_auc_auto();
    20042010       
     
    20092015        updateautoflow_record_atLiveUpdate();
    20102016        //emit experiment_complete_auto( currentDir, ProtocolName, invID_passed, correctRadii  );  // Updtade later: what should be passed with signal ??
    2011 
     2017       
    20122018        reset_auto();
    2013 
     2019       
    20142020        in_reload_check_sysdata   = false;
    20152021       
     
    21382144  timer_data_reload = new QTimer;
    21392145  timer_end_processes = new QTimer;
     2146  timer_check_sysdata = new QTimer(0); // parent to 0 !
     2147  sys_thread = new QThread(this);
    21402148
    21412149
     
    22902298      qApp->processEvents();
    22912299     
    2292       in_reload_end_processes = false;
     2300      in_reload_end_processes = false;
     2301      finishing_live_update = false;
    22932302
    22942303      emit liveupdate_processes_stopped();
    2295        
    2296       //in_reload_end_processes   = false;
     2304     
    22972305    }
    22982306  else
     
    25942602   if ( CheckExpComplete_auto( RunID_to_retrieve ) == 0 ) //ALEXEY should be == 3 as per documentation
    25952603     {
     2604       if ( finishing_live_update )
     2605   {
     2606     timer_all_data_avail->stop();
     2607     disconnect(timer_all_data_avail, SIGNAL(timeout()), 0, 0);   //Disconnect timer from anything
     2608     in_reload_all_data   = false; 
     2609     return;
     2610   }
     2611       
    25962612       qDebug() << "ABORTION IN EARLY STAGE...";
    25972613       
     
    39643980      if ( statusExp == 5 || statusExp == 0 )
    39653981  {
     3982    if ( finishing_live_update )
     3983      {
     3984        timer_data_reload->stop();
     3985        disconnect(timer_data_reload, SIGNAL(timeout()), 0, 0);   //Disconnect timer from anything
     3986        in_reload_auto   = false;
     3987        return;
     3988      }
     3989   
    39663990    if ( statusExp == 0 )
    39673991      experimentAborted  = true;
Note: See TracChangeset for help on using the changeset viewer.