Changeset 2833
- Timestamp:
- Sep 22, 2019 2:56:01 PM (3 months ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/programs/us_convert/us_convert_gui.cpp
r2828 r2833 44 44 45 45 46 US_ConvertGui::US_ConvertGui( QString auto_mode) : US_Widgets()46 US_ConvertGui::US_ConvertGui( QString auto_mode ) : US_Widgets() 47 47 { 48 48 ExpData.invID = US_Settings::us_inv_ID(); … … 1521 1521 { 1522 1522 impType = getImports(); 1523 DbgLv(1) << "CGui:IMP: impType" << impType; 1523 1524 1524 1525 if ( impType == 1 ) … … 1541 1542 1542 1543 success = read(); // Read the legacy data 1544 DbgLv(1) << "CGui:IMP: read success" << success; 1543 1545 1544 1546 if ( ! success ) return; … … 1552 1554 // Figure out all the triple combinations and convert data 1553 1555 success = convert(); 1556 DbgLv(1) << "CGui:IMP: convert success" << success; 1554 1557 1555 1558 if ( ! success ) return; … … 1557 1560 // Initialize export data pointers vector 1558 1561 success = init_output_data(); 1562 DbgLv(1) << "CGui:IMP: initout success" << success; 1559 1563 1560 1564 if ( ! success ) return; … … 1590 1594 referenceDefined = false; 1591 1595 pb_reference->setEnabled( true ); 1592 DbgLv(1) << "CGui: (2)referDef=" << referenceDefined;1593 } 1594 DbgLv(1) << "CGui: import: RTN";1596 DbgLv(1) << "CGui:IMP: (2)referDef=" << referenceDefined; 1597 } 1598 DbgLv(1) << "CGui:IMP: import: RTN"; 1595 1599 le_status->setText( tr( "Legacy data has been imported." ) ); 1596 1600 } … … 1783 1787 QDir readDir( importDir ); 1784 1788 1785 qDebug() << "CURRENT DIR_1: " << importDir;1789 DbgLv(1) << "CGui:iA: CURRENT DIR_1: " << importDir; 1786 1790 1787 1791 QApplication::setOverrideCursor( QCursor( Qt::WaitCursor ) ); … … 1806 1810 QString uuidst = US_Util::new_guid(); 1807 1811 US_Util::uuid_parse( uuidst, (unsigned char*)&rdata.rawGUID ); 1808 DbgLv(1) << " rIA:trx" << trx << "uuid" << uuidst << importDir;1812 DbgLv(1) << "CGui:iA: trx" << trx << "uuid" << uuidst << importDir; 1809 1813 1810 1814 // Save the raw data for this triple … … 1833 1837 // //TEMP 1834 1838 //runID += QString("-test"); 1835 1836 qDebug() << "RUNID from files[0]: files[0]" << fname << ", runID: " << runID;1839 1840 DbgLv(1) << "CGui:iA: RUNID from files[0]: files[0]" << fname << ", runID: " << runID; 1837 1841 1838 1842 le_runID2->setText( runID ); … … 1932 1936 // Point to any existing time state file 1933 1937 QDir ddir( currentDir ); 1934 qDebug() << "CURRENT DIR_2: " << currentDir;1938 DbgLv(1) << "CGui:iA: CURRENT DIR_2: " << currentDir; 1935 1939 QStringList tmsfs = ddir.entryList( QStringList( "*.time_state.*" ), 1936 1940 QDir::Files, QDir::Name ); … … 1972 1976 } 1973 1977 1974 if ( !us_convert_auto_mode)1975 1976 1977 1978 1978 if ( !us_convert_auto_mode ) 1979 { 1980 //le_status->setText( tr( "AUC data import IS COMPLETE." ) ); 1981 le_status->setText( tr( "Loading Data from Disk Successful." ) ); 1982 } 1979 1983 1980 1984 pb_showTmst->setEnabled( ! tmst_fnamei.isEmpty() ); … … 2767 2771 2768 2772 if ( isMwl ) 2769 2770 2771 2772 2773 2774 2775 2773 { 2774 qDebug() << "SOLUTION is READ in MWL mode !!! "; 2775 for (int i = 0; i < nchans; ++i ) 2776 { 2777 //Solution 2778 solutionID = ProtInfo.ProtSolutions.chsols[ i ].sol_id.toInt(); 2779 solution_auto.readFromDB(solutionID, &db); 2776 2780 2777 2781 qDebug() << "SOLS 0"; 2778 2782 2779 2783 out_chaninfo[ i ].solution = solution_auto; 2780 2784 2781 2785 qDebug() << "SOLS 0a"; 2782 2783 2786 qDebug() << "out_chandatx[ i ] + cb_lambplot->currentIndex() " << out_chandatx[ i ] << " + " << cb_lambplot->currentIndex() << out_chandatx[ i ] + cb_lambplot->currentIndex(); 2784 2787 2785 2788 //out_tripinfo[ out_chandatx[ i ] + cb_lambplot->currentIndex() ].solution = solution_auto; // ALEXEY <-- BUG 2786 2787 2789 qDebug() << "SOLS 1"; 2788 2790 … … 3377 3379 } 3378 3380 3381 DbgLv(1) << "CGui:ldDk:isMwl" << isMwl; 3379 3382 if ( isMwl ) 3380 3383 { // If need be, load MWL data object 3381 3384 mwl_data.load_mwl( allData ); 3382 3385 3386 DbgLv(1) << "CGui:ldDk: mwlsetup"; 3383 3387 mwl_setup(); 3384 3388 } … … 4085 4089 mwl_connect( true ); 4086 4090 } 4091 4092 // slambdas_per_channel.resize( nchans ); 4093 // elambdas_per_channel.resize( nchans ); 4087 4094 4088 4095 for ( int ccx = 0; ccx < nchans; ccx++ ) … … 4098 4105 + QString( " / %1-%2 (%3)" ) 4099 4106 .arg( slambda ).arg( elambda ).arg( nlambda ) ); 4100 } 4107 // slambdas_per_channel[ccx] = slambda; 4108 // elambdas_per_channel[ccx] = elambda; 4109 } 4110 DbgLv(1) << " sTi: slams_ch:" << slambdas_per_channel; 4111 DbgLv(1) << " sTi: elams_ch:" << elambdas_per_channel; 4101 4112 4102 4113 // Get wavelengths for the currently selected cell/channel … … 6440 6451 void US_ConvertGui::lambdaStartChanged( int value ) 6441 6452 { 6453 int slambda_lambplot; 6442 6454 DbgLv(1) << "lambdaStartChanged" << value; 6443 6455 6444 6456 //ALEXEY: compare slambda to the cb_lambplot->index(0).value: if <, setCurrentIndex() to index corresponding to this upper value 6445 tripListx = lw_triple->currentRow(); 6446 int slambda_lambplot = slambdas_per_channel[tripListx]; 6447 6448 slambda = cb_lambstrt->itemText( value ).toInt(); 6449 elambda = cb_lambstop->currentText() .toInt(); 6450 6451 qDebug() << "LAMBDA_STR_CHANGE: slambda_lambplot, slambda: " << slambda_lambplot << ", " << slambda; 6457 tripListx = lw_triple->currentRow(); 6458 slambda = cb_lambstrt->currentText().toInt(); 6459 elambda = cb_lambstop->currentText().toInt(); 6460 tripListx = lw_triple->currentRow(); 6461 if ( tripListx < slambdas_per_channel.size() ) 6462 slambda_lambplot = slambdas_per_channel[ tripListx ]; 6463 else 6464 slambda_lambplot = slambda; 6465 6466 DbgLv(1) << "lStChg: LAMBDA_STR_CHANGE: slambda_lambplot, slambda: " << slambda_lambplot << ", " << slambda; 6452 6467 6453 6468 if ( slambda < slambda_lambplot ) 6454 6469 //if ( slambda < 280 ) 6455 6470 { 6456 6471 int index_lambstrt = cb_lambstrt->findText( QString::number(slambda_lambplot) ); 6457 6472 6458 qDebug() << "LAMBDA_STR_CHANGE: index_lambstrt " << index_lambstrt;6473 DbgLv(1) << "lStChg: LAMBDA_STR_CHANGE: index_lambstrt " << index_lambstrt; 6459 6474 slambda = slambda_lambplot; 6460 6475 … … 6464 6479 this, SLOT ( lambdaStartChanged ( int ) ) ); 6465 6480 6466 } 6467 6468 //slambda = cb_lambstrt->itemText( value ).toInt(); 6469 //elambda = cb_lambstop->currentText() .toInt(); 6470 //tripListx = lw_triple->currentRow(); 6471 /***************************************************************************************************/ 6481 } 6472 6482 6473 6483 int currChan = out_chaninfo[ tripListx ].channelID; 6474 DbgLv(1) << "l ambdaStartChanged" << value << "sl el tLx cCh"6484 DbgLv(1) << "lStChg: lambdaStartChanged" << value << "sl el tLx cCh" 6475 6485 << slambda << elambda << tripListx << currChan; 6476 6486 … … 6495 6505 void US_ConvertGui::lambdaEndChanged( int value ) 6496 6506 { 6497 DbgLv(1) << "lambdaEndChanged" << value; 6507 int elambda_lambplot; 6508 DbgLv(1) << "lEnChg: lambdaEndChanged" << value; 6498 6509 6499 6510 //ALEXEY: compare slambda to the cb_lambplot->index(0).value: if <, setCurrentIndex() to index corresponding to this upper value 6500 tripListx = lw_triple->currentRow(); 6501 int elambda_lambplot = elambdas_per_channel[tripListx]; 6502 6503 elambda = cb_lambstop->itemText( value ).toInt(); 6504 slambda = cb_lambstrt->currentText() .toInt(); 6505 6506 qDebug() << "LAMBDA_STOP_CHANGE: elambda_lambplot, elambda: " << elambda_lambplot << ", " << elambda; 6511 slambda = cb_lambstrt->currentText().toInt(); 6512 elambda = cb_lambstop->currentText().toInt(); 6513 tripListx = lw_triple->currentRow(); 6514 DbgLv(1) << "lEnChg: trLx" << tripListx << "elch size" << elambdas_per_channel.size(); 6515 DbgLv(1) << "lEnChg: elams_ch:" << elambdas_per_channel; 6516 if ( tripListx < elambdas_per_channel.size() ) 6517 elambda_lambplot = elambdas_per_channel[ tripListx ]; 6518 else 6519 elambda_lambplot = elambda; 6520 6521 DbgLv(1) << "lEnChg: LAMBDA_STOP_CHANGE: elambda_lambplot, elambda: " << elambda_lambplot << ", " << elambda; 6507 6522 6508 6523 if ( elambda > elambda_lambplot ) 6509 6510 int index_lambstop = cb_lambstop->findText( QString::number( elambda_lambplot) );6511 6512 qDebug() << "LAMBDA_STOP_CHANGE: index_lambstrt" << index_lambstop;6524 { 6525 int index_lambstop = cb_lambstop->findText( QString::number( elambda_lambplot ) ); 6526 6527 DbgLv(1) << "lEnChg: LAMBDA_STOP_CHANGE: index_lambstop " << index_lambstop; 6513 6528 elambda = elambda_lambplot; 6514 6529 … … 6517 6532 connect( cb_lambstop, SIGNAL( currentIndexChanged( int ) ), 6518 6533 this, SLOT ( lambdaEndChanged ( int ) ) ); 6519 6520 } 6521 6522 //slambda = cb_lambstrt->itemText( value ).toInt(); 6523 //elambda = cb_lambstop->currentText() .toInt(); 6524 //tripListx = lw_triple->currentRow(); 6525 /***************************************************************************************************/ 6526 6527 6534 } 6528 6535 6529 6536 int currChan = out_chaninfo[ tripListx ].channelID; … … 6610 6617 int tripx2 = out_chandatx[ tripnext ]; 6611 6618 tripDatax = tripx1 + cb_lambplot->currentIndex(); 6612 6613 qDebug() << "TRIPLE_Index(): " 6614 << "tripnext = " << tripnext 6615 << ", tripx1 = " << tripx1 6616 << ", tripx2 = " << tripx2 6617 << ", tripDatax = tripx1 + cb_lambplot->currentIndex(): " << tripx1 << " + " << cb_lambplot->currentIndex(); 6618 6619 DbgLv(1) << "TRIPLE_Index(): " 6620 << "tripnext = " << tripnext 6621 << ", tripx1 = " << tripx1 6622 << ", tripx2 = " << tripx2 6623 << ", tripDatax = tripx1 + cb_lambplot->currentIndex(): " << tripx1 << " + " << cb_lambplot->currentIndex(); 6619 6624 6620 6625 //ALEXEY: the following part is buggy: commented out for now - seems to help with plotting/selecting triples for non-first channel for MWL case 6621 6626 //Ask Gary (if this section in place, it causes incorrect placement of cb_lambplot indexes, so no plots generated...) 6622 /* 6627 #if 0 6623 6628 if ( tripDatax >= tripx2 ) 6624 6629 { // Less wavelengths in this channel than in the previous one 6625 6630 tripDatax = ( tripx1 + tripx2 ) / 2; 6626 6631 mwl_connect( false ); 6632 DbgLv(1) << "Inside triple_index(): cb_lambplot->currentIndex() = " << cb_lambplot->currentIndex(); 6627 6633 cb_lambplot->setCurrentIndex( ( tripDatax - tripx1 ) ); 6628 6629 6630 qDebug() << "Inside triple_index(): cb_lambplot->currentIndex() = " << cb_lambplot->currentIndex();6631 6634 6632 6635 mwl_connect( true ); 6633 6636 } 6634 */ 6635 6636 qDebug() << "Inside triple_index(): cb_lambplot->currentIndex() = " << cb_lambplot->currentIndex(); 6637 6637 #endif 6638 DbgLv(1) << "Inside triple_index(): cb_lambplot->currentIndex() = " << cb_lambplot->currentIndex(); 6638 6639 } 6639 6640 … … 6852 6853 nlambda = mwl_data.lambdas( exp_lambdas ); 6853 6854 cb_lambplot->clear(); 6855 DbgLv(1) << "MwlSet: nlambda nlamb_i" << nlambda << nlamb_i; 6854 6856 6855 6857 for ( int ii = 0; ii < nlambda; ii++ ) … … 6857 6859 QString clamb = QString::number( exp_lambdas[ ii ] ); 6858 6860 cb_lambplot->addItem( clamb ); 6859 6860 qDebug() << "MWL_SETUP: exp_lambda " << ii << ", " << clamb; 6861 DbgLv(1) << "MwlSet: exp_lambda " << ii << ", " << clamb; 6861 6862 } 6862 6863 … … 6876 6877 6877 6878 for ( int ccx = 0; ccx < nchans_int; ccx++ ) 6878 { 6879 int nlambda_per_channel = mwl_data.lambdas( exp_lambdas, ccx ); 6880 if ( nlambda_per_channel < 1 ) 6881 { 6882 break; 6883 } 6884 slambdas_per_channel[ccx] = exp_lambdas[ 0 ]; 6885 elambdas_per_channel[ccx] = exp_lambdas[ nlambda_per_channel - 1 ]; 6886 } 6879 { 6880 int nlambda_per_channel = mwl_data.lambdas( exp_lambdas, ccx ); 6881 DbgLv(1) << "MwlSet: ccx" << ccx << "nlam/ch" << nlambda_per_channel; 6882 if ( nlambda_per_channel < 1 ) 6883 { 6884 break; 6885 } 6886 slambdas_per_channel[ccx] = exp_lambdas[ 0 ]; 6887 elambdas_per_channel[ccx] = exp_lambdas[ nlambda_per_channel - 1 ]; 6888 } 6887 6889 /****************************************************************************************************/ 6890 DbgLv(1) << "MwlSet: slams_ch:" << slambdas_per_channel; 6891 DbgLv(1) << "MwlSet: elams_ch:" << elambdas_per_channel; 6888 6892 6889 6893 … … 7124 7128 US_Convert::TripleInfo* tripinfo = &all_tripinfo[ trx ]; 7125 7129 7126 if ( tripinfo->excluded ) continue; 7130 if ( tripinfo->excluded ) 7131 { 7132 DbgLv(1) << "CGui: BOD: trx" << trx << "EXCLUDED"; 7133 continue; 7134 } 7127 7135 7128 7136 outData << &allData[ trx ]; -
trunk/programs/us_convert/us_convertio.cpp
r2785 r2833 379 379 return( "Unspecified error writing xml file." ); 380 380 381 // Download time state if need be 382 bool needTmst = false; 383 int tmstID = 0; 384 int expID = ExpData.expID; 385 QString tfname = runID + ".time_state.tmst"; 386 QString xdefs; 387 QString cksumd; 388 QDateTime datedt; 389 US_TimeState::dbExamine( db, &tmstID, &expID, &tfname, 390 &xdefs, &cksumd, &datedt ); 391 qDebug() << "rDBE: expID tmstID tfname cksumd datedt" 392 << expID << tmstID << tfname << cksumd << datedt; 393 if ( tmstID > 0 ) 394 { // There is a time state in the database: look at local disk 395 QString tfpath = dir + "/" + tfname; 396 qDebug() << "rDBE: HAVE tmst DB: tfpath" << tfpath; 397 if ( QFile( tfpath ).exists() ) 398 { // File exists, so check if it matches DB 399 QString cksumf = US_Util::md5sum_file( tfpath ); 400 qDebug() << "rDBE: HAVE tmst Loc: cksumf" << cksumf; 401 if ( cksumf != cksumd ) 402 { // DB/Local do not match, so overwrite local with download 403 needTmst = true; 404 } 405 } 406 else 407 { // No local tmst exists, do need to download it 408 needTmst = true; 409 } 410 411 qDebug() << "rDBE: needTmst" << needTmst; 412 if ( needTmst ) 413 { // Download the .tmst file 414 US_TimeState::dbDownload( db, tmstID, tfpath ); 415 // And write the xdefs sibling file 416 QString xfpath = QString( tfpath ).replace( ".tmst", ".xml" ); 417 qDebug() << "rDBE: xfpath" << xfpath; 418 QFile fileo( xfpath ); 419 if ( fileo.open( QIODevice::WriteOnly | QIODevice::Text ) ) 420 { 421 QTextStream tso( &fileo ); 422 tso << xdefs; 423 tso.flush(); 424 fileo.close(); 425 qDebug() << "rDBE: xdefs WRITTEN"; 426 } 427 } 428 } 381 429 return( QString( "" ) ); 382 430 } -
trunk/programs/us_xpn_viewer/us_xpn_run_auc.cpp
r2213 r2833 100 100 if ( ! dfile.exists() || 101 101 ! dfile.open( QIODevice::ReadOnly ) ) 102 { 103 qDebug() << "LdDk: dfname -- NOT exists/opened" << dpath; 102 104 continue; // Skip if TMST def file does not exist or can't be opened 105 } 103 106 qDebug() << "LdDk: dfname -- exists/opened"; 104 107 … … 112 115 if ( ! xmli.contains( pmatch ) && 113 116 ! xmli.contains( pmatch2 ) ) 117 { 114 118 continue; // Skip if TMST def has no import_type="Optima" 119 qDebug() << "LdDk: *SKIP* non-Optima"; 120 } 115 121 116 122 … … 121 127 rr.date = date; 122 128 rr.ntriple = nfiles; 123 //qDebug() << "LdDk: ii" << ii << " runID date count"124 // << rr.runID << rr.date << rr.nfiles;129 qDebug() << "LdDk: ii" << ii << " runID date count" 130 << rr.runID << rr.date << rr.ntriple; 125 131 126 132 runInfo << rr; -
trunk/programs/us_xpn_viewer/us_xpn_viewer_gui.cpp
r2827 r2833 2344 2344 // if ( lddiag->exec() == QDialog::Rejected ) //ALEXEY need drDesc but do NOT need dialog 2345 2345 // { 2346 // DbgLv(1) << "RD r: rtn fr XpnRunRaw dialog: CANCEL";2346 // DbgLv(1) << "RDa: rtn fr XpnRunRaw dialog: CANCEL"; 2347 2347 // return; 2348 2348 // } … … 2350 2350 // // Restore area beneath dialog 2351 2351 // qApp->processEvents(); 2352 // DbgLv(1) << "RD r: rtn fr XpnRunRaw dialog";2353 // DbgLv(1) << "RD r: drDesc" << drDesc;2352 // DbgLv(1) << "RDa: rtn fr XpnRunRaw dialog"; 2353 // DbgLv(1) << "RDa: drDesc" << drDesc; 2354 2354 2355 2355 // See if we need to fix the runID … … 2412 2412 scanmask += QString( sMasks ).mid( 4, 1 ) == "1" ? 4 : 0; 2413 2413 scanmask += QString( sMasks ).mid( 6, 1 ) == "1" ? 8 : 0; 2414 DbgLv(1) << "RDr: iRId" << iRunId << "sMsks scnmask" << sMasks << scanmask; 2415 2416 qDebug() << "RDr: iRId" << iRunId << "sMsks scnmask" << sMasks << scanmask; 2414 DbgLv(1) << "RDa: iRId" << iRunId << "sMsks scnmask" << sMasks << scanmask; 2417 2415 2418 2416 //ALEXEY: maybe put in_reload_check_sysdata = true; and then false (after xpn_data->import_data( iRunId, scanmask ); ) 2419 2417 //in_reload_check_sysdata = true; //ALEXEY 2420 xpn_data->import_data( iRunId, scanmask ); // ALEXEY <-- actual data retreiving 2418 2419 xpn_data->import_data( iRunId, scanmask ); // ALEXEY <-- actual data retreiving 2420 2421 2421 int ntsrows = xpn_data->countOf( "scan_rows" ); 2422 DbgLv(1) << "RD r: ntsrows" << ntsrows;2423 DbgLv(1) << "RD r: knt(triple) " << xpn_data->countOf( "triple" );2422 DbgLv(1) << "RDa: ntsrows" << ntsrows; 2423 DbgLv(1) << "RDa: knt(triple) " << xpn_data->countOf( "triple" ); 2424 2424 qApp->processEvents(); 2425 2425 … … 2475 2475 drtype2 = ( runType2 == "FI" ) ? "Fluorescence" : drtype2; 2476 2476 drtype2 = ( runType2 == "WI" ) ? "Wavelength" : drtype2; 2477 opsys << drtype1 << drtype2;2478 2479 2477 QString msg = tr( "Multiple scan data types are present:\n" ) 2480 2478 + "'" + drtype1 + "'\n or \n" 2481 + "'" + drtype2 + "' .\n\n" 2482 + tr( "Choose one for initial display." ); 2483 QMessageBox mbox; 2484 mbox.setWindowTitle( tr( "Scan Data Type to Process" ) ); 2485 mbox.setText( msg ); 2486 QPushButton* pb_opt1 = mbox.addButton( drtype1, QMessageBox::AcceptRole ); 2487 QPushButton* pb_opt2 = mbox.addButton( drtype2, QMessageBox::RejectRole ); 2488 mbox.setEscapeButton ( pb_opt2 ); 2489 mbox.setDefaultButton( pb_opt1 ); 2490 2491 mbox.exec(); 2492 if ( mbox.clickedButton() == pb_opt2 ) 2479 + "'" + drtype2 + "' .\n"; 2480 DbgLv(1) << "RDa: runType2 scanmask" << runType2 << scanmask << "[ifw]scn_rows" 2481 << xpn_data->countOf( "iscn_rows" ) 2482 << xpn_data->countOf( "fscn_rows" ) 2483 << xpn_data->countOf( "wscn_rows" ); 2484 if ( ( runType2 == "IP" && xpn_data->countOf( "iscn_rows" ) == 0 ) || 2485 ( runType2 == "FI" && xpn_data->countOf( "fscn_rows" ) == 0 ) || 2486 ( runType2 == "WI" && xpn_data->countOf( "wscn_rows" ) == 0 ) ) 2493 2487 { 2494 runType = runType2; 2495 optndx = 1; 2488 msg += tr( "\nScans are missing so only " ) + drtype1 2489 + tr( " scans are processed." ); 2490 QMessageBox::warning( this, 2491 tr( "Multiple Types with Missing Scans" ), 2492 msg ); 2496 2493 } 2494 2495 else 2496 { 2497 opsys << drtype1 << drtype2; 2498 msg += tr( "\nChoose one for initial display." ); 2499 QMessageBox mbox; 2500 mbox.setWindowTitle( tr( "Scan Data Type to Process" ) ); 2501 mbox.setText( msg ); 2502 QPushButton* pb_opt1 = mbox.addButton( drtype1, QMessageBox::AcceptRole ); 2503 QPushButton* pb_opt2 = mbox.addButton( drtype2, QMessageBox::RejectRole ); 2504 mbox.setEscapeButton ( pb_opt2 ); 2505 mbox.setDefaultButton( pb_opt1 ); 2506 2507 mbox.exec(); 2508 if ( mbox.clickedButton() == pb_opt2 ) 2509 { 2510 runType = runType2; 2511 optndx = 1; 2512 DbgLv(1) << "RDa: runType2 scanmask" << runType2 << scanmask << "[ifw]scn_rows" 2513 << xpn_data->countOf( "iscn_rows" ) 2514 << xpn_data->countOf( "fscn_rows" ) 2515 << xpn_data->countOf( "wscn_rows" ); 2516 } 2517 } 2497 2518 } 2498 2519 2499 2520 qApp->processEvents(); //ALEXEY: maybe this will help 2500 2501 qDebug() << "1. Crashes HERE!!!!"; 2521 DbgLv(1) << "RDa: 1. Crashes HERE!!!!"; 2502 2522 2503 2523 cb_optsys->disconnect(); 2504 2524 cb_optsys->clear(); 2505 2506 qDebug() << "1a. Crashes HERE!!!!"; 2525 DbgLv(1) << "RDa: 1a. Crashes HERE!!!!"; 2507 2526 2508 2527 cb_optsys->addItems( opsys ); // ALEXEY fill out Optics listbox 2509 2510 qDebug() << "1ab. Crashes HERE!!!! - BEFORE Setting index to cb_optsys"; 2528 DbgLv(1) << "RDa: 1ab. Crashes HERE!!!! - BEFORE Setting index to cb_optsys"; 2511 2529 cb_optsys->setCurrentIndex( optndx ); 2512 qDebug() << "1ac. Crashes HERE!!!! - AFTER Setting index to cb_optsys";2530 DbgLv(1) << "RDa: 1ac. Crashes HERE!!!! - AFTER Setting index to cb_optsys"; 2513 2531 2514 2532 connect( cb_optsys, SIGNAL( currentIndexChanged( int ) ), 2515 2533 this, SLOT ( changeOptics( ) ) ); 2516 2517 qDebug() << "1b. Crashes HERE!!!!"; 2534 DbgLv(1) << "RDa: 1b. Crashes HERE!!!!"; 2518 2535 2519 2536 runID = new_runID; 2520 DbgLv(1) << "RD r: runID" << runID << "runType" << runType;2537 DbgLv(1) << "RDa: runID" << runID << "runType" << runType; 2521 2538 xpn_data->set_run_values( runID, runType ); // ALEXEY 2522 2523 qDebug() << "2. Crashes HERE!!!! (after xpn_data->set_run_values( runID, runType ) )"; 2539 DbgLv(1) << "RDa: 2. Crashes HERE!!!! (after xpn_data->set_run_values( runID, runType ) )"; 2524 2540 2525 2541 // Build the AUC equivalent … … 2529 2545 2530 2546 xpn_data->build_rawData( allData ); // ALEXEY Builds Raw Data 2531 2532 qDebug() << "3. Crashes HERE!!!! (after xpn_data->build_rawData( allData ))"; 2547 DbgLv(1) << "RDa: 3. Crashes HERE!!!! (after xpn_data->build_rawData( allData ))"; 2533 2548 2534 2549 double tm2=(double)sttime.msecsTo(QDateTime::currentDateTime())/1000.0; 2535 DbgLv(1) << "RD r: build-raw done: tm1 tm2" << tm1 << tm2;2550 DbgLv(1) << "RDa: build-raw done: tm1 tm2" << tm1 << tm2; 2536 2551 2537 2552 QApplication::restoreOverrideCursor(); … … 2545 2560 npoint = allData[ 0 ].pointCount(); 2546 2561 2547 DbgLv(1) << "RD r: mwr ntriple" << ntriple;2548 DbgLv(1) << "RD r: ncellch" << ncellch << cellchans.count();2549 DbgLv(1) << "RD r: nscan" << nscan << "npoint" << npoint;2550 DbgLv(1) << "RD r: rvS rvE" << r_radii[0] << r_radii[npoint-1];2562 DbgLv(1) << "RDa: mwr ntriple" << ntriple; 2563 DbgLv(1) << "RDa: ncellch" << ncellch << cellchans.count(); 2564 DbgLv(1) << "RDa: nscan" << nscan << "npoint" << npoint; 2565 DbgLv(1) << "RDa: rvS rvE" << r_radii[0] << r_radii[npoint-1]; 2551 2566 cb_cellchn->disconnect(); 2552 2567 cb_cellchn->clear(); … … 2561 2576 ntriple = nlambda * ncellch; // Number triples 2562 2577 ntpoint = npoint * nscan; // Number radius points per triple 2563 DbgLv(1) << "RD r: nwl wvlo wvhi" << nlambda << wvlo << wvhi2578 DbgLv(1) << "RDa: nwl wvlo wvhi" << nlambda << wvlo << wvhi 2564 2579 << "ncellch" << ncellch << "nlambda" << nlambda << "ntriple" << ntriple; 2565 2580 triples.clear(); … … 2575 2590 #if 1 2576 2591 ntriple = xpn_data->data_triples( triples ); // ALEXEY triples 2577 DbgLv(1) << "RD r: nwl wvlo wvhi" << nlambda << wvlo << wvhi2592 DbgLv(1) << "RDa: nwl wvlo wvhi" << nlambda << wvlo << wvhi 2578 2593 << "ncellch" << ncellch << "nlambda" << nlambda << "ntriple" << ntriple 2579 2594 << triples.count(); 2580 2595 2581 qDebug() << "RD r: nwl wvlo wvhi" << nlambda << wvlo << wvhi2596 qDebug() << "RDa: nwl wvlo wvhi" << nlambda << wvlo << wvhi 2582 2597 << "ncellch" << ncellch << "nlambda" << nlambda << "ntriple" << ntriple 2583 2598 << triples.count(); 2584 2599 #endif 2585 2600 2586 DbgLv(1) << "RD r: allData size" << allData.size();2587 2588 qDebug() << "RD r: allData size" << allData.size();2601 DbgLv(1) << "RDa: allData size" << allData.size(); 2602 2603 qDebug() << "RDa: allData size" << allData.size(); 2589 2604 2590 2605 //QApplication::restoreOverrideCursor(); … … 2750 2765 DbgLv(1) << "RDr: iRId" << iRunId << "sMsks scnmask" << sMasks << scanmask; 2751 2766 2752 xpn_data->import_data( iRunId, scanmask ); 2767 xpn_data->import_data( iRunId, scanmask ); 2768 2753 2769 int ntsrows = xpn_data->countOf( "scan_rows" ); 2754 2770 DbgLv(1) << "RDr: ntsrows" << ntsrows; 2755 2771 DbgLv(1) << "RDr: knt(triple) " << xpn_data->countOf( "triple" ); 2756 2757 2772 2758 2773 if ( ntsrows < 1 ) … … 2774 2789 if ( scanmask == 1 || scanmask == 2 || 2775 2790 scanmask == 4 || scanmask == 8 ) 2776 { 2791 { // Single type of data present 2777 2792 runType = ( scanmask == 2 ) ? "FI" : runType; 2778 2793 runType = ( scanmask == 4 ) ? "IP" : runType; … … 2789 2804 2790 2805 else if ( ( scanmask & 1 ) != 0 ) 2791 { 2806 { // Multiple data types present 2792 2807 QApplication::restoreOverrideCursor(); 2793 2808 QApplication::restoreOverrideCursor(); … … 2803 2818 drtype2 = ( runType2 == "FI" ) ? "Fluorescence" : drtype2; 2804 2819 drtype2 = ( runType2 == "WI" ) ? "Wavelength" : drtype2; 2805 opsys << drtype1 << drtype2;2806 2807 2820 QString msg = tr( "Multiple scan data types are present:\n" ) 2808 2821 + "'" + drtype1 + "'\n or \n" 2809 + "'" + drtype2 + "' .\n\n" 2810 + tr( "Choose one for initial display." ); 2811 QMessageBox mbox; 2812 mbox.setWindowTitle( tr( "Scan Data Type to Process" ) ); 2813 mbox.setText( msg ); 2814 QPushButton* pb_opt1 = mbox.addButton( drtype1, QMessageBox::AcceptRole ); 2815 QPushButton* pb_opt2 = mbox.addButton( drtype2, QMessageBox::RejectRole ); 2816 mbox.setEscapeButton ( pb_opt2 ); 2817 mbox.setDefaultButton( pb_opt1 ); 2818 2819 mbox.exec(); 2820 if ( mbox.clickedButton() == pb_opt2 ) 2822 + "'" + drtype2 + "' .\n"; 2823 DbgLv(1) << "RDr: runType2 scanmask" << runType2 << scanmask << "[ifw]scn_rows" 2824 << xpn_data->countOf( "iscn_rows" ) 2825 << xpn_data->countOf( "fscn_rows" ) 2826 << xpn_data->countOf( "wscn_rows" ); 2827 if ( ( runType2 == "IP" && xpn_data->countOf( "iscn_rows" ) == 0 ) || 2828 ( runType2 == "FI" && xpn_data->countOf( "fscn_rows" ) == 0 ) || 2829 ( runType2 == "WI" && xpn_data->countOf( "wscn_rows" ) == 0 ) ) 2821 2830 { 2822 runType = runType2; 2823 optndx = 1; 2831 msg += tr( "\nScans are missing so only " ) + drtype1 2832 + tr( " scans are processed." ); 2833 QMessageBox::warning( this, 2834 tr( "Multiple Types with Missing Scans" ), 2835 msg ); 2836 } 2837 2838 else 2839 { 2840 opsys << drtype1 << drtype2; 2841 msg += tr( "\nChoose one for initial display." ); 2842 QMessageBox mbox; 2843 mbox.setWindowTitle( tr( "Scan Data Type to Process" ) ); 2844 mbox.setText( msg ); 2845 QPushButton* pb_opt1 = mbox.addButton( drtype1, QMessageBox::AcceptRole ); 2846 QPushButton* pb_opt2 = mbox.addButton( drtype2, QMessageBox::RejectRole ); 2847 mbox.setEscapeButton ( pb_opt2 ); 2848 mbox.setDefaultButton( pb_opt1 ); 2849 2850 mbox.exec(); 2851 if ( mbox.clickedButton() == pb_opt2 ) 2852 { 2853 runType = runType2; 2854 optndx = 1; 2855 DbgLv(1) << "RDr: runType2 scanmask" << runType2 << scanmask << "[ifw]scn_rows" 2856 << xpn_data->countOf( "iscn_rows" ) 2857 << xpn_data->countOf( "fscn_rows" ) 2858 << xpn_data->countOf( "wscn_rows" ); 2859 } 2824 2860 } 2825 2861 } -
trunk/utils/us_xpn_data.cpp
r2799 r2833 554 554 bool wscnf = scanMask & 8; 555 555 556 int arows= 0;557 int frows= 0;558 i nt irows= 0;559 int wrows= 0;556 arows = 0; 557 frows = 0; 558 irows = 0; 559 wrows = 0; 560 560 561 561 // Scan and build data for System Status Data … … 2307 2307 counts[ "scan_all" ] = ntscan; 2308 2308 counts[ "scan_rows" ] = ntsrow; 2309 counts[ "ascn_rows" ] = arows; 2310 counts[ "fscn_rows" ] = frows; 2311 counts[ "iscn_rows" ] = irows; 2312 counts[ "wscn_rows" ] = wrows; 2309 2313 2310 2314 counts[ "last_rpm" ] = qRound( isyrec.speed ); -
trunk/utils/us_xpn_data.h
r2722 r2833 435 435 int ntscan; //!< Total scans for all triples 436 436 int ntsrow; //!< Total (A+F+I+W) scan rows 437 int arows; //!< A scan rows 438 int frows; //!< F scan rows 439 int irows; //!< I scan rows 440 int wrows; //!< W scan rows 437 441 438 442 int etimoff; //!< Experimental time offset
Note: See TracChangeset
for help on using the changeset viewer.