[us-commits] r2780 - in trunk/programs: us_convert us_experiment

svn at svn.aucsolutions.com svn at svn.aucsolutions.com
Wed May 29 15:19:35 MDT 2019


Author: alexey
Date: 2019-05-29 21:19:35 +0000 (Wed, 29 May 2019)
New Revision: 2780

Modified:
   trunk/programs/us_convert/us_convert_gui.cpp
   trunk/programs/us_convert/us_convert_gui.h
   trunk/programs/us_experiment/us_experiment_gui_optima.cpp
Log:
autoflow: proper handling of program completion in cases of DA & us_comproject, when execution of the GMP or non-GMP run is monitored...



Modified: trunk/programs/us_convert/us_convert_gui.cpp
===================================================================
--- trunk/programs/us_convert/us_convert_gui.cpp	2019-05-29 07:41:17 UTC (rev 2779)
+++ trunk/programs/us_convert/us_convert_gui.cpp	2019-05-29 21:19:35 UTC (rev 2780)
@@ -1301,7 +1301,13 @@
   runID_numeric     = details_at_live_update[ "runID" ];
 
   Exp_label         = details_at_live_update[ "label" ];
+
+  gmpRun_bool = false;
   
+  if ( details_at_live_update[ "gmpRun" ] == "YES" )
+    gmpRun_bool = true;
+ 
+  
   int impType = getImports_auto( details_at_live_update[ "dataPath" ] );
 
 
@@ -5017,7 +5023,7 @@
 // x  x  x  x  x
    if ( us_convert_auto_mode )   // if us_comproject OR us_comproject_academic
      {
-       if ( usmode )             // us_comproject_academic
+       if ( usmode )             // us_comproject_academic / DA
 	 {
 	   QMessageBox::information( this,
 				     tr( "Save is Complete" ),
@@ -5029,17 +5035,32 @@
 	   emit saving_complete_back_to_exp( ProtocolName_auto );
 	   return;
 	 }
-       else                       // us_comproject
+       else                             // us_comproject
 	 {
-	   // ALEXEY: // If "AUTO" - emit signal to pass to stage 4. Analysis
-	   QMessageBox::information( this,
-				     tr( "Save is Complete" ),
-				     tr( "The save of all data and reports is complete.\n\n"
-					 "The program will switch to Analysis stage." ) );
-	   
-	   // Either emit ONLY if not US_MODE, or do NOT connect with slot on us_comproject...
-	   resetAll_auto();
-	   emit saving_complete_auto( currentDir, ProtocolName_auto  );   
+
+	   if ( !gmpRun_bool )    // us_comproject BUT the run is NOT GMP, so complete here 
+	     {
+	       QMessageBox::information( this,
+					 tr( "Save is Complete" ),
+					 tr( "The save of all data and reports is complete." ) );
+	       
+	       //ALEXY: need to delete autoflow record here
+	       delete_autoflow_record();
+	       resetAll_auto();
+	       emit saving_complete_back_to_exp( ProtocolName_auto );
+	       return;
+	     }
+	   else                   // us_comproject BUT the run IS GMP, so procced                    
+	     {
+	       QMessageBox::information( this,
+					 tr( "Save is Complete" ),
+					 tr( "The save of all data and reports is complete.\n\n"
+					     "The program will switch to Analysis stage." ) );
+	       
+	       // Either emit ONLY if not US_MODE, or do NOT connect with slot on us_comproject...
+	       resetAll_auto();
+	       emit saving_complete_auto( currentDir, ProtocolName_auto  );   
+	     }
 	 }
      }
 }

Modified: trunk/programs/us_convert/us_convert_gui.h
===================================================================
--- trunk/programs/us_convert/us_convert_gui.h	2019-05-29 07:41:17 UTC (rev 2779)
+++ trunk/programs/us_convert/us_convert_gui.h	2019-05-29 21:19:35 UTC (rev 2780)
@@ -266,6 +266,7 @@
 
       QString ProtocolName_auto;
       QString Exp_label;
+      bool    gmpRun_bool;
       
       void getExpInfo_auto ( void );
       void getLabInstrumentOperatorInfo_auto   ( void );

Modified: trunk/programs/us_experiment/us_experiment_gui_optima.cpp
===================================================================
--- trunk/programs/us_experiment/us_experiment_gui_optima.cpp	2019-05-29 07:41:17 UTC (rev 2779)
+++ trunk/programs/us_experiment/us_experiment_gui_optima.cpp	2019-05-29 21:19:35 UTC (rev 2780)
@@ -5366,6 +5366,14 @@
 	 protocol_details[ "expAborted" ]     = QString("NO");
 
 	 protocol_details[ "label" ]          = currProto->exp_label;
+
+	 QString gmpRun_str;
+	 if ( mainw->usmode )
+	   gmpRun_str = "NO";
+	 else
+	   gmpRun_str = "YES";
+
+	 protocol_details[ "gmpRun" ]         = gmpRun_str; 
 	 
          int nwavl_tot = 0;
          for ( int kk = 0; kk < rpRange->nranges; kk++ )
@@ -5418,13 +5426,7 @@
 // Read Protocol details
 void US_ExperGuiUpload::add_autoflow_record( QMap< QString, QString> & protocol_details )
 {
-  QString gmpRun;
-  if ( mainw->usmode )
-    gmpRun = "NO";
-  else
-    gmpRun = "YES";
-
-  qDebug() << "GMPRUN FIELD: " << gmpRun;
+  qDebug() << "GMPRUN FIELD: " << protocol_details[ "gmpRun" ];
     
   // Check DB connection
    US_Passwd pw;
@@ -5451,7 +5453,7 @@
 	    << protocol_details[ "OptimaName" ]
 	    << protocol_details[ "invID_passed" ]
 	    << protocol_details[ "label" ]
-	    << gmpRun;
+	    << protocol_details[ "gmpRun" ];
 
 	db->query( qry );
       }



More information about the us-commits mailing list