us-commits
Threads by month
- ----- 2026 -----
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
May 2019
- 1 participants
- 37 discussions
Author: alexey
Date: 2019-05-20 04:12:52 +0000 (Mon, 20 May 2019)
New Revision: 290
Modified:
trunk/queue_viewer.php
Log:
Bugs fixed for job abortion for local HPCs from LIMS instances (from browser)
Modified: trunk/queue_viewer.php
===================================================================
--- trunk/queue_viewer.php 2019-05-10 18:36:15 UTC (rev 289)
+++ trunk/queue_viewer.php 2019-05-20 04:12:52 UTC (rev 290)
@@ -100,6 +100,7 @@
// A function to delete the selected job
function do_delete()
{
+
global $clusters, $uses_thrift; // From utility.php
global $info;
// var_dump($uses_thrift);
@@ -110,16 +111,17 @@
$found = false;
foreach ( $clusters as $info )
{
- if ( $cluster == $info->name )
+ if ( $cluster == $info->name ) // $info->name = demeler3.uleth.ca - IS THIS $_POST['cluster'] ??
{
- $shortname = $info->short_name;
- $found = true;
+ $shortname = $info->short_name; // $info->short_name = demeler3-local
+ $found = true;
break;
}
}
if ( ! $found ) return;
+
// We need to find out if it's a GFAC or local job
if ( preg_match( "/us3iab/", $shortname ) )
{
@@ -139,11 +141,14 @@
$clus_thrift = true;
}
+ //$shortname = preg_replace( "/\-local/", "", $shortname );
+ //exec("/usr/bin/ssh -x us3@$shortname.uleth.ca qdel $gfacID 2>&1");
+
switch ( $shortname )
{
case 'jetstream-local' :
- case 'taito-local' :
- case 'demeler3-local':
+ case 'taito-local-local' : // Easy solution: Need this because of the above "Not a GFAC ID" logic above
+ case 'demeler3-local-local': // Easy solution: Need this because of the above "Not a GFAC ID" logic above
case 'us3iab-node0' :
case 'us3iab-node1' :
case 'us3iab-devel' :
@@ -172,8 +177,10 @@
$status = cancelJob( $gfacID );
break;
- default :
+ default:
+ //exec("/usr/bin/ssh -x us3(a)demeler3.uleth.ca qdel $gfacID 2>&1");
break;
+
}
}
@@ -181,8 +188,17 @@
function cancelLocalJob( $cluster, $gfacID )
{
$system = "$cluster.uthscsa.edu";
+
$is_jetstr = preg_match( "/jetstream/", $cluster );
$is_local = preg_match( "/-local/", $cluster );
+ $is_demeler3 = preg_match( "/demeler3/", $cluster );
+
+
+ if ( $is_demeler3 )
+ {
+ $system = "$cluster.uleth.ca";
+ }
+
if ( $is_jetstr )
{
$system = "js-169-137.jetstream-cloud.org";
@@ -191,8 +207,9 @@
else
{
$cmd = "qstat -a $gfacID 2>&1|tail -n 1";
+
if ( $is_local )
- {
+ {
$system = preg_replace( "/\-local/", "", $system );
$cmd = "/usr/bin/ssh -x us3@$system $cmd";
}
@@ -245,11 +262,18 @@
$cmd = "qdel $jobID 2>&1";
if ( $is_local )
{
- $cmd = "/usr/bin/ssh -x us3@$system $cmd";
+ $cmd = "/usr/bin/ssh -x us3@$system $cmd";
+
+ if ( $is_demeler3 )
+ {
+ $cmd = "/usr/bin/ssh -x us3(a)demeler3.uleth.ca qdel $gfacID 2>&1";
+ }
+
}
}
$result = exec( $cmd );
+
$lastMessage = "This job has been canceled";
break;
}
@@ -357,6 +381,8 @@
// Function to update the status on an arbitrary lims database
function updateLimsStatus( $gfacID, $status, $message )
{
+
+ //include 'config.php';
global $globaldbhost;
global $globaldbuser;
global $globaldbpasswd;
1
0
Author: demeler
Date: 2019-05-19 19:16:17 +0000 (Sun, 19 May 2019)
New Revision: 2771
Modified:
trunk/programs/us_mwl_species_fit/us_mwl_species_fit.cpp
Log:
Fixed inability to load comma separated spectral species file, plus added error handler for invalid file format
Modified: trunk/programs/us_mwl_species_fit/us_mwl_species_fit.cpp
===================================================================
--- trunk/programs/us_mwl_species_fit/us_mwl_species_fit.cpp 2019-05-19 18:17:41 UTC (rev 2770)
+++ trunk/programs/us_mwl_species_fit/us_mwl_species_fit.cpp 2019-05-19 19:16:17 UTC (rev 2771)
@@ -715,6 +715,16 @@
{ // Parse wavelength, concentration from each file line
fline = tsi.readLine().simplified();
int lnf1 = fline.indexOf( " " );
+DbgLv(1) << "lnf1:" << lnf1;
+ if (lnf1 == -1) lnf1 = fline.indexOf( "," ); // if there was no space found, try comma
+ if (lnf1 == -1) lnf1 = fline.indexOf( "\t" ); // if still -1, try tab
+ if (lnf1 == -1)
+ {
+ QMessageBox::warning( this, tr("IO Error"),
+ tr("The file:\n") + fname + tr("\nis not in the correct format.\n") +
+ tr("The file should have 2 columns that are comma or space separated."));
+ return;
+ }
int iwavl = QString( fline ).left( lnf1 ).toInt();
double conc = QString( fline ).mid( lnf1 + 1 ).toDouble();
@@ -813,6 +823,8 @@
{ // Get wavelength,concentration vectors for this species
cswavls << spwavls[ kw ];
csconcs << spconcs[ kw ];
+DbgLv(1) << "sfd: Get wavelength,concentration vectors for species " << ii << ":" << spwavls[ kw ] << spconcs[ kw ];
+
}
DbgLv(1) << "sfd: sp" << ii << "nwavl" << nwavl;
@@ -832,6 +844,7 @@
iwavl > cswavls[ nwavl - 1 ] )
{ // Data wavelength beyond species range: use zero concentration
cval = 0.0;
+DbgLv(1) << "Data wavelength beyond species range: " << iwavl;
}
else
1
0
Author: demeler
Date: 2019-05-19 18:17:41 +0000 (Sun, 19 May 2019)
New Revision: 2770
Modified:
trunk/programs/us_xpn_viewer/us_xpn_viewer_gui.cpp
Log:
changed from 2 to 3 multipliers for counters to better deal with runs with more than 100 scans/triple.
Modified: trunk/programs/us_xpn_viewer/us_xpn_viewer_gui.cpp
===================================================================
--- trunk/programs/us_xpn_viewer/us_xpn_viewer_gui.cpp 2019-05-18 20:56:17 UTC (rev 2769)
+++ trunk/programs/us_xpn_viewer/us_xpn_viewer_gui.cpp 2019-05-19 18:17:41 UTC (rev 2770)
@@ -336,8 +336,8 @@
QLabel* lb_scanctl = us_banner( tr( "Scan Control" ) );
QLabel* lb_from = us_label( tr( "From:" ) );
QLabel* lb_to = us_label( tr( "To:" ) );
- ct_from = us_counter( 2, 0, 500, 1 );
- ct_to = us_counter( 2, 0, 500, 1 );
+ ct_from = us_counter( 3, 0, 500, 1 );
+ ct_to = us_counter( 3, 0, 500, 1 );
pb_exclude = us_pushbutton( tr( "Exclude Scan Range" ) );
pb_include = us_pushbutton( tr( "Include All Scans" ) );
ct_from ->setFont( sfont );
@@ -888,8 +888,8 @@
QLabel* lb_scanctl = us_banner( tr( "Scan Control" ) );
QLabel* lb_from = us_label( tr( "From:" ) );
QLabel* lb_to = us_label( tr( "To:" ) );
- ct_from = us_counter( 2, 0, 500, 1 );
- ct_to = us_counter( 2, 0, 500, 1 );
+ ct_from = us_counter( 3, 0, 500, 1 );
+ ct_to = us_counter( 3, 0, 500, 1 );
pb_exclude = us_pushbutton( tr( "Exclude Scan Range" ) );
pb_include = us_pushbutton( tr( "Include All Scans" ) );
ct_from ->setFont( sfont );
1
0
May 18, 2019
Author: alexey
Date: 2019-05-18 20:56:17 +0000 (Sat, 18 May 2019)
New Revision: 2769
Modified:
trunk/programs/us_com_project/us_com_project_gui.cpp
trunk/programs/us_experiment/us_experiment_gui_optima.cpp
trunk/programs/us_experiment/us_experiment_gui_optima.h
Log:
Autoflow: bug fixed for proper job reatt./submission another run listing availale instruments correctly...
Modified: trunk/programs/us_com_project/us_com_project_gui.cpp
===================================================================
--- trunk/programs/us_com_project/us_com_project_gui.cpp 2019-05-18 04:00:52 UTC (rev 2768)
+++ trunk/programs/us_com_project/us_com_project_gui.cpp 2019-05-18 20:56:17 UTC (rev 2769)
@@ -464,6 +464,14 @@
{
//ALEXEY: define what to do if some Optima(s) are occupied
// should emit signal sending list of optima's in use to us_experiment.
+
+ QString list_instruments_in_use = occupied_instruments.join(", ");
+ QMessageBox::warning( this, tr( "Occupied Instruments" ),
+ tr( "The following Optima instrument(s) \n"
+ "are currently in use: \n\n"
+ "%1 \n\n"
+ "You will not be able to submit another run \n"
+ "to these instruments at the moment.").arg( list_instruments_in_use ) );
define_new_experiment( occupied_instruments );
return;
@@ -710,6 +718,8 @@
{
tabWidget->setCurrentIndex( 0 ); // Maybe lock this panel from now on? i.e. tabWidget->tabBar()-setEnabled(false) ??
+ qDebug() << "In define_new_experiment( QStringList & occupied_instruments )";
+
emit pass_used_instruments( occupied_instruments );
}
@@ -947,6 +957,7 @@
void US_ExperGui::pass_used_instruments( QStringList & occupied_instruments )
{
+ qDebug() << "In US_ExperGui::pass_used_instruments( QStringList & occupied_instruments )";
emit define_used_instruments( occupied_instruments );
}
Modified: trunk/programs/us_experiment/us_experiment_gui_optima.cpp
===================================================================
--- trunk/programs/us_experiment/us_experiment_gui_optima.cpp 2019-05-18 04:00:52 UTC (rev 2768)
+++ trunk/programs/us_experiment/us_experiment_gui_optima.cpp 2019-05-18 20:56:17 UTC (rev 2769)
@@ -184,7 +184,7 @@
}
-void US_ExperimentMain::exclude_used_instrument( QStringList & occupied_instruments )
+void US_ExperimentMain::exclude_used_instruments( QStringList & occupied_instruments )
{
instruments_in_use.clear();
qDebug() << "OCCUPIED IINSTRUMENTS: " << occupied_instruments;
Modified: trunk/programs/us_experiment/us_experiment_gui_optima.h
===================================================================
--- trunk/programs/us_experiment/us_experiment_gui_optima.h 2019-05-18 04:00:52 UTC (rev 2768)
+++ trunk/programs/us_experiment/us_experiment_gui_optima.h 2019-05-18 20:56:17 UTC (rev 2769)
@@ -914,7 +914,6 @@
void auto_mode_passed( void );
void us_mode_passed( void );
- void exclude_used_instrument( QStringList &);
QStringList instruments_in_use;
int tabHeight;
@@ -957,7 +956,7 @@
void us_exp_clear( QString &protocolName );
//void auto_mode_passed( void );
void reset ( void );
-
+ void exclude_used_instruments( QStringList &);
signals:
void us_exp_is_closed( void );
void to_live_update( QMap < QString, QString > &protocol_details );
1
0
r2768 - in trunk: gui programs/us_com_project programs/us_convert programs/us_experiment programs/us_xpn_viewer sql
by svn@svn.aucsolutions.com May 17, 2019
by svn@svn.aucsolutions.com May 17, 2019
May 17, 2019
Author: alexey
Date: 2019-05-18 04:00:52 +0000 (Sat, 18 May 2019)
New Revision: 2768
Modified:
trunk/gui/us_select_item.cpp
trunk/gui/us_select_item.h
trunk/programs/us_com_project/us_com_project_gui.cpp
trunk/programs/us_com_project/us_com_project_gui.h
trunk/programs/us_convert/us_convert_gui.cpp
trunk/programs/us_convert/us_convert_gui.h
trunk/programs/us_experiment/us_exp_utils.cpp
trunk/programs/us_experiment/us_experiment_gui_optima.cpp
trunk/programs/us_experiment/us_experiment_gui_optima.h
trunk/programs/us_xpn_viewer/us_xpn_viewer_gui.cpp
trunk/programs/us_xpn_viewer/us_xpn_viewer_gui.h
trunk/sql/us3.sql
trunk/sql/us3_autoflow_procs.sql
Log:
Lots of updates on autoflow:
* redesign of manual abortion of experiemnt
-- stored procs, different logic for stage update
* Logic for 'Define Another Experiment' implemented
-- exclusion of instruments in-use
Needs LOTS of testing....
Modified: trunk/gui/us_select_item.cpp
===================================================================
--- trunk/gui/us_select_item.cpp 2019-05-17 17:01:58 UTC (rev 2767)
+++ trunk/gui/us_select_item.cpp 2019-05-18 04:00:52 UTC (rev 2768)
@@ -169,8 +169,10 @@
if ( autoflow_button )
cancel_pb_label = tr("Define Another Experiment");
- QPushButton* pb_cancel = us_pushbutton( cancel_pb_label );
+ //QPushButton* pb_cancel = us_pushbutton( cancel_pb_label );
+ pb_cancel = us_pushbutton( cancel_pb_label );
+
QString accept_pb_label( tr( "Select Item" ) );
if ( autoflow_button )
accept_pb_label = tr("Select Optima Run to Follow");
Modified: trunk/gui/us_select_item.h
===================================================================
--- trunk/gui/us_select_item.h 2019-05-17 17:01:58 UTC (rev 2767)
+++ trunk/gui/us_select_item.h 2019-05-18 04:00:52 UTC (rev 2768)
@@ -43,6 +43,8 @@
US_SelectItem( QList< QStringList >&, QStringList&, const QString,
QList< int >*, const int = (-2) );
+ QPushButton* pb_cancel;
+
private:
QList< QStringList >& items;
QStringList& hdrs;
Modified: trunk/programs/us_com_project/us_com_project_gui.cpp
===================================================================
--- trunk/programs/us_com_project/us_com_project_gui.cpp 2019-05-17 17:01:58 UTC (rev 2767)
+++ trunk/programs/us_com_project/us_com_project_gui.cpp 2019-05-18 04:00:52 UTC (rev 2768)
@@ -141,12 +141,17 @@
test_footer->setStyleSheet("color: #D3D9DF; background-color: #36454f;");
main->addWidget( test_footer );
+ connect( this, SIGNAL( pass_used_instruments( QStringList & ) ), epanExp, SLOT( pass_used_instruments( QStringList &) ) );
+
connect( epanExp, SIGNAL( switch_to_live_update( QMap < QString, QString > &) ), this, SLOT( switch_to_live_update( QMap < QString, QString > & ) ) );
connect( this , SIGNAL( pass_to_live_update( QMap < QString, QString > &) ), epanObserv, SLOT( process_protocol_details( QMap < QString, QString > & ) ) );
connect( epanExp, SIGNAL( to_autoflow_records( ) ), this, SLOT( to_autoflow_records( ) ) );
- connect( epanObserv, SIGNAL( switch_to_post_processing( QString &, QString &, QString &, SQtring &) ), this, SLOT( switch_to_post_processing( QString &, QString &, QString &, QString &) ) );
- connect( this, SIGNAL( import_data_us_convert( QString &, QString &, QString &, QString & ) ), epanPostProd, SLOT( import_data_us_convert( QString &, QString &, QString &, QString & ) ) );
+ // connect( epanObserv, SIGNAL( switch_to_post_processing( QString &, QString &, QString &, SQtring &) ), this, SLOT( switch_to_post_processing( QString &, QString &, QString &, QString &) ) );
+ // connect( this, SIGNAL( import_data_us_convert( QString &, QString &, QString &, QString & ) ), epanPostProd, SLOT( import_data_us_convert( QString &, QString &, QString &, QString & ) ) );
+ connect( epanObserv, SIGNAL( switch_to_post_processing( QMap < QString, QString > & ) ), this, SLOT( switch_to_post_processing( QMap < QString, QString > & ) ) );
+ connect( this, SIGNAL( import_data_us_convert( QMap < QString, QString > & ) ), epanPostProd, SLOT( import_data_us_convert( QMap < QString, QString > & ) ) );
+
connect( epanObserv, SIGNAL( switch_to_experiment( QString &) ), this, SLOT( switch_to_experiment( QString & ) ) );
connect( this, SIGNAL( clear_experiment( QString & ) ), epanExp, SLOT( clear_experiment( QString & ) ) );
connect( epanObserv, SIGNAL( close_everything() ), this, SLOT( close_all() ));
@@ -274,12 +279,17 @@
test_footer->setStyleSheet("color: #D3D9DF; background-color: #36454f;");
main->addWidget( test_footer );
+ connect( this, SIGNAL( pass_used_instruments( QStringList & ) ), epanExp, SLOT( pass_used_instruments( QStringList &) ) );
+
connect( epanExp, SIGNAL( switch_to_live_update( QMap < QString, QString > &) ), this, SLOT( switch_to_live_update( QMap < QString, QString > & ) ) );
connect( this , SIGNAL( pass_to_live_update( QMap < QString, QString > &) ), epanObserv, SLOT( process_protocol_details( QMap < QString, QString > & ) ) );
connect( epanExp, SIGNAL( to_autoflow_records( ) ), this, SLOT( to_autoflow_records( ) ) );
- connect( epanObserv, SIGNAL( switch_to_post_processing( QString &, QString &, QString &, QString & ) ), this, SLOT( switch_to_post_processing( QString &, QString &, QString &, QString & )));
- connect( this, SIGNAL( import_data_us_convert( QString &, QString &, QString &, QString & ) ), epanPostProd, SLOT( import_data_us_convert( QString &, QString &, QString &, QString & ) ) );
+ // connect( epanObserv, SIGNAL( switch_to_post_processing( QString &, QString &, QString &, QString & ) ), this, SLOT( switch_to_post_processing( QString &, QString &, QString &, QString & )));
+ // connect( this, SIGNAL( import_data_us_convert( QString &, QString &, QString &, QString & ) ), epanPostProd, SLOT( import_data_us_convert( QString &, QString &, QString &, QString & ) ) );
+ connect( epanObserv, SIGNAL( switch_to_post_processing( QMap < QString, QString > & ) ), this, SLOT( switch_to_post_processing( QMap < QString, QString > & ) ) );
+ connect( this, SIGNAL( import_data_us_convert( QMap < QString, QString > & ) ), epanPostProd, SLOT( import_data_us_convert( QMap < QString, QString > & ) ) );
+
connect( epanObserv, SIGNAL( switch_to_experiment( QString &) ), this, SLOT( switch_to_experiment( QString & ) ) );
connect( this, SIGNAL( clear_experiment( QString & ) ), epanExp, SLOT( clear_experiment( QString & ) ) );
connect( epanObserv, SIGNAL( close_everything() ), this, SLOT( close_all() ));
@@ -408,8 +418,20 @@
US_DB2* dbP = new US_DB2( pw.getPasswd() );
//read_optima_machines
+ read_optima_machines( dbP );
+
+ //read autoflow records
list_all_autoflow_records( autoflowdata, dbP );
+
+ //count instruments in use
+ occupied_instruments.clear();
+ for ( int i=0; i < autoflowdata.size(); i++ )
+ {
+ if ( autoflowdata[ i ][ 5 ] == "LIVE_UPDATE" )
+ occupied_instruments << autoflowdata[ i ][ 2 ];
+ }
+
QString pdtitle( tr( "Select Optima Run to Follow" ) );
QStringList hdrs;
int prx;
@@ -417,7 +439,8 @@
<< "Run Name"
<< "Optima Name"
<< "Created"
- << "Started";
+ << "Run Status"
+ << "Stage";
QString autoflow_btn = "AUTOFLOW";
@@ -427,16 +450,22 @@
pdiag->setParent(this, Qt::Window);
pdiag->setWindowFlags(Qt::Dialog | Qt::WindowMinimizeButtonHint | Qt::WindowMaximizeButtonHint | Qt::WindowCloseButtonHint );
//pdiag->setWindowFlags(Qt::Window | Qt::WindowCloseButtonHint | Qt::WindowMinimizeButtonHint | Qt::WindowMaximizeButtonHint );
+
+ //disable 'Define Another Exp.' button if all instruments are in use
+ if ( occupied_instruments.size() == instruments.size() )
+ pdiag->pb_cancel->setEnabled( false );
+
QString autoflow_id_selected("");
if ( pdiag->exec() == QDialog::Accepted )
autoflow_id_selected = autoflowdata[ prx ][ 0 ];
else
{
- //ALEXEY: define what to do if Optima is occupied, OR if there is another Optima (occupied or not)
- // autoflowdata[ i ][ 2 ]; // <-- gives Optima Name
- // autoflowdata[ i ][ 4 ]; // <-- STARTED / NOT STARTED
+ //ALEXEY: define what to do if some Optima(s) are occupied
+ // should emit signal sending list of optima's in use to us_experiment.
+
+ define_new_experiment( occupied_instruments );
return;
}
@@ -452,6 +481,7 @@
QString invID_passed = protocol_details[ "invID_passed" ];
QString ProtName = protocol_details[ "protocolName" ];
QString correctRadii = protocol_details[ "correctRadii" ];
+ QString expAborted = protocol_details[ "expAborted" ];
//ALEXEY: if stage=="EDITING" && curDir.isEmpty() (NULL)
/*
@@ -470,8 +500,9 @@
if ( stage == "EDITING" )
{
//do something
- switch_to_post_processing( currDir, ProtName, invID_passed, correctRadii );
-
+ //switch_to_post_processing( currDir, ProtName, invID_passed, correctRadii );
+ switch_to_post_processing( protocol_details );
+
//ALEXEY: should pass investigator as well: should be saved in 'autoflow'
/*
switch_to_post_processing( currDir, ProtName, invID_passed );
@@ -505,7 +536,6 @@
{
QList< int > instrumentIDs;
- // Grab all the IDs so we can reuse the db connection
while ( db->next() )
{
int ID = db->value( 0 ).toString().toInt();
@@ -570,6 +600,7 @@
QStringList autoflowentry;
QString id = dbP->value( 0 ).toString();
QString runname = dbP->value( 5 ).toString();
+ QString status = dbP->value( 8 ).toString();
QString optimaname = dbP->value( 10 ).toString();
QDateTime time_started = dbP->value( 11 ).toDateTime().toUTC();
@@ -582,9 +613,16 @@
if ( time_started.toString().isEmpty() )
autoflowentry << QString( tr( "NOT STARTED" ) );
else
- autoflowentry << QString( tr( "STARTED" ) );
- //autoflowentry << time_started.toString();
+ {
+ if ( status == "LIVE_UPDATE" )
+ autoflowentry << QString( tr( "RUNNING" ) );
+ if ( status == "EDITING" )
+ autoflowentry << QString( tr( "COMPLETED" ) );
+ //autoflowentry << time_started.toString();
+ }
+ autoflowentry << status;
+
autoflowdata << autoflowentry;
nrecs++;
}
@@ -659,6 +697,7 @@
protocol_details[ "runStarted" ] = db->value( 10 ).toString();
protocol_details[ "invID_passed" ] = db->value( 11 ).toString();
protocol_details[ "correctRadii" ] = db->value( 12 ).toString();
+ protocol_details[ "expAborted" ] = db->value( 13 ).toString();
}
}
@@ -666,7 +705,15 @@
}
+// Slot to define new exp. (from initial dialog)
+void US_ComProjectMain::define_new_experiment( QStringList & occupied_instruments )
+{
+ tabWidget->setCurrentIndex( 0 ); // Maybe lock this panel from now on? i.e. tabWidget->tabBar()-setEnabled(false) ??
+ emit pass_used_instruments( occupied_instruments );
+}
+
+
// Slot to pass submitted to Optima run info to the Live Update tab
void US_ComProjectMain::switch_to_live_update( QMap < QString, QString > & protocol_details)
{
@@ -715,14 +762,24 @@
}
+// // Slot to switch from the Live Update to Editing tab
+// void US_ComProjectMain::switch_to_post_processing( QString & currDir, QString & protocolName, QString & invID_passed, QString & correctRadii )
+// {
+// tabWidget->setCurrentIndex( 2 ); // Maybe lock this panel from now on? i.e. tabWidget->tabBar()-setEnabled(false) ??
+
+// // ALEXEY: Make a record to 'autoflow' table: stage# = 2;
+
+// emit import_data_us_convert( currDir, protocolName, invID_passed, correctRadii );
+// }
+
// Slot to switch from the Live Update to Editing tab
-void US_ComProjectMain::switch_to_post_processing( QString & currDir, QString & protocolName, QString & invID_passed, QString & correctRadii )
+void US_ComProjectMain::switch_to_post_processing( QMap < QString, QString > & protocol_details )
{
- tabWidget->setCurrentIndex( 2 ); // Maybe lock this panel from now on? i.e. tabWidget->tabBar()-setEnabled(false) ??
-
- // ALEXEY: Make a record to 'autoflow' table: stage# = 2;
-
- emit import_data_us_convert( currDir, protocolName, invID_passed, correctRadii );
+ tabWidget->setCurrentIndex( 2 ); // Maybe lock this panel from now on? i.e. tabWidget->tabBar()-setEnabled(false) ??
+
+ // ALEXEY: Make a record to 'autoflow' table: stage# = 2;
+
+ emit import_data_us_convert( protocol_details );
}
// Slot to switch back from the Live Update to Experiment tab
@@ -831,6 +888,9 @@
connect( sdiag, SIGNAL( us_exp_is_closed() ), this, SLOT( us_exp_is_closed_set_button() ) );
//connect( this, SIGNAL( set_auto_mode() ), sdiag, SLOT( auto_mode_passed() ) );
+
+ connect( this, SIGNAL( define_used_instruments( QStringList & ) ), sdiag, SLOT( exclude_used_instruments( QStringList & ) ) );
+
connect( sdiag, SIGNAL( to_live_update( QMap < QString, QString > & ) ),
this, SLOT( to_live_update( QMap < QString, QString > & ) ) );
@@ -885,7 +945,12 @@
QWidget::resizeEvent(event);
}
+void US_ExperGui::pass_used_instruments( QStringList & occupied_instruments )
+{
+ emit define_used_instruments( occupied_instruments );
+}
+
//When run is submitted to Optima & protocol details are passed ..
void US_ExperGui::to_live_update( QMap < QString, QString > & protocol_details)
{
@@ -1010,8 +1075,10 @@
connect( this, SIGNAL( to_xpn_viewer( QMap < QString, QString > &) ), sdiag, SLOT( check_for_data ( QMap < QString, QString > & ) ) );
//ALEXEY: devise SLOT saying what to do upon completion of experiment and exporting AUC data to hard drive - Import Experimental Data !!!
- connect( sdiag, SIGNAL( experiment_complete_auto( QString &, QString &, QString &, QString & ) ), this, SLOT( to_post_processing ( QString &, QString &, QString &, QString & ) ) );
-
+ //connect( sdiag, SIGNAL( experiment_complete_auto( QString &, QString &, QString &, QString & ) ), this, SLOT( to_post_processing ( QString &, QString &, QString &, QString & ) ) );
+ connect( sdiag, SIGNAL( experiment_complete_auto( QMap < QString, QString > & ) ), this, SLOT( to_post_processing ( QMap < QString, QString > & ) ) );
+
+
//ALEXEY: return to 1st panel when exp. aborted & no data saved..
connect( sdiag, SIGNAL( return_to_experiment( QString & ) ), this, SLOT( to_experiment ( QString &) ) );
@@ -1072,9 +1139,14 @@
emit to_xpn_viewer( protocol_details );
}
-void US_ObservGui::to_post_processing( QString & currDir, QString & protocolName, QString & invID_passed, QString & correctRadii )
+// void US_ObservGui::to_post_processing( QString & currDir, QString & protocolName, QString & invID_passed, QString & correctRadii )
+// {
+// emit switch_to_post_processing( currDir, protocolName, invID_passed, correctRadii );
+// }
+
+void US_ObservGui::to_post_processing( QMap < QString, QString > & protocol_details )
{
- emit switch_to_post_processing( currDir, protocolName, invID_passed, correctRadii );
+ emit switch_to_post_processing( protocol_details );
}
void US_ObservGui::to_experiment( QString & protocolName )
@@ -1131,7 +1203,9 @@
sdiag = new US_ConvertGui("AUTO");
sdiag->setParent(this, Qt::Widget);
- connect( this, SIGNAL( to_post_prod( QString &, QString &, QString &, QString & ) ), sdiag, SLOT( import_data_auto ( QString &, QString &, QString &, QString & ) ) );
+ //connect( this, SIGNAL( to_post_prod( QString &, QString &, QString &, QString & ) ), sdiag, SLOT( import_data_auto ( QString &, QString &, QString &, QString & ) ) );
+ connect( this, SIGNAL( to_post_prod( QMap < QString, QString > & ) ), sdiag, SLOT( import_data_auto ( QMap < QString, QString > & ) ) );
+
//ALEXEY: switch to Analysis
connect( sdiag, SIGNAL( saving_complete_auto( QString &, QString & ) ), this, SLOT( to_analysis ( QString &, QString &) ) );
//ALEXEY: for academic ver. switch back to experiment
@@ -1149,9 +1223,14 @@
}
-void US_PostProdGui::import_data_us_convert( QString & currDir, QString & protocolName, QString & invID_passed, QString & correctRadii )
+// void US_PostProdGui::import_data_us_convert( QString & currDir, QString & protocolName, QString & invID_passed, QString & correctRadii )
+// {
+// emit to_post_prod( currDir, protocolName, invID_passed, correctRadii );
+// }
+
+void US_PostProdGui::import_data_us_convert( QMap < QString, QString > & protocol_details )
{
- emit to_post_prod( currDir, protocolName, invID_passed, correctRadii );
+ emit to_post_prod( protocol_details );
}
void US_PostProdGui::to_analysis( QString & currDir, QString & protocolName )
Modified: trunk/programs/us_com_project/us_com_project_gui.h
===================================================================
--- trunk/programs/us_com_project/us_com_project_gui.h 2019-05-17 17:01:58 UTC (rev 2767)
+++ trunk/programs/us_com_project/us_com_project_gui.h 2019-05-18 04:00:52 UTC (rev 2768)
@@ -90,12 +90,14 @@
void to_live_update( QMap < QString, QString > & protocol_details );
void clear_experiment( QString & protocolName);
void exp_cleared( void );
+ void pass_used_instruments( QStringList & );
signals:
void switch_to_live_update( QMap < QString, QString > & protocol_details );
void set_auto_mode( void );
void reset_experiment( QString & protocolName);
void to_autoflow_records( void );
+ void define_used_instruments( QStringList & );
};
@@ -118,12 +120,16 @@
private slots:
void process_protocol_details( QMap < QString, QString > & protocol_details );
- void to_post_processing( QString & currDir, QString & protocolName, QString & invID_passed, QString & correctRadii );
+ //void to_post_processing( QString & currDir, QString & protocolName, QString & invID_passed, QString & correctRadii );
+ void to_post_processing( QMap < QString, QString > & );
+
void to_experiment( QString & protocolName );
void to_close_program( 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( QString & currDir, QString & protocolName, QString & invID_passed, QString & correctRadii );
+ void switch_to_post_processing( QMap < QString, QString > & );
+
void switch_to_experiment( QString & protocolName );
void close_everything( void );
};
@@ -148,12 +154,16 @@
void resizeEvent(QResizeEvent *event) override;
private slots:
- void import_data_us_convert( QString & currDir, QString & protocolName, QString & invID_passed, QString & correctRadii );
+ //void import_data_us_convert( QString & currDir, QString & protocolName, QString & invID_passed, QString & correctRadii );
+ void import_data_us_convert( QMap < QString, QString > &);
+
void to_analysis( QString & currDir, QString & protocolName );
void to_experiment( QString & protocolName );
signals:
- void to_post_prod( QString & currDir, QString & protocolName, QString & invID_passed, QString & correctRadii );
+ //void to_post_prod( QString & currDir, QString & protocolName, QString & invID_passed, QString & correctRadii );
+ void to_post_prod( QMap < QString, QString > & );
+
void switch_to_analysis( QString & currDir, QString & protocolName );
void switch_to_exp( QString & protocolName );
};
@@ -233,6 +243,8 @@
bool window_closed;
+ QStringList occupied_instruments;
+
private:
US_ExperGui* epanExp; // US_Exp panel
US_ObservGui* epanObserv; // US_Observ panel
@@ -250,7 +262,6 @@
static int list_all_autoflow_records( QList< QStringList >&, US_DB2* );
void read_optima_machines( US_DB2* = 0 );
- QMap<QString, QString> currentInstrument;
QList< QMap<QString, QString> > instruments;
private slots:
@@ -264,7 +275,9 @@
//void unable_tabs_buttons( void); // Slot to unable Tabs and Buttons when user level is low
//void enable_tabs_buttons( void); // Slot to enable Tabs and Buttons after protocol is loaded
void switch_to_live_update( QMap < QString, QString > & protocol_details );
- void switch_to_post_processing( QString & currDir, QString & protocolName, QString & invID_passed, QString & correctRadii );
+ //void switch_to_post_processing( QString & currDir, QString & protocolName, QString & invID_passed, QString & correctRadii );
+ void switch_to_post_processing( QMap < QString, QString > & );
+
void switch_to_analysis( QString & currDir, QString & protocolName );
void switch_to_experiment( QString & protocolName );
//void check_current_stage( void );
@@ -272,13 +285,18 @@
void closeEvent ( QCloseEvent* );
void to_autoflow_records( void );
+
+ void define_new_experiment( QStringList & );
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 );
+ //void import_data_us_convert( QString & currDir, QString & protocolName, QString & invID_passed, QString & correctRadii );
+ void import_data_us_convert( QMap < QString, QString > & );
+
void pass_to_analysis( QString & currDir, QString & protocolName );
void clear_experiment( QString & protocolName);
void us_comproject_closed( void );
+ void pass_used_instruments( QStringList & );
};
Modified: trunk/programs/us_convert/us_convert_gui.cpp
===================================================================
--- trunk/programs/us_convert/us_convert_gui.cpp 2019-05-17 17:01:58 UTC (rev 2767)
+++ trunk/programs/us_convert/us_convert_gui.cpp 2019-05-18 04:00:52 UTC (rev 2768)
@@ -1123,7 +1123,8 @@
}
-void US_ConvertGui::import_data_auto( QString &currDir, QString &protocolName, QString &invID_passed, QString &correctRadii )
+//void US_ConvertGui::import_data_auto( QString &currDir, QString &protocolName, QString &invID_passed, QString &correctRadii )
+void US_ConvertGui::import_data_auto( QMap < QString, QString > & details_at_live_update )
{
// ALEXEY TO BE ADDED...
/*
@@ -1132,20 +1133,61 @@
ExpData.invID = invID_passed.toInt();
*/
- //ExpData.invID = 41; // Nemetchek's ID
- ExpData.invID = invID_passed.toInt();
+ // //ExpData.invID = 41; // Nemetchek's ID
+ // ExpData.invID = invID_passed.toInt();
- qDebug() << "US_CONVERT: ExpData.invID, invID_passed: " << ExpData.invID << ", " << invID_passed;
+ // qDebug() << "US_CONVERT: ExpData.invID, invID_passed: " << ExpData.invID << ", " << invID_passed;
- QStringList currDir_list = currentDir.split("-run");
- runID_numeric = currDir_list[ currDir_list.size() - 1 ];
- runID_numeric.replace("/","");
+ // int impType = getImports_auto( currDir );
+ // ProtocolName_auto = protocolName;
+
+ // QStringList currDir_list = currDir.split("-run");
+ // runID_numeric = currDir_list[ currDir_list.size() - 1 ];
+ // runID_numeric.replace("/","");
- int impType = getImports_auto( currDir );
- ProtocolName_auto = protocolName;
+ // qDebug() << "RunID_numeric from CurrentDir: " << runID_numeric;
+ ExpData.invID = details_at_live_update[ "invID_passed" ].toInt();
+ ProtocolName_auto = details_at_live_update[ "protocolName" ];
+ runID_numeric = details_at_live_update[ "runID" ];
+
+ int impType = getImports_auto( details_at_live_update[ "dataPath" ] );
+
+
+ /* -------------------------------------------------------------------------------------------------------------------*/
+ //ALEXEY: Case when Run was manually aborted from Optima panel:
+ if ( details_at_live_update[ "expAborted" ] == "YES" )
+ {
+ 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)
+ {
+ msgBox.accept();
+ }
+
+ else if (msgBox.clickedButton() == Ignore)
+ {
+ delete_autoflow_record();
+ emit saving_complete_back_to_exp( ProtocolName_auto );
+ return;
+ }
+ }
+
+
+ /* ----------------------------------------------------------------------------------------------------------------------------*/
//ALEXEY: if there is no radii_correction data found, return for commercial, and present dialog for academic:
- if ( correctRadii == "NO" )
+ //if ( correctRadii == "NO" )
+ if ( details_at_live_update[ "correctRadii" ] == "NO" )
{
if ( !usmode ) // us_comprojetc
{
@@ -1193,7 +1235,7 @@
}
}
}
-
+ /* ----------------------------------------------------------------------------------------------------------------------------*/
if ( impType == 1 )
@@ -1598,11 +1640,6 @@
// runID += QString("-test");
qDebug() << "RUNID from files[0]: files[0]" << fname << ", runID: " << runID;
- // QStringList currDir_list = currentDir.split("-run");
- // QString runID_num = currDir_list[ currDir_list.size() - 1 ];
- // runID_num.replace("/","");
- // qDebug() << "Exp. RunID: " << runID_num;
-
le_runID2->setText( runID );
le_runID ->setText( runID );
Modified: trunk/programs/us_convert/us_convert_gui.h
===================================================================
--- trunk/programs/us_convert/us_convert_gui.h 2019-05-17 17:01:58 UTC (rev 2767)
+++ trunk/programs/us_convert/us_convert_gui.h 2019-05-18 04:00:52 UTC (rev 2768)
@@ -303,7 +303,8 @@
*/
void assign_investigator( int );
- void import_data_auto (QString &, QString &, QString &, QString &);
+ //void import_data_auto (QString &, QString &, QString &, QString &);
+ void import_data_auto ( QMap < QString, QString > & ) ;
void import ( void );
void reimport ( void );
Modified: trunk/programs/us_experiment/us_exp_utils.cpp
===================================================================
--- trunk/programs/us_experiment/us_exp_utils.cpp 2019-05-17 17:01:58 UTC (rev 2767)
+++ trunk/programs/us_experiment/us_exp_utils.cpp 2019-05-18 04:00:52 UTC (rev 2768)
@@ -737,6 +737,7 @@
DbgLv(1) << "EGRo: inP: rotID" << rpRotor->rotID << "rotor" << rpRotor->rotor
<< "cb_rotor text" << cb_rotor->currentText();
DbgLv(1) << "EGRo: inP: calID" << rpRotor->calID << "calib" << rpRotor->calibration;
+
}
Modified: trunk/programs/us_experiment/us_experiment_gui_optima.cpp
===================================================================
--- trunk/programs/us_experiment/us_experiment_gui_optima.cpp 2019-05-17 17:01:58 UTC (rev 2767)
+++ trunk/programs/us_experiment/us_experiment_gui_optima.cpp 2019-05-18 04:00:52 UTC (rev 2768)
@@ -45,8 +45,9 @@
automode = false;
usmode = false;
global_reset = false;
+ instruments_in_use.clear();
- // Create tab and panel widgets
+ // Create tab and panel widgets
tabWidget = us_tabwidget();
tabWidget->setTabPosition( QTabWidget::North );
@@ -183,6 +184,18 @@
}
+void US_ExperimentMain::exclude_used_instrument( QStringList & occupied_instruments )
+{
+ instruments_in_use.clear();
+ qDebug() << "OCCUPIED IINSTRUMENTS: " << occupied_instruments;
+
+ for ( int i=0; i < occupied_instruments.size(); i++)
+ instruments_in_use << occupied_instruments[i];
+
+ //Re-initialize Instruments based on the passed excluded list
+ epanRotor->setFirstLab();
+}
+
void US_ExperimentMain::us_mode_passed( void )
{
qDebug() << "US_MODE SIGNAL: ";
@@ -887,9 +900,36 @@
foreach ( US_Rotor::Instrument instrument, instruments )
{
if(instrument.name.contains("Optima"))
- sl_optimas << QString::number( instrument.ID )
- + ": " + instrument.name;
+ {
+ if ( !mainw->automode )
+ {
+ // Regular us_experiment: populate ALL instruments
+ sl_optimas << QString::number( instrument.ID ) + ": " + instrument.name;
+
+ qDebug() << "ASSIGNING INSTRUMENTS: " << instrument.name;
+ }
+ else
+ {
+ //ALEXEY: passed from autoflow: Exclude instruments in USE
+ bool optima_in_use = false;
+ for (int ll = 0; ll < mainw->instruments_in_use.size(); ll++)
+ {
+ if ( instrument.name == mainw->instruments_in_use[ll] )
+ {
+ optima_in_use = true;
+ break;
+ }
+ }
+
+ if ( !optima_in_use)
+ {
+ sl_optimas << QString::number( instrument.ID ) + ": " + instrument.name;
+ qDebug() << "ASSIGNING FREE INSTRUMENTS: " << instrument.name;
+ }
+ }
+ }
}
+
cb_optima->clear();
cb_optima->addItems( sl_optimas );
@@ -5306,6 +5346,7 @@
protocol_details[ "duration" ] = QString::number(Total_duration);
protocol_details[ "invID_passed" ] = QString::number(US_Settings::us_inv_ID());
protocol_details[ "correctRadii" ] = QString("YES");
+ protocol_details[ "expAborted" ] = QString("NO");
int nwavl_tot = 0;
for ( int kk = 0; kk < rpRange->nranges; kk++ )
Modified: trunk/programs/us_experiment/us_experiment_gui_optima.h
===================================================================
--- trunk/programs/us_experiment/us_experiment_gui_optima.h 2019-05-17 17:01:58 UTC (rev 2767)
+++ trunk/programs/us_experiment/us_experiment_gui_optima.h 2019-05-18 04:00:52 UTC (rev 2768)
@@ -914,6 +914,9 @@
void auto_mode_passed( void );
void us_mode_passed( void );
+ void exclude_used_instrument( QStringList &);
+ QStringList instruments_in_use;
+
int tabHeight;
int buttLHeight;
Modified: trunk/programs/us_xpn_viewer/us_xpn_viewer_gui.cpp
===================================================================
--- trunk/programs/us_xpn_viewer/us_xpn_viewer_gui.cpp 2019-05-17 17:01:58 UTC (rev 2767)
+++ trunk/programs/us_xpn_viewer/us_xpn_viewer_gui.cpp 2019-05-18 04:00:52 UTC (rev 2768)
@@ -221,7 +221,8 @@
QGridLayout* live_params = new QGridLayout;
QGridLayout* time_params = new QGridLayout;
- auto_mode_bool = true;
+ auto_mode_bool = true;
+ experimentAborted = false;
navgrec = 10;
dbg_level = US_Settings::us_debug();
@@ -745,7 +746,8 @@
QGridLayout* settings = new QGridLayout;
auto_mode_bool = false;
-
+ experimentAborted = false;
+
navgrec = 10;
dbg_level = US_Settings::us_debug();
QFont sfont( US_GuiSettings::fontFamily(), US_GuiSettings::fontSize() - 1 );
@@ -1646,6 +1648,9 @@
//Delete autoflow record upon Run abortion
void US_XpnDataViewer::updateautoflow_record_atLiveUpdate( void )
{
+
+ details_at_live_update[ "runID" ] = RunID_to_retrieve;
+
// Check DB connection
US_Passwd pw;
QString masterpw = pw.getPasswd();
@@ -1665,6 +1670,8 @@
db->query( qry );
+ details_at_live_update[ "dataPath" ] = currentDir;
+
//ALEXEY: if there is NO chromatic Abber. data, set corrRadii in autoflow record to 'NO'
if ( correctRadii == "NO" )
{
@@ -1673,7 +1680,21 @@
<< RunID_to_retrieve;
db->query( qry );
+
+ details_at_live_update[ "correctRadii" ] = QString("NO"); //currentDir;
}
+
+ //ALEXEY: if run was aborted manually from the Optima panel, set expAborted to 'YES'
+ if ( experimentAborted )
+ {
+ qry.clear();
+ qry << "update_autoflow_at_live_update_expaborted"
+ << RunID_to_retrieve;
+
+ db->query( qry );
+
+ details_at_live_update[ "expAborted" ] = QString("YES");
+ }
// // OR
@@ -1812,15 +1833,18 @@
int exp_status = CheckExpComplete_auto( RunID_to_retrieve );
- if ( exp_status == 5 )
+ if ( exp_status == 5 || exp_status == 0 )
{
+ if ( exp_status == 0)
+ experimentAborted = true;
+
//timer_check_sysdata->stop();
//ALEXEY: This timer cannot be stopped from another thread, but can be dealt with signal/slot upon Qthread termination..
// disconnection maybe enough...
disconnect(timer_check_sysdata, SIGNAL(timeout()), 0, 0); //Disconnect timer from anything
sys_thread->quit(); // ALEXEY: does this emit Qthread's finished() signal??
- qDebug() << "ExpStat: 5 - sys_timer STOPPED here: ";
+ qDebug() << "ExpStat: 5/0 - sys_timer STOPPED here: ";
if ( !timer_check_sysdata->isActive() )
qDebug() << "QTimer timer_check_sysdata STOPPED by quitting the QThread !!! ";
@@ -1833,8 +1857,8 @@
{
if ( !timer_data_reload->isActive() )
{
- qDebug() << "TRY PROCEED INTO ==5 from check_for_sys_data()....";
- // ALEXEY Export AUC data: devise export_auc_auto() function which would return directory name with saved data - to pass to emit signal below...
+ qDebug() << "TRY PROCEED INTO == 5/0 from check_for_sys_data()....";
+
export_auc_auto();
// QString mtitle_complete = tr( "Complete!" );
@@ -1842,63 +1866,67 @@
// 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 ??
-
+ //emit experiment_complete_auto( currentDir, ProtocolName, invID_passed, correctRadii ); // Updtade later: what should be passed with signal ??
+
+ reset();
+ emit experiment_complete_auto( details_at_live_update );
+
return;
}
}
}
- if ( exp_status == 0 ) //ALEXEY should be == 3 as per documentation
- {
- //timer_check_sysdata->stop();
- disconnect(timer_check_sysdata, SIGNAL(timeout()), 0, 0); //Disconnect timer from anything
- sys_thread->quit(); // ALEXEY: does this emit Qthread's finished() signal??
- qDebug() << "ExpStat: 3 - sys_timer STOPPED here: ";
+ // if ( exp_status == 0 ) //ALEXEY should be == 3 as per documentation
+ // {
+ // experimentAborted = true;
+ // //timer_check_sysdata->stop();
+ // disconnect(timer_check_sysdata, SIGNAL(timeout()), 0, 0); //Disconnect timer from anything
+ // sys_thread->quit(); // ALEXEY: does this emit Qthread's finished() signal??
+ // qDebug() << "ExpStat: 3 - sys_timer STOPPED here: ";
- rpm_box->setSpeed( 0 );
- le_remaining->setText( "00:00:00" );
+ // rpm_box->setSpeed( 0 );
+ // le_remaining->setText( "00:00:00" );
- if ( !timer_all_data_avail->isActive() ) // Check if reload_data Timer is stopped
- {
- if ( !timer_data_reload->isActive() )
- {
- // Ask if data retrived so far should be saved:
+ // if ( !timer_all_data_avail->isActive() ) // Check if reload_data Timer is stopped
+ // {
+ // if ( !timer_data_reload->isActive() )
+ // {
+ // // 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);
+ // 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();
+ // msgBox.setIcon(QMessageBox::Question);
+ // msgBox.exec();
- if (msgBox.clickedButton() == Save)
- {
- export_auc_auto();
+ // 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 );
+ // 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;
- }
+ // 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;
- }
- }
- }
- }
+ // else if (msgBox.clickedButton() == Ignore)
+ // {
+ // reset();
+ // delete_autoflow_record();
+ // emit return_to_experiment( ProtocolName );
+ // return;
+ // }
+ // }
+ // }
+ // }
qDebug() << "sys_timer RAN here: ";
@@ -1942,13 +1970,16 @@
ExpID_to_use = protocol_details["experimentId"];
ProtocolName = protocol_details["protocolName"];
RunName = protocol_details[ "experimentName" ];
- CellChNumber = protocol_details[ "CellChNumber" ];
+ CellChNumber = protocol_details[ "CellChNumber" ];
TripleNumber = protocol_details[ "TripleNumber" ];
OptimaName = protocol_details[ "OptimaName" ]; //New
TotalDuration = protocol_details[ "duration" ];
invID_passed = protocol_details[ "invID_passed" ];
correctRadii = protocol_details[ "correctRadii" ];
+ expAborted = protocol_details[ "expAborted" ];
+ details_at_live_update = protocol_details;
+
selectOptimaByName_auto( OptimaName ); //New
timer_data_init = new QTimer;
@@ -2273,45 +2304,66 @@
//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:
+ export_auc_auto();
+ updateautoflow_record_atLiveUpdate();
+
+ reset();
+ 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);
+ // 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();
+ // msgBox.setIcon(QMessageBox::Question);
+ // msgBox.exec();
- if (msgBox.clickedButton() == Save)
- {
- export_auc_auto();
+ // 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 );
+ // 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;
- }
+ // 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;
- }
- }
- }
+ // else if (msgBox.clickedButton() == Ignore)
+ // {
+ // reset();
+ // delete_autoflow_record();
+ // emit return_to_experiment( ProtocolName );
+ // return;
+ // }
+ // }
+ // }
@@ -3637,8 +3689,11 @@
/*** 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 )
+ if ( statusExp == 5 || statusExp == 0 )
{
+ if ( statusExp == 0 )
+ experimentAborted = true;
+
timer_data_reload->stop();
disconnect(timer_data_reload, SIGNAL(timeout()), 0, 0); //Disconnect timer from anything
@@ -3653,59 +3708,61 @@
// QMessageBox::information( this, mtitle_complete, message_done );
updateautoflow_record_atLiveUpdate();
+ reset();
- emit experiment_complete_auto( currentDir, ProtocolName, invID_passed, correctRadii ); // Updtade later: what should be passed with signal ??
- //QString temp_protname("DemchukA_exosomes40K_111418");
- //emit experiment_complete_auto( currentDir, temp_protname );
-
+ //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 );
+
return;
}
}
- /** Experiment Aborted ***/
+ // /** Experiment Aborted ***/
- if ( statusExp == 0 ) //ALEXEY should be == 3 as per documentation
- {
- timer_data_reload->stop();
- disconnect(timer_data_reload, SIGNAL(timeout()), 0, 0); //Disconnect timer from anything
+ // if ( statusExp == 0 ) //ALEXEY should be == 3 as per documentation
+ // {
+ // experimentAborted = true;
- if ( !timer_check_sysdata->isActive() ) // Check if sys_data Timer is stopped
- {
- // Ask if data retrived so far should be saved:
+ // 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);
+ // 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();
+ // msgBox.setIcon(QMessageBox::Question);
+ // msgBox.exec();
- if (msgBox.clickedButton() == Save)
- {
- export_auc_auto();
+ // 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 );
+ // 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;
- }
+ // 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;
- }
- }
- }
+ // 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
Modified: trunk/programs/us_xpn_viewer/us_xpn_viewer_gui.h
===================================================================
--- trunk/programs/us_xpn_viewer/us_xpn_viewer_gui.h 2019-05-17 17:01:58 UTC (rev 2767)
+++ trunk/programs/us_xpn_viewer/us_xpn_viewer_gui.h 2019-05-18 04:00:52 UTC (rev 2768)
@@ -283,6 +283,11 @@
QString TotalDuration; //New
QString invID_passed;
QString correctRadii;
+ QString expAborted;
+
+ QMap < QString, QString > details_at_live_update;
+
+ bool experimentAborted;
int ElapsedTimeOffset;
@@ -351,7 +356,9 @@
void test_optima_connection( void ); //New
signals:
- void experiment_complete_auto( QString &, QString &, QString &, QString & );
+ //void experiment_complete_auto( QString &, QString &, QString &, QString & );
+ void experiment_complete_auto( QMap < QString, QString > &);
+
void return_to_experiment( QString & );
void close_program( void );
};
Modified: trunk/sql/us3.sql
===================================================================
--- trunk/sql/us3.sql 2019-05-17 17:01:58 UTC (rev 2767)
+++ trunk/sql/us3.sql 2019-05-18 04:00:52 UTC (rev 2768)
@@ -102,6 +102,7 @@
invID INT NULL,
created TIMESTAMP NULL,
corrRadii enum('YES', 'NO') NOT NULL,
+ expAborted enum('NO', 'YES') NOT NULL,
PRIMARY KEY (ID) )
ENGINE = InnoDB;
Modified: trunk/sql/us3_autoflow_procs.sql
===================================================================
--- trunk/sql/us3_autoflow_procs.sql 2019-05-17 17:01:58 UTC (rev 2767)
+++ trunk/sql/us3_autoflow_procs.sql 2019-05-18 04:00:52 UTC (rev 2768)
@@ -151,8 +151,8 @@
SELECT @OK AS status;
SELECT protName, cellChNum, tripleNum, duration, runName, expID,
- runID, status, dataPath, optimaName, runStarted, invID, created, corrRadii
- FROM autoflow
+ runID, status, dataPath, optimaName, runStarted, invID, created, corrRadii, expAborted
+ FROM autoflow
WHERE ID = p_autoflowID;
END IF;
@@ -323,6 +323,47 @@
END$$
+
+-- Update autoflow record with expAborted value at LIVE_UPDATE
+DROP PROCEDURE IF EXISTS update_autoflow_at_live_update_expaborted$$
+CREATE PROCEDURE update_autoflow_at_live_update_expaborted ( p_personGUID CHAR(36),
+ p_password VARCHAR(80),
+ p_runID INT )
+
+ MODIFIES SQL DATA
+
+BEGIN
+ DECLARE count_records INT;
+
+ CALL config();
+ SET @US3_LAST_ERRNO = @OK;
+ SET @US3_LAST_ERROR = '';
+
+ SELECT COUNT(*)
+ INTO count_records
+ FROM autoflow
+ WHERE runID = p_runID;
+
+ IF ( verify_user( p_personGUID, p_password ) = @OK ) THEN
+ IF ( count_records = 0 ) THEN
+ SET @US3_LAST_ERRNO = @NO_AUTOFLOW_RECORD;
+ SET @US3_LAST_ERROR = 'MySQL: no rows returned';
+
+ ELSE
+ UPDATE autoflow
+ SET expAborted = 'YES'
+ WHERE runID = p_runID;
+
+ END IF;
+
+ END IF;
+
+ SELECT @US3_LAST_ERRNO AS status;
+
+END$$
+
+
+
---- get initial elapsed time upon reattachment -----------------------------
DROP FUNCTION IF EXISTS read_autoflow_times$$
CREATE FUNCTION read_autoflow_times ( p_personGUID CHAR(36),
1
0
Author: gegorbet
Date: 2019-05-17 17:01:58 +0000 (Fri, 17 May 2019)
New Revision: 2767
Modified:
trunk/utils/us_simparms.cpp
Log:
temporary fix for pseudo speed step constant zone with set speed < 1500 rpm
Modified: trunk/utils/us_simparms.cpp
===================================================================
--- trunk/utils/us_simparms.cpp 2019-05-17 05:39:46 UTC (rev 2766)
+++ trunk/utils/us_simparms.cpp 2019-05-17 17:01:58 UTC (rev 2767)
@@ -1206,8 +1206,9 @@
(int)qRound( tsobj->time_dvalue( "SetSpeed" ) ) :
tsobj->time_ivalue( "SetSpeed" ); // Current set speed
- if ( ss3 == ss2 && ss2 == ss1 && ss3 > 0 )
+ //if ( ss3 == ss2 && ss2 == ss1 && ss3 > 0 )
//if ( ss3 == ss2 && ss2 == ss1 && ss3 > 3500 )
+ if ( ss3 == ss2 && ss2 == ss1 && ss3 > 1500 )
{ // This non-zero set-speed and both previous are the same
if ( ! cspeeds.contains( ss3 ) )
cspeeds << ss3; // Save it if first time encountered
1
0
Author: alexey
Date: 2019-05-17 05:39:46 +0000 (Fri, 17 May 2019)
New Revision: 2766
Modified:
trunk/programs/us_convert/us_convert_gui.cpp
trunk/programs/us_convert/us_convert_gui.h
Log:
bug fix
Modified: trunk/programs/us_convert/us_convert_gui.cpp
===================================================================
--- trunk/programs/us_convert/us_convert_gui.cpp 2019-05-17 05:09:32 UTC (rev 2765)
+++ trunk/programs/us_convert/us_convert_gui.cpp 2019-05-17 05:39:46 UTC (rev 2766)
@@ -1137,10 +1137,14 @@
qDebug() << "US_CONVERT: ExpData.invID, invID_passed: " << ExpData.invID << ", " << invID_passed;
+ QStringList currDir_list = currentDir.split("-run");
+ runID_numeric = currDir_list[ currDir_list.size() - 1 ];
+ runID_numeric.replace("/","");
+
int impType = getImports_auto( currDir );
ProtocolName_auto = protocolName;
- //ALEXEY: if there is no radii_correction data found, return for commercial, and present dialogue for academic:
+ //ALEXEY: if there is no radii_correction data found, return for commercial, and present dialog for academic:
if ( correctRadii == "NO" )
{
if ( !usmode ) // us_comprojetc
@@ -1593,7 +1597,12 @@
// //TEMP
// runID += QString("-test");
- qDebug() << "RUNID from files[0]: files[0]" << fname << ", runID: " << runID;
+ qDebug() << "RUNID from files[0]: files[0]" << fname << ", runID: " << runID;
+ // QStringList currDir_list = currentDir.split("-run");
+ // QString runID_num = currDir_list[ currDir_list.size() - 1 ];
+ // runID_num.replace("/","");
+ // qDebug() << "Exp. RunID: " << runID_num;
+
le_runID2->setText( runID );
le_runID ->setText( runID );
@@ -4851,7 +4860,7 @@
QStringList qry;
qry << "delete_autoflow_record"
- << runID;
+ << runID_numeric;
//db->query( qry );
Modified: trunk/programs/us_convert/us_convert_gui.h
===================================================================
--- trunk/programs/us_convert/us_convert_gui.h 2019-05-17 05:09:32 UTC (rev 2765)
+++ trunk/programs/us_convert/us_convert_gui.h 2019-05-17 05:39:46 UTC (rev 2766)
@@ -140,6 +140,7 @@
QString runType;
QString oldRunType;
QString runID;
+ QString runID_numeric;
QString tmst_fnamei;
QLabel* lb_description;
1
0
r2765 - in trunk: gui programs/us_com_project programs/us_convert programs/us_experiment programs/us_xpn_viewer sql
by svn@svn.aucsolutions.com May 16, 2019
by svn@svn.aucsolutions.com May 16, 2019
May 16, 2019
Author: alexey
Date: 2019-05-17 05:09:32 +0000 (Fri, 17 May 2019)
New Revision: 2765
Modified:
trunk/gui/us_select_item.cpp
trunk/programs/us_com_project/us_com_project_gui.cpp
trunk/programs/us_com_project/us_com_project_gui.h
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
trunk/programs/us_experiment/us_experiment_gui_optima.h
trunk/programs/us_xpn_viewer/us_xpn_viewer_gui.cpp
trunk/programs/us_xpn_viewer/us_xpn_viewer_gui.h
trunk/sql/us3.sql
trunk/sql/us3_autoflow_procs.sql
Log:
Automatic flow: first shot at the automation of the stransition from LIBE UPDATE to EDTING
* no user input required
* case of NO chromatic abberation for instrument considered:
-- commercial soft - abort at EDITING stage
-- Data Aqcution/academoc - choice
-- no manual stop of the run from Optima panel covered yet... (still requires user input)
Modified: trunk/gui/us_select_item.cpp
===================================================================
--- trunk/gui/us_select_item.cpp 2019-05-15 20:19:58 UTC (rev 2764)
+++ trunk/gui/us_select_item.cpp 2019-05-17 05:09:32 UTC (rev 2765)
@@ -113,7 +113,7 @@
le_info->setText(tr( "<ul><li>Information on one or more experimental methods submitted to Bechman Optima(s) is available. "
"You can reattach to the job by selecting the run from the list below. "
- "Alternatively, you can define new experiment method. </ul></li>" ));
+ "Alternatively, you can define and submit a new experiment method to the availabale Optima instrument(s). </ul></li>" ));
main->addWidget( le_info );
}
Modified: trunk/programs/us_com_project/us_com_project_gui.cpp
===================================================================
--- trunk/programs/us_com_project/us_com_project_gui.cpp 2019-05-15 20:19:58 UTC (rev 2764)
+++ trunk/programs/us_com_project/us_com_project_gui.cpp 2019-05-17 05:09:32 UTC (rev 2765)
@@ -27,7 +27,7 @@
#endif
-//// Constructor: build the main layout with tab widget panels
+//// Constructor: ACADEMIC: 'Data Acquision' / us_comproject_academic programs
US_ComProjectMain::US_ComProjectMain(QString us_mode) : US_Widgets()
{
// dbg_level = US_Settings::us_debug();
@@ -143,9 +143,10 @@
connect( epanExp, SIGNAL( switch_to_live_update( QMap < QString, QString > &) ), this, SLOT( switch_to_live_update( QMap < QString, QString > & ) ) );
connect( this , SIGNAL( pass_to_live_update( QMap < QString, QString > &) ), epanObserv, SLOT( process_protocol_details( QMap < QString, QString > & ) ) );
-
- connect( epanObserv, SIGNAL( switch_to_post_processing( QString &, QString &, QString &) ), this, SLOT( switch_to_post_processing( QString &, QString &, QString &) ) );
- connect( this, SIGNAL( import_data_us_convert( QString &, QString &, QString & ) ), epanPostProd, SLOT( import_data_us_convert( QString &, QString &, QString & ) ) );
+ connect( epanExp, SIGNAL( to_autoflow_records( ) ), this, SLOT( to_autoflow_records( ) ) );
+
+ connect( epanObserv, SIGNAL( switch_to_post_processing( QString &, QString &, QString &, SQtring &) ), this, SLOT( switch_to_post_processing( QString &, QString &, QString &, QString &) ) );
+ connect( this, SIGNAL( import_data_us_convert( QString &, QString &, QString &, QString & ) ), epanPostProd, SLOT( import_data_us_convert( QString &, QString &, QString &, QString & ) ) );
connect( epanObserv, SIGNAL( switch_to_experiment( QString &) ), this, SLOT( switch_to_experiment( QString & ) ) );
connect( this, SIGNAL( clear_experiment( QString & ) ), epanExp, SLOT( clear_experiment( QString & ) ) );
connect( epanObserv, SIGNAL( close_everything() ), this, SLOT( close_all() ));
@@ -165,7 +166,7 @@
-//// Constructor: build the main layout with tab widget panels
+//// Constructor: COMMERCIAL: us_comproject
US_ComProjectMain::US_ComProjectMain() : US_Widgets()
{
// dbg_level = US_Settings::us_debug();
@@ -275,9 +276,10 @@
connect( epanExp, SIGNAL( switch_to_live_update( QMap < QString, QString > &) ), this, SLOT( switch_to_live_update( QMap < QString, QString > & ) ) );
connect( this , SIGNAL( pass_to_live_update( QMap < QString, QString > &) ), epanObserv, SLOT( process_protocol_details( QMap < QString, QString > & ) ) );
-
- connect( epanObserv, SIGNAL( switch_to_post_processing( QString &, QString &, QString & ) ), this, SLOT( switch_to_post_processing( QString &, QString &, QString & )));
- connect( this, SIGNAL( import_data_us_convert( QString &, QString &, QString & ) ), epanPostProd, SLOT( import_data_us_convert( QString &, QString &, QString & ) ) );
+ connect( epanExp, SIGNAL( to_autoflow_records( ) ), this, SLOT( to_autoflow_records( ) ) );
+
+ connect( epanObserv, SIGNAL( switch_to_post_processing( QString &, QString &, QString &, QString & ) ), this, SLOT( switch_to_post_processing( QString &, QString &, QString &, QString & )));
+ connect( this, SIGNAL( import_data_us_convert( QString &, QString &, QString &, QString & ) ), epanPostProd, SLOT( import_data_us_convert( QString &, QString &, QString &, QString & ) ) );
connect( epanObserv, SIGNAL( switch_to_experiment( QString &) ), this, SLOT( switch_to_experiment( QString & ) ) );
connect( this, SIGNAL( clear_experiment( QString & ) ), epanExp, SLOT( clear_experiment( QString & ) ) );
connect( epanObserv, SIGNAL( close_everything() ), this, SLOT( close_all() ));
@@ -300,6 +302,12 @@
event->accept();
}
+void US_ComProjectMain::to_autoflow_records( void )
+{
+ check_current_stage();
+}
+
+
// Function that checks for current program stage based on US-lims DB entry
void US_ComProjectMain::check_current_stage( void )
{
@@ -386,10 +394,20 @@
if ( autoflow_records < 1 )
return;
+ //ALEXEY:
+ /*
+ -- Read (and count) Optima Instruments;
+ -- If the number of 'autoflow' records with the status LIVE_UPDATE && RUNNING is the same as # instruments, disable 'Def. New Exp.' buttion
+ -- Identify free Optima(s) & pass the list to the us_experiment (Lab/Rotors tab -> instruments)
+ --
+ */
+
// Dialog of existing autoflow records
US_Passwd pw;
US_DB2* dbP = new US_DB2( pw.getPasswd() );
+
+ //read_optima_machines
list_all_autoflow_records( autoflowdata, dbP );
QString pdtitle( tr( "Select Optima Run to Follow" ) );
@@ -433,7 +451,7 @@
QString currDir = protocol_details[ "dataPath" ];
QString invID_passed = protocol_details[ "invID_passed" ];
QString ProtName = protocol_details[ "protocolName" ];
-
+ QString correctRadii = protocol_details[ "correctRadii" ];
//ALEXEY: if stage=="EDITING" && curDir.isEmpty() (NULL)
/*
@@ -452,7 +470,7 @@
if ( stage == "EDITING" )
{
//do something
- switch_to_post_processing( currDir, ProtName, invID_passed );
+ switch_to_post_processing( currDir, ProtName, invID_passed, correctRadii );
//ALEXEY: should pass investigator as well: should be saved in 'autoflow'
/*
@@ -474,6 +492,66 @@
}
+// Slot to read all Optima machines <------------------------------- // New
+void US_ComProjectMain::read_optima_machines( US_DB2* db )
+{
+ QStringList q( "" );
+ q.clear();
+ q << QString( "get_instrument_names" )
+ << QString::number( 1 );
+ db->query( q );
+
+ if ( db->lastErrno() == US_DB2::OK ) // If not, no instruments defined
+ {
+ QList< int > instrumentIDs;
+
+ // Grab all the IDs so we can reuse the db connection
+ while ( db->next() )
+ {
+ int ID = db->value( 0 ).toString().toInt();
+ instrumentIDs << ID;
+
+ qDebug() << "InstID: " << ID;
+ }
+
+ // Instrument information
+ foreach ( int ID, instrumentIDs )
+ {
+ QMap<QString,QString> instrument;
+
+ q.clear();
+ q << QString( "get_instrument_info_new" )
+ << QString::number( ID );
+ db->query( q );
+ db->next();
+
+ instrument[ "ID" ] = QString::number( ID );
+ instrument[ "name" ] = db->value( 0 ).toString();
+ instrument[ "serial" ] = db->value( 1 ).toString();
+ instrument[ "optimaHost" ] = db->value( 5 ).toString();
+ instrument[ "optimaPort" ] = db->value( 6 ).toString();
+ instrument[ "optimaDBname" ] = db->value( 7 ).toString();
+ instrument[ "optimaDBusername" ] = db->value( 8 ).toString();
+ instrument[ "optimaDBpassw" ] = db->value( 9 ).toString();
+ instrument[ "selected" ] = db->value( 10 ).toString();
+
+ instrument[ "opsys1" ] = db->value( 11 ).toString();
+ instrument[ "opsys2" ] = db->value( 12 ).toString();
+ instrument[ "opsys3" ] = db->value( 13 ).toString();
+
+ instrument[ "radcalwvl" ] = db->value( 14 ).toString();
+ instrument[ "chromoab" ] = db->value( 15 ).toString();
+
+
+ if ( instrument[ "name" ].contains("Optima") || instrument[ "optimaHost" ].contains("AUC_DATA_DB") )
+ this->instruments << instrument;
+ }
+ }
+ qDebug() << "Reading Instrument: FINISH";
+}
+
+
+
// Query autoflow for # records
int US_ComProjectMain::list_all_autoflow_records( QList< QStringList >& autoflowdata, US_DB2* dbP )
{
@@ -504,7 +582,8 @@
if ( time_started.toString().isEmpty() )
autoflowentry << QString( tr( "NOT STARTED" ) );
else
- autoflowentry << time_started.toString();
+ autoflowentry << QString( tr( "STARTED" ) );
+ //autoflowentry << time_started.toString();
autoflowdata << autoflowentry;
nrecs++;
@@ -578,7 +657,8 @@
protocol_details[ "dataPath" ] = db->value( 8 ).toString();
protocol_details[ "OptimaName" ] = db->value( 9 ).toString();
protocol_details[ "runStarted" ] = db->value( 10 ).toString();
- protocol_details[ "invID_passed" ] = db->value( 11 ).toString();
+ protocol_details[ "invID_passed" ] = db->value( 11 ).toString();
+ protocol_details[ "correctRadii" ] = db->value( 12 ).toString();
}
}
@@ -636,13 +716,13 @@
}
// Slot to switch from the Live Update to Editing tab
-void US_ComProjectMain::switch_to_post_processing( QString & currDir, QString & protocolName, QString & invID_passed )
+void US_ComProjectMain::switch_to_post_processing( QString & currDir, QString & protocolName, QString & invID_passed, QString & correctRadii )
{
tabWidget->setCurrentIndex( 2 ); // Maybe lock this panel from now on? i.e. tabWidget->tabBar()-setEnabled(false) ??
// ALEXEY: Make a record to 'autoflow' table: stage# = 2;
- emit import_data_us_convert( currDir, protocolName, invID_passed );
+ emit import_data_us_convert( currDir, protocolName, invID_passed, correctRadii );
}
// Slot to switch back from the Live Update to Experiment tab
@@ -756,6 +836,8 @@
connect( this, SIGNAL( reset_experiment( QString & ) ), sdiag, SLOT( us_exp_clear( QString & ) ) );
+ connect( sdiag, SIGNAL( exp_cleared( ) ), this, SLOT( exp_cleared( ) ) );
+
sdiag->pb_close->setEnabled(false); // Disable Close button
offset = 0;
sdiag->move(offset, 2*offset);
@@ -824,7 +906,13 @@
emit reset_experiment( protocolName );
}
+//Upon clearing Experiment ..
+void US_ExperGui::exp_cleared( void )
+{
+ emit to_autoflow_records();
+}
+
// On click to open US_Experiment <-- NOT USED, us_experimnet is loaded immediately
void US_ExperGui::manageExperiment()
{
@@ -922,7 +1010,7 @@
connect( this, SIGNAL( to_xpn_viewer( QMap < QString, QString > &) ), sdiag, SLOT( check_for_data ( QMap < QString, QString > & ) ) );
//ALEXEY: devise SLOT saying what to do upon completion of experiment and exporting AUC data to hard drive - Import Experimental Data !!!
- connect( sdiag, SIGNAL( experiment_complete_auto( QString &, QString &, QString & ) ), this, SLOT( to_post_processing ( QString &, QString &, QString &) ) );
+ connect( sdiag, SIGNAL( experiment_complete_auto( QString &, QString &, QString &, QString & ) ), this, SLOT( to_post_processing ( QString &, QString &, QString &, QString & ) ) );
//ALEXEY: return to 1st panel when exp. aborted & no data saved..
connect( sdiag, SIGNAL( return_to_experiment( QString & ) ), this, SLOT( to_experiment ( QString &) ) );
@@ -984,9 +1072,9 @@
emit to_xpn_viewer( protocol_details );
}
-void US_ObservGui::to_post_processing( QString & currDir, QString & protocolName, QString & invID_passed )
+void US_ObservGui::to_post_processing( QString & currDir, QString & protocolName, QString & invID_passed, QString & correctRadii )
{
- emit switch_to_post_processing( currDir, protocolName, invID_passed );
+ emit switch_to_post_processing( currDir, protocolName, invID_passed, correctRadii );
}
void US_ObservGui::to_experiment( QString & protocolName )
@@ -1043,7 +1131,7 @@
sdiag = new US_ConvertGui("AUTO");
sdiag->setParent(this, Qt::Widget);
- connect( this, SIGNAL( to_post_prod( QString &, QString &, QString & ) ), sdiag, SLOT( import_data_auto ( QString &, QString &, QString & ) ) );
+ connect( this, SIGNAL( to_post_prod( QString &, QString &, QString &, QString & ) ), sdiag, SLOT( import_data_auto ( QString &, QString &, QString &, QString & ) ) );
//ALEXEY: switch to Analysis
connect( sdiag, SIGNAL( saving_complete_auto( QString &, QString & ) ), this, SLOT( to_analysis ( QString &, QString &) ) );
//ALEXEY: for academic ver. switch back to experiment
@@ -1054,13 +1142,16 @@
sdiag->setFrameShape( QFrame::Box);
sdiag->setLineWidth(2);
+ if ( mainw->us_mode_bool )
+ sdiag->us_mode_passed();
+
sdiag->show();
}
-void US_PostProdGui::import_data_us_convert( QString & currDir, QString & protocolName, QString & invID_passed )
+void US_PostProdGui::import_data_us_convert( QString & currDir, QString & protocolName, QString & invID_passed, QString & correctRadii )
{
- emit to_post_prod( currDir, protocolName, invID_passed );
+ emit to_post_prod( currDir, protocolName, invID_passed, correctRadii );
}
void US_PostProdGui::to_analysis( QString & currDir, QString & protocolName )
Modified: trunk/programs/us_com_project/us_com_project_gui.h
===================================================================
--- trunk/programs/us_com_project/us_com_project_gui.h 2019-05-15 20:19:58 UTC (rev 2764)
+++ trunk/programs/us_com_project/us_com_project_gui.h 2019-05-17 05:09:32 UTC (rev 2765)
@@ -89,11 +89,13 @@
void us_exp_is_closed_set_button( void );
void to_live_update( QMap < QString, QString > & protocol_details );
void clear_experiment( QString & protocolName);
-
+ void exp_cleared( void );
+
signals:
void switch_to_live_update( QMap < QString, QString > & protocol_details );
void set_auto_mode( void );
void reset_experiment( QString & protocolName);
+ void to_autoflow_records( void );
};
@@ -116,12 +118,12 @@
private slots:
void process_protocol_details( QMap < QString, QString > & protocol_details );
- void to_post_processing( QString & currDir, QString & protocolName, QString & invID_passed );
+ void to_post_processing( QString & currDir, QString & protocolName, QString & invID_passed, QString & correctRadii );
void to_experiment( QString & protocolName );
void to_close_program( void );
signals:
void to_xpn_viewer( QMap < QString, QString > & protocol_details );
- void switch_to_post_processing( QString & currDir, QString & protocolName, QString & invID_passed );
+ void switch_to_post_processing( QString & currDir, QString & protocolName, QString & invID_passed, QString & correctRadii );
void switch_to_experiment( QString & protocolName );
void close_everything( void );
};
@@ -146,12 +148,12 @@
void resizeEvent(QResizeEvent *event) override;
private slots:
- void import_data_us_convert( QString & currDir, QString & protocolName, QString & invID_passed );
+ void import_data_us_convert( QString & currDir, QString & protocolName, QString & invID_passed, QString & correctRadii );
void to_analysis( QString & currDir, QString & protocolName );
void to_experiment( QString & protocolName );
signals:
- void to_post_prod( QString & currDir, QString & protocolName, QString & invID_passed );
+ void to_post_prod( QString & currDir, QString & protocolName, QString & invID_passed, QString & correctRadii );
void switch_to_analysis( QString & currDir, QString & protocolName );
void switch_to_exp( QString & protocolName );
};
@@ -246,8 +248,11 @@
int get_autoflow_records( void );
QMap < QString, QString > read_autoflow_record( int );
static int list_all_autoflow_records( QList< QStringList >&, US_DB2* );
+
+ void read_optima_machines( US_DB2* = 0 );
+ QMap<QString, QString> currentInstrument;
+ QList< QMap<QString, QString> > instruments;
-
private slots:
//void reset ( void );
//void newPanel ( int ); // Move to a new panel
@@ -259,16 +264,18 @@
//void unable_tabs_buttons( void); // Slot to unable Tabs and Buttons when user level is low
//void enable_tabs_buttons( void); // Slot to enable Tabs and Buttons after protocol is loaded
void switch_to_live_update( QMap < QString, QString > & protocol_details );
- void switch_to_post_processing( QString & currDir, QString & protocolName, QString & invID_passed );
+ void switch_to_post_processing( QString & currDir, QString & protocolName, QString & invID_passed, QString & correctRadii );
void switch_to_analysis( QString & currDir, QString & protocolName );
void switch_to_experiment( QString & protocolName );
//void check_current_stage( void );
void close_all( void );
void closeEvent ( QCloseEvent* );
+
+ void to_autoflow_records( void );
signals:
void pass_to_live_update( QMap < QString, QString > & protocol_details );
- void import_data_us_convert( QString & currDir, QString & protocolName, QString & invID_passed );
+ void import_data_us_convert( QString & currDir, QString & protocolName, QString & invID_passed, QString & correctRadii );
void pass_to_analysis( QString & currDir, QString & protocolName );
void clear_experiment( QString & protocolName);
void us_comproject_closed( void );
Modified: trunk/programs/us_convert/us_convert_gui.cpp
===================================================================
--- trunk/programs/us_convert/us_convert_gui.cpp 2019-05-15 20:19:58 UTC (rev 2764)
+++ trunk/programs/us_convert/us_convert_gui.cpp 2019-05-17 05:09:32 UTC (rev 2765)
@@ -47,6 +47,8 @@
{
ExpData.invID = US_Settings::us_inv_ID();
+ usmode = false;
+
// Ensure data directories are there
QDir dir;
dir.mkpath( US_Settings::workBaseDir() );
@@ -545,6 +547,8 @@
{
ExpData.invID = US_Settings::us_inv_ID();
+ usmode = false;
+
// Ensure data directories are there
QDir dir;
dir.mkpath( US_Settings::workBaseDir() );
@@ -1112,8 +1116,15 @@
reimport();
}
-void US_ConvertGui::import_data_auto( QString &currDir, QString &protocolName, QString &invID_passed )
+void US_ConvertGui::us_mode_passed( void )
{
+ qDebug() << "US_Convert: US_MODE SIGNAL: ";
+ usmode = true;
+}
+
+
+void US_ConvertGui::import_data_auto( QString &currDir, QString &protocolName, QString &invID_passed, QString &correctRadii )
+{
// ALEXEY TO BE ADDED...
/*
assign investigator HERE passed in (QString &currDir, QString &protocolName, QString &invID_passed) as 3rd parameter; saved in 'autoflow' table
@@ -1127,8 +1138,60 @@
qDebug() << "US_CONVERT: ExpData.invID, invID_passed: " << ExpData.invID << ", " << invID_passed;
int impType = getImports_auto( currDir );
- ProtocolName_auto = protocolName;
+ ProtocolName_auto = protocolName;
+ //ALEXEY: if there is no radii_correction data found, return for commercial, and present dialogue for academic:
+ if ( correctRadii == "NO" )
+ {
+ if ( !usmode ) // us_comprojetc
+ {
+ //return because in commercial ver. ther must be radii corrections for instrument!!!
+ QMessageBox::information( this,
+ tr( "No Chromatic Aberration Correction Found: " ),
+ tr( "NO wavelength correction data for currently used \n"
+ "Optima machine found in DB! \n"
+ "Data will NOT be imported; Program will be reset.") );
+
+ //ALEXY: need to delete autoflow record here
+ delete_autoflow_record();
+ emit saving_complete_back_to_exp( ProtocolName_auto );
+ return;
+
+ }
+ else // us_comproject_academoc / Data Acquisition
+ {
+ //dialog
+
+ QMessageBox msgBox;
+ msgBox.setText(tr("No Chromatic Aberration Correction Found!"));
+ msgBox.setInformativeText( tr("NO wavelength correction data for currently used \n"
+ "Optima machine found in DB! \n"
+ "Data were NOT modified ! \n\n"
+ "You may proceed with importing data by clicking <b>Continue</b> \n"
+ "OR disregard data and reset the program by clicking <b>Ignore Data</b> ") );
+
+ msgBox.setWindowTitle(tr("Data Not Modified"));
+ QPushButton *Continue = msgBox.addButton(tr("Continue"), QMessageBox::YesRole);
+ QPushButton *Ignore = msgBox.addButton(tr("Ignore Data"), QMessageBox::RejectRole);
+
+ msgBox.setIcon(QMessageBox::Question);
+ msgBox.exec();
+
+ if (msgBox.clickedButton() == Continue)
+ {
+ msgBox.accept();
+ }
+ else if ( msgBox.clickedButton() == Ignore )
+ {
+ delete_autoflow_record();
+ emit saving_complete_back_to_exp( ProtocolName_auto );
+ return;
+ }
+ }
+ }
+
+
+
if ( impType == 1 )
{
qDebug() << "IMPORT MWL auto...";
@@ -1536,55 +1599,84 @@
le_runID ->setText( runID );
scanTolerance = 5.0;
- // //ALEXEY: Remove Duplicates in Channel's description
- // for (int i = 0; i < allData.size(); i++)
- // {
- // qDebug() << "Description BEFORE: " << i << ", " << allData[ i ].description;
+ // //ALEXEY: Remove Duplicates in Channel's description: Simpler solution
+ // for (int i = 0; i < allData.size(); i++)
+ // {
+ // qDebug() << "Description BEFORE: " << i << ", " << allData[ i ].description;
+
+ // QString desc = allData[ i ].description;
+ // desc.replace(",", "");
+ // desc.replace(";", "");
- // QString desc = allData[ i ].description;
- // desc.replace(",", "");
- // QString desc_a = desc.split(QRegExp(";"))[0];
- // QString desc_b = desc.split(QRegExp(";"))[1];
+ // QStringList desc_list = desc.split(QRegExp("\\s+"));
+ // desc_list.removeDuplicates();
+
+ // QString final_desc("");
+ // for ( int i=0; i<desc_list.size(); i++ )
+ // {
+ // if ( desc_list[i].isEmpty() )
+ // continue;
+ // final_desc += desc_list[i];
- // //list of channel A desc
- // QStringList desc_list_a = desc_a.split(QRegExp("\\s+"));
- // desc_list_a.removeDuplicates();
+ // if ( i != desc_list.size() - 1)
+ // final_desc += QString(" ");
+ // }
- // //list of channel B desc
- // QStringList desc_list_b = desc_b.split(QRegExp("\\s+"));
- // desc_list_b.removeDuplicates();
+ // allData[ i ].description = final_desc;
+ // qDebug() << "Description AFTER: " << i << ", " << allData[ i ].description;
+ // }
+
- // QString final_desc("");
-
- // for ( int i=0; i<desc_list_a.size(); i++ )
- // {
- // if ( desc_list_a[i].isEmpty() )
- // continue;
- // final_desc += desc_list_a[i];
+
+ // //ALEXEY: Remove Duplicates in Channel's description
+ // for (int i = 0; i < allData.size(); i++)
+ // {
+ // qDebug() << "Description BEFORE: " << i << ", " << allData[ i ].description;
- // if ( i != desc_list_a.size() - 1)
- // final_desc += QString(" ");
- // else
- // final_desc += QString("; ");
+ // QString desc = allData[ i ].description;
+ // desc.replace(",", "");
+ // QString desc_a = desc.split(QRegExp(";"))[0];
+ // QString desc_b = desc.split(QRegExp(";"))[1];
- // }
- // for ( int i=0; i<desc_list_b.size(); i++ )
- // {
- // if ( desc_list_b[i].isEmpty() )
- // continue;
- // final_desc += desc_list_b[i];
+ // //list of channel A desc
+ // QStringList desc_list_a = desc_a.split(QRegExp("\\s+"));
+ // desc_list_a.removeDuplicates();
- // if ( i != desc_list_b.size() - 1)
- // final_desc += QString(" ");
- // // else
- // // final_desc += QString("; ");
-
- // }
+ // //list of channel B desc
+ // QStringList desc_list_b = desc_b.split(QRegExp("\\s+"));
+ // desc_list_b.removeDuplicates();
+
+ // QString final_desc("");
+
+ // for ( int i=0; i<desc_list_a.size(); i++ )
+ // {
+ // if ( desc_list_a[i].isEmpty() )
+ // continue;
+ // final_desc += desc_list_a[i];
+
+ // if ( i != desc_list_a.size() - 1)
+ // final_desc += QString(" ");
+ // else
+ // final_desc += QString("; ");
+
+ // }
+ // for ( int i=0; i<desc_list_b.size(); i++ )
+ // {
+ // if ( desc_list_b[i].isEmpty() )
+ // continue;
+ // final_desc += desc_list_b[i];
+
+ // if ( i != desc_list_b.size() - 1)
+ // final_desc += QString(" ");
+ // // else
+ // // final_desc += QString("; ");
+
+ // }
+
+ // allData[ i ].description = final_desc;
+ // qDebug() << "Description AFTER: " << i << ", " << allData[ i ].description;
+ // }
- // allData[ i ].description = final_desc;
- // qDebug() << "Description AFTER: " << i << ", " << allData[ i ].description;
- // }
-
if ( ! init_output_data() )
return;
@@ -4715,28 +4807,31 @@
} // End of 'else' loop for multispeed case
// x x x x x
- if ( !us_convert_auto_mode )
+ if ( us_convert_auto_mode ) // if us_comproject OR us_comproject_academic
{
- 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();
- emit saving_complete_back_to_exp( ProtocolName_auto );
- return;
+ if ( usmode ) // us_comproject_academic
+ {
+ 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();
+ emit saving_complete_back_to_exp( ProtocolName_auto );
+ return;
+ }
+ 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...
+ emit saving_complete_auto( currentDir, ProtocolName_auto );
+ }
}
- else
- {
- // 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...
- emit saving_complete_auto( currentDir, ProtocolName_auto );
- }
}
//Delete autoflow record upon Run abortion
Modified: trunk/programs/us_convert/us_convert_gui.h
===================================================================
--- trunk/programs/us_convert/us_convert_gui.h 2019-05-15 20:19:58 UTC (rev 2764)
+++ trunk/programs/us_convert/us_convert_gui.h 2019-05-17 05:09:32 UTC (rev 2765)
@@ -46,6 +46,9 @@
US_SimulationParameters simparams; //!< Simulation parameters
QList< double > subsets; //!< A list of subset boundaries
+ void us_mode_passed ( void );
+ bool usmode;
+
signals:
void saving_complete_auto( QString &, QString & );
void saving_complete_back_to_exp( QString & );
@@ -299,7 +302,7 @@
*/
void assign_investigator( int );
- void import_data_auto (QString &, QString &, QString &);
+ void import_data_auto (QString &, QString &, QString &, QString &);
void import ( void );
void reimport ( void );
Modified: trunk/programs/us_experiment/us_experiment_gui_optima.cpp
===================================================================
--- trunk/programs/us_experiment/us_experiment_gui_optima.cpp 2019-05-15 20:19:58 UTC (rev 2764)
+++ trunk/programs/us_experiment/us_experiment_gui_optima.cpp 2019-05-17 05:09:32 UTC (rev 2765)
@@ -221,7 +221,8 @@
// ALEXEY: do proper reset of everything
reset();
- //emit to_live_update( protocol_details );
+
+ emit exp_cleared();
}
// When run submitted to Optima
@@ -5304,6 +5305,7 @@
protocol_details[ "CellChNumber" ] = QString::number(rpSolut->nschan); // this can be read from protocol in US-lims DB
protocol_details[ "duration" ] = QString::number(Total_duration);
protocol_details[ "invID_passed" ] = QString::number(US_Settings::us_inv_ID());
+ protocol_details[ "correctRadii" ] = QString("YES");
int nwavl_tot = 0;
for ( int kk = 0; kk < rpRange->nranges; kk++ )
Modified: trunk/programs/us_experiment/us_experiment_gui_optima.h
===================================================================
--- trunk/programs/us_experiment/us_experiment_gui_optima.h 2019-05-15 20:19:58 UTC (rev 2764)
+++ trunk/programs/us_experiment/us_experiment_gui_optima.h 2019-05-17 05:09:32 UTC (rev 2765)
@@ -958,6 +958,7 @@
signals:
void us_exp_is_closed( void );
void to_live_update( QMap < QString, QString > &protocol_details );
+ void exp_cleared ( void );
};
Modified: trunk/programs/us_xpn_viewer/us_xpn_viewer_gui.cpp
===================================================================
--- trunk/programs/us_xpn_viewer/us_xpn_viewer_gui.cpp 2019-05-15 20:19:58 UTC (rev 2764)
+++ trunk/programs/us_xpn_viewer/us_xpn_viewer_gui.cpp 2019-05-17 05:09:32 UTC (rev 2765)
@@ -220,6 +220,8 @@
QGridLayout* settings = new QGridLayout;
QGridLayout* live_params = new QGridLayout;
QGridLayout* time_params = new QGridLayout;
+
+ auto_mode_bool = true;
navgrec = 10;
dbg_level = US_Settings::us_debug();
@@ -741,6 +743,8 @@
setPalette( US_GuiSettings::frameColor() );
QGridLayout* settings = new QGridLayout;
+
+ auto_mode_bool = false;
navgrec = 10;
dbg_level = US_Settings::us_debug();
@@ -1659,21 +1663,31 @@
<< RunID_to_retrieve
<< currentDir;
- //db->query( qry );
+ db->query( qry );
- // OR
+ //ALEXEY: if there is NO chromatic Abber. data, set corrRadii in autoflow record to 'NO'
+ if ( correctRadii == "NO" )
+ {
+ qry.clear();
+ qry << "update_autoflow_at_live_update_radiicorr"
+ << RunID_to_retrieve;
- qDebug() << "Trying to Update Autoflow table AT LIVE_UPDATE!!";
- int status = db->statusQuery( qry );
+ db->query( qry );
+ }
- if ( status == US_DB2::NO_AUTOFLOW_RECORD )
- {
- QMessageBox::warning( this,
- tr( "Autoflow Record Not Updated" ),
- tr( "No autoflow record\n"
- "associated with RunID %1 exists!" ).arg( RunID_to_retrieve ) );
- return;
- }
+ // // OR
+
+ // qDebug() << "Trying to Update Autoflow table AT LIVE_UPDATE!!";
+ // int status = db->statusQuery( qry );
+
+ // if ( status == US_DB2::NO_AUTOFLOW_RECORD )
+ // {
+ // QMessageBox::warning( this,
+ // tr( "Autoflow Record Not Updated" ),
+ // tr( "No autoflow record\n"
+ // "associated with RunID %1 exists!" ).arg( RunID_to_retrieve ) );
+ // return;
+ // }
}
@@ -1819,17 +1833,16 @@
{
if ( !timer_data_reload->isActive() )
{
-
qDebug() << "TRY PROCEED INTO ==5 from check_for_sys_data()....";
// ALEXEY Export AUC data: devise export_auc_auto() function which would return directory name with saved data - to pass to emit signal below...
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 );
+ // 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 ); // Updtade later: what should be passed with signal ??
+ emit experiment_complete_auto( currentDir, ProtocolName, invID_passed, correctRadii ); // Updtade later: what should be passed with signal ??
return;
}
@@ -1855,7 +1868,7 @@
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).");
+ 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);
@@ -1872,7 +1885,7 @@
QMessageBox::information( this, mtitle_complete, message_done );
updateautoflow_record_atLiveUpdate();
- emit experiment_complete_auto( currentDir, ProtocolName, invID_passed ); // Updtade later: what should be passed with signal ??
+ emit experiment_complete_auto( currentDir, ProtocolName, invID_passed, correctRadii ); // Updtade later: what should be passed with signal ??
return;
}
@@ -1933,8 +1946,8 @@
TripleNumber = protocol_details[ "TripleNumber" ];
OptimaName = protocol_details[ "OptimaName" ]; //New
TotalDuration = protocol_details[ "duration" ];
-
invID_passed = protocol_details[ "invID_passed" ];
+ correctRadii = protocol_details[ "correctRadii" ];
selectOptimaByName_auto( OptimaName ); //New
@@ -2269,7 +2282,7 @@
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).");
+ 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);
@@ -2286,7 +2299,7 @@
QMessageBox::information( this, mtitle_complete, message_done );
updateautoflow_record_atLiveUpdate();
- emit experiment_complete_auto( currentDir, ProtocolName, invID_passed ); // Updtade later: what should be passed with signal ??
+ emit experiment_complete_auto( currentDir, ProtocolName, invID_passed, correctRadii ); // Updtade later: what should be passed with signal ??
return;
}
@@ -3635,13 +3648,13 @@
// ALEXEY Export AUC data: devise export_auc_auto() function which would return directory name with saved data - to pass to emit signal below...
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 );
+ // 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 ); // Updtade later: what should be passed with signal ??
+ emit experiment_complete_auto( currentDir, ProtocolName, invID_passed, correctRadii ); // Updtade later: what should be passed with signal ??
//QString temp_protname("DemchukA_exosomes40K_111418");
//emit experiment_complete_auto( currentDir, temp_protname );
@@ -3663,7 +3676,7 @@
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).");
+ 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);
@@ -3680,7 +3693,7 @@
QMessageBox::information( this, mtitle_complete, message_done );
updateautoflow_record_atLiveUpdate();
- emit experiment_complete_auto( currentDir, ProtocolName, invID_passed ); // Updtade later: what should be passed with signal ??
+ emit experiment_complete_auto( currentDir, ProtocolName, invID_passed, correctRadii ); // Updtade later: what should be passed with signal ??
return;
}
@@ -3868,12 +3881,15 @@
// a correction was found
if (correction.size() > 0)
{
- QMessageBox::warning( this,
- tr( "Chromatic Aberration Correction:" ),
- tr( "Wavelength correction data for currently used Optima machine\n"
- "are found in DB and will be used to correct your data for\n"
- "chromatic aberration between 190 nm and 800 nm.\n\n"
- "Exported data will be modified!\n") );
+ if ( !auto_mode_bool )
+ {
+ QMessageBox::warning( this,
+ tr( "Chromatic Aberration Correction:" ),
+ tr( "Wavelength correction data for currently used Optima machine\n"
+ "are found in DB and will be used to correct your data for\n"
+ "chromatic aberration between 190 nm and 800 nm.\n\n"
+ "Exported data will be modified!\n") );
+ }
// For each triple, get the wavelength; then compute and apply a correction
for ( int jd = 0; jd < ntripl; jd++ )
@@ -3893,13 +3909,21 @@
}
}
}
-if (jd<3 || (jd+4)>ntripl )
-DbgLv(1) << "c_r: ri0 ro0" << r_radii[0] << allData[jd].xvalues[0]
- << "rin ron" << r_radii[npoint-1] << allData[jd].xvalues[npoint-1];
+ if (jd<3 || (jd+4)>ntripl )
+ DbgLv(1) << "c_r: ri0 ro0" << r_radii[0] << allData[jd].xvalues[0]
+ << "rin ron" << r_radii[npoint-1] << allData[jd].xvalues[npoint-1];
}
}
+ else // No chromatic abberation in instrument's table
+ {
+ if ( auto_mode_bool )
+ {
+ correctRadii = QString("NO");
+ }
+ }
}
+
/*
// Apply a chromatic aberration correction to auc data radius values <--- OLD function
void US_XpnDataViewer::correct_radii()
Modified: trunk/programs/us_xpn_viewer/us_xpn_viewer_gui.h
===================================================================
--- trunk/programs/us_xpn_viewer/us_xpn_viewer_gui.h 2019-05-15 20:19:58 UTC (rev 2764)
+++ trunk/programs/us_xpn_viewer/us_xpn_viewer_gui.h 2019-05-17 05:09:32 UTC (rev 2765)
@@ -96,6 +96,8 @@
US_XpnDataViewer(QString auto_mode);
private:
+ bool auto_mode_bool;
+
QVector< US_DataIO::RawData > allData; //!< All AUC raw data
QVector< double > r_radii; //!< Loaded radii
@@ -280,6 +282,8 @@
QString OptimaName; //New
QString TotalDuration; //New
QString invID_passed;
+ QString correctRadii;
+
int ElapsedTimeOffset;
void timeToList( int&, QList< int >& );
@@ -347,7 +351,7 @@
void test_optima_connection( void ); //New
signals:
- void experiment_complete_auto( QString &, QString &, QString & );
+ void experiment_complete_auto( QString &, QString &, QString &, QString & );
void return_to_experiment( QString & );
void close_program( void );
};
Modified: trunk/sql/us3.sql
===================================================================
--- trunk/sql/us3.sql 2019-05-15 20:19:58 UTC (rev 2764)
+++ trunk/sql/us3.sql 2019-05-17 05:09:32 UTC (rev 2765)
@@ -101,6 +101,7 @@
runStarted TIMESTAMP NULL,
invID INT NULL,
created TIMESTAMP NULL,
+ corrRadii enum('YES', 'NO') NOT NULL,
PRIMARY KEY (ID) )
ENGINE = InnoDB;
Modified: trunk/sql/us3_autoflow_procs.sql
===================================================================
--- trunk/sql/us3_autoflow_procs.sql 2019-05-15 20:19:58 UTC (rev 2764)
+++ trunk/sql/us3_autoflow_procs.sql 2019-05-17 05:09:32 UTC (rev 2765)
@@ -151,7 +151,7 @@
SELECT @OK AS status;
SELECT protName, cellChNum, tripleNum, duration, runName, expID,
- runID, status, dataPath, optimaName, runStarted, invID, created
+ runID, status, dataPath, optimaName, runStarted, invID, created, corrRadii
FROM autoflow
WHERE ID = p_autoflowID;
@@ -283,6 +283,46 @@
END$$
+
+-- Update autoflow record with corrRadii value at LIVE_UPDATE
+DROP PROCEDURE IF EXISTS update_autoflow_at_live_update_radiicorr$$
+CREATE PROCEDURE update_autoflow_at_live_update_radiicorr ( p_personGUID CHAR(36),
+ p_password VARCHAR(80),
+ p_runID INT )
+
+ MODIFIES SQL DATA
+
+BEGIN
+ DECLARE count_records INT;
+
+ CALL config();
+ SET @US3_LAST_ERRNO = @OK;
+ SET @US3_LAST_ERROR = '';
+
+ SELECT COUNT(*)
+ INTO count_records
+ FROM autoflow
+ WHERE runID = p_runID;
+
+ IF ( verify_user( p_personGUID, p_password ) = @OK ) THEN
+ IF ( count_records = 0 ) THEN
+ SET @US3_LAST_ERRNO = @NO_AUTOFLOW_RECORD;
+ SET @US3_LAST_ERROR = 'MySQL: no rows returned';
+
+ ELSE
+ UPDATE autoflow
+ SET corrRadii = 'NO'
+ WHERE runID = p_runID;
+
+ END IF;
+
+ END IF;
+
+ SELECT @US3_LAST_ERRNO AS status;
+
+END$$
+
+
---- get initial elapsed time upon reattachment -----------------------------
DROP FUNCTION IF EXISTS read_autoflow_times$$
CREATE FUNCTION read_autoflow_times ( p_personGUID CHAR(36),
1
0
May 15, 2019
Author: alexey
Date: 2019-05-15 20:19:58 +0000 (Wed, 15 May 2019)
New Revision: 2764
Modified:
trunk/programs/us_com_project/us_com_project_gui.cpp
trunk/programs/us_convert/us_convert_gui.cpp
Log:
remove treating duplicates in channel description for now...
Modified: trunk/programs/us_com_project/us_com_project_gui.cpp
===================================================================
--- trunk/programs/us_com_project/us_com_project_gui.cpp 2019-05-13 22:25:23 UTC (rev 2763)
+++ trunk/programs/us_com_project/us_com_project_gui.cpp 2019-05-15 20:19:58 UTC (rev 2764)
@@ -387,7 +387,7 @@
return;
- // Dialog of aexisting autoflow records
+ // Dialog of existing autoflow records
US_Passwd pw;
US_DB2* dbP = new US_DB2( pw.getPasswd() );
list_all_autoflow_records( autoflowdata, dbP );
@@ -397,7 +397,7 @@
int prx;
hdrs << "ID"
<< "Run Name"
- << "Optima"
+ << "Optima Name"
<< "Created"
<< "Started";
@@ -415,8 +415,12 @@
if ( pdiag->exec() == QDialog::Accepted )
autoflow_id_selected = autoflowdata[ prx ][ 0 ];
else
- return;
-
+ {
+ //ALEXEY: define what to do if Optima is occupied, OR if there is another Optima (occupied or not)
+ // autoflowdata[ i ][ 2 ]; // <-- gives Optima Name
+ // autoflowdata[ i ][ 4 ]; // <-- STARTED / NOT STARTED
+ return;
+ }
// -------------------------------------------------------------------------------------------------
// Get detailed info on the autoflow record
@@ -430,8 +434,7 @@
QString invID_passed = protocol_details[ "invID_passed" ];
QString ProtName = protocol_details[ "protocolName" ];
-
-
+
//ALEXEY: if stage=="EDITING" && curDir.isEmpty() (NULL)
/*
-- that means that Run Completed but Directory was created on different computer
Modified: trunk/programs/us_convert/us_convert_gui.cpp
===================================================================
--- trunk/programs/us_convert/us_convert_gui.cpp 2019-05-13 22:25:23 UTC (rev 2763)
+++ trunk/programs/us_convert/us_convert_gui.cpp 2019-05-15 20:19:58 UTC (rev 2764)
@@ -1536,54 +1536,54 @@
le_runID ->setText( runID );
scanTolerance = 5.0;
- //ALEXEY: Remove Duplicates in Channel's description
- for (int i = 0; i < allData.size(); i++)
- {
- qDebug() << "Description BEFORE: " << i << ", " << allData[ i ].description;
+ // //ALEXEY: Remove Duplicates in Channel's description
+ // for (int i = 0; i < allData.size(); i++)
+ // {
+ // qDebug() << "Description BEFORE: " << i << ", " << allData[ i ].description;
- QString desc = allData[ i ].description;
- desc.replace(",", "");
- QString desc_a = desc.split(QRegExp(";"))[0];
- QString desc_b = desc.split(QRegExp(";"))[1];
+ // QString desc = allData[ i ].description;
+ // desc.replace(",", "");
+ // QString desc_a = desc.split(QRegExp(";"))[0];
+ // QString desc_b = desc.split(QRegExp(";"))[1];
- //list of channel A desc
- QStringList desc_list_a = desc_a.split(QRegExp("\\s+"));
- desc_list_a.removeDuplicates();
+ // //list of channel A desc
+ // QStringList desc_list_a = desc_a.split(QRegExp("\\s+"));
+ // desc_list_a.removeDuplicates();
- //list of channel B desc
- QStringList desc_list_b = desc_b.split(QRegExp("\\s+"));
- desc_list_b.removeDuplicates();
+ // //list of channel B desc
+ // QStringList desc_list_b = desc_b.split(QRegExp("\\s+"));
+ // desc_list_b.removeDuplicates();
- QString final_desc("");
+ // QString final_desc("");
- for ( int i=0; i<desc_list_a.size(); i++ )
- {
- if ( desc_list_a[i].isEmpty() )
- continue;
- final_desc += desc_list_a[i];
+ // for ( int i=0; i<desc_list_a.size(); i++ )
+ // {
+ // if ( desc_list_a[i].isEmpty() )
+ // continue;
+ // final_desc += desc_list_a[i];
- if ( i != desc_list_a.size() - 1)
- final_desc += QString(" ");
- else
- final_desc += QString("; ");
+ // if ( i != desc_list_a.size() - 1)
+ // final_desc += QString(" ");
+ // else
+ // final_desc += QString("; ");
- }
- for ( int i=0; i<desc_list_b.size(); i++ )
- {
- if ( desc_list_b[i].isEmpty() )
- continue;
- final_desc += desc_list_b[i];
+ // }
+ // for ( int i=0; i<desc_list_b.size(); i++ )
+ // {
+ // if ( desc_list_b[i].isEmpty() )
+ // continue;
+ // final_desc += desc_list_b[i];
- if ( i != desc_list_b.size() - 1)
- final_desc += QString(" ");
- // else
- // final_desc += QString("; ");
+ // if ( i != desc_list_b.size() - 1)
+ // final_desc += QString(" ");
+ // // else
+ // // final_desc += QString("; ");
- }
+ // }
- allData[ i ].description = final_desc;
- qDebug() << "Description AFTER: " << i << ", " << allData[ i ].description;
- }
+ // allData[ i ].description = final_desc;
+ // qDebug() << "Description AFTER: " << i << ", " << allData[ i ].description;
+ // }
if ( ! init_output_data() )
return;
1
0
Author: gegorbet
Date: 2019-05-13 22:25:23 +0000 (Mon, 13 May 2019)
New Revision: 2763
Modified:
trunk/programs/us_convert/us_convert_gui.cpp
Log:
fix us_convert to not crash when choosing MWL channel with less wavelengths than in the previously selected channel
Modified: trunk/programs/us_convert/us_convert_gui.cpp
===================================================================
--- trunk/programs/us_convert/us_convert_gui.cpp 2019-05-12 22:05:47 UTC (rev 2762)
+++ trunk/programs/us_convert/us_convert_gui.cpp 2019-05-13 22:25:23 UTC (rev 2763)
@@ -5822,7 +5822,7 @@
void US_ConvertGui::plot_all( void )
{
US_DataIO::RawData* currentData = outData[ tripDatax ];
-DbgLv(1) << " PlAll: outData count" << outData.count();
+DbgLv(1) << " PlAll: outData count" << outData.count() << "tripDatax" << tripDatax;
QList< QColor > mcolors;
int nmcols = usplot->map_colors( mcolors );
@@ -6076,18 +6076,29 @@
void US_ConvertGui::triple_index()
{
tripListx = lw_triple->currentRow();
- tripDatax = isMwl
- ? out_chandatx[ tripListx ] + cb_lambplot->currentIndex()
- : tripListx;
+
+ if ( isMwl )
+ { // Compute data index of MWL data
+ int tripnext = qMin( ( tripListx + 1 ), ( out_chandatx.size() - 1 ) );
+ int tripx1 = out_chandatx[ tripListx ];
+ int tripx2 = out_chandatx[ tripnext ];
+ tripDatax = tripx1 + cb_lambplot->currentIndex();
+
+ if ( tripDatax >= tripx2 )
+ { // Less wavelengths in this channel than in the previous one
+ tripDatax = ( tripx1 + tripx2 ) / 2;
+ mwl_connect( false );
+ cb_lambplot->setCurrentIndex( ( tripDatax - tripx1 ) );
+ mwl_connect( true );
+ }
+ }
+
+ else
+ { // Non-MWL data index is triple index
+ tripDatax = tripListx;
+ }
DbgLv(1) << " triple_index trLx trDx" << tripListx << tripDatax
<< " triple" << lw_triple->currentItem()->text();
-
- if (isMwl)
- qDebug() << "CHANGING TRIPLE: out_chandatx[ tripListx ] + cb_lambplot->currentIndex(): " << out_chandatx[ tripListx ] << " + " << cb_lambplot->currentIndex();
- else
- qDebug() << "CHANGING TRIPLE: tripDatax, tripListx : " << tripDatax << ", " << tripListx;
-
- qDebug() << "Size of out_chandatx: " << out_chandatx.size();
}
// Turn MWL connections on or off
1
0