Rev 146 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 146 | Rev 173 | ||
---|---|---|---|
Line 280... | Line 280... | ||
280 | sprintf(layoutdir, "Please restart the program to enable the selected layout (%s) for future use.", cTemp); |
280 | sprintf(layoutdir, "Please restart the program to enable the selected layout (%s) for future use.", cTemp); |
281 | new TGMsgBox(gClient->GetRoot(), fMain, "Setting new layout", layoutdir, kMBIconAsterisk, kMBOk, &ret); |
281 | new TGMsgBox(gClient->GetRoot(), fMain, "Setting new layout", layoutdir, kMBIconAsterisk, kMBOk, &ret); |
282 | delete[] cTemp; |
282 | delete[] cTemp; |
283 | } |
283 | } |
284 | delete[] layoutdir; |
284 | delete[] layoutdir; |
- | 285 | } |
|
- | 286 | ||
- | 287 | // Function for saving all current measurement settings in a file and reopening them on next program open |
|
- | 288 | void TGAppMainFrame::SaveMeasSettings() |
|
- | 289 | { |
|
- | 290 | char *cTemp; |
|
- | 291 | cTemp = new char[1024]; |
|
- | 292 | sprintf(cTemp, "%s/settings/measurement_settings.txt", rootdir); |
|
- | 293 | ||
- | 294 | std::ofstream osettings; |
|
- | 295 | ||
- | 296 | osettings.open(cTemp, std::ofstream::out); |
|
- | 297 | if(osettings.is_open()) |
|
- | 298 | { |
|
- | 299 | osettings << "# Settings pane" << std::endl; |
|
- | 300 | for(int i = 0; i < 4; i++) |
|
- | 301 | osettings << (int)scansOn->widgetChBox[i]->IsDown() << std::endl; |
|
- | 302 | osettings << vHardlimit->widgetNE[0]->GetNumber() << std::endl; |
|
- | 303 | osettings << NCH->widgetNE[0]->GetNumber() << std::endl; |
|
- | 304 | osettings << posUnits->widgetCB->GetSelected() << std::endl; |
|
- | 305 | osettings << rotUnits->widgetCB->GetSelected() << std::endl; |
|
- | 306 | osettings << oscConnect->widgetTE->GetText() << std::endl; |
|
- | 307 | osettings << laserInfo->widgetTE->GetText() << std::endl; |
|
- | 308 | osettings << chtemp->widgetNE[0]->GetNumber() << std::endl; |
|
- | 309 | osettings << (int)liveDisp->widgetChBox[0]->IsDown() << std::endl; |
|
- | 310 | osettings << std::endl; |
|
- | 311 | ||
- | 312 | osettings << "# Main measurement window" << std::endl; |
|
- | 313 | osettings << vOutCh->widgetCB->GetSelected() << std::endl; |
|
- | 314 | for(int i = 0; i < 2; i++) |
|
- | 315 | osettings << (int)vOutOpt->widgetChBox[i]->IsDown() << std::endl; |
|
- | 316 | osettings << vOutStart->widgetNE[0]->GetNumber() << std::endl; |
|
- | 317 | osettings << vOutStop->widgetNE[0]->GetNumber() << std::endl; |
|
- | 318 | osettings << vOutStep->widgetNE[0]->GetNumber() << std::endl; |
|
- | 319 | ||
- | 320 | osettings << zPosMin->widgetNE[0]->GetNumber() << std::endl; |
|
- | 321 | osettings << zPosMax->widgetNE[0]->GetNumber() << std::endl; |
|
- | 322 | osettings << zPosStep->widgetNE[0]->GetNumber() << std::endl; |
|
- | 323 | osettings << xPosMin->widgetNE[0]->GetNumber() << std::endl; |
|
- | 324 | osettings << xPosMax->widgetNE[0]->GetNumber() << std::endl; |
|
- | 325 | osettings << xPosStep->widgetNE[0]->GetNumber() << std::endl; |
|
- | 326 | osettings << yPosMin->widgetNE[0]->GetNumber() << std::endl; |
|
- | 327 | osettings << yPosMax->widgetNE[0]->GetNumber() << std::endl; |
|
- | 328 | osettings << yPosStep->widgetNE[0]->GetNumber() << std::endl; |
|
- | 329 | ||
- | 330 | osettings << rotPosMin->widgetNE[0]->GetNumber() << std::endl; |
|
- | 331 | osettings << rotPosMax->widgetNE[0]->GetNumber() << std::endl; |
|
- | 332 | osettings << rotPosStep->widgetNE[0]->GetNumber() << std::endl; |
|
- | 333 | ||
- | 334 | osettings << evtNum->widgetNE[0]->GetNumber() << std::endl; |
|
- | 335 | osettings << fileName->widgetTE->GetText() << std::endl; |
|
- | 336 | ||
- | 337 | printf("Saving measurement settings to file.\n"); |
|
- | 338 | } |
|
- | 339 | else |
|
- | 340 | printf("Error! Save file can not be opened.\n"); |
|
- | 341 | osettings.close(); |
|
- | 342 | } |
|
- | 343 | ||
- | 344 | // Function for saving all current analysis settings in a file and reopening them on next program open |
|
- | 345 | void TGAppMainFrame::SaveAnalSettings() |
|
- | 346 | { |
|
- | 347 | char *cTemp; |
|
- | 348 | cTemp = new char[1024]; |
|
- | 349 | sprintf(cTemp, "%s/settings/analysis_settings.txt", rootdir); |
|
- | 350 | ||
- | 351 | std::ofstream osettings; |
|
- | 352 | ||
- | 353 | osettings.open(cTemp, std::ofstream::out); |
|
- | 354 | if(osettings.is_open()) |
|
- | 355 | { |
|
- | 356 | osettings << "# Analysis" << std::endl; |
|
- | 357 | // Integrate spectrum |
|
- | 358 | for(int i = 0; i < 3; i++) |
|
- | 359 | osettings << (int)intSpect->widgetChBox[i]->IsDown() << std::endl; |
|
- | 360 | for(int i = 0; i < 2; i++) |
|
- | 361 | osettings << resol2d->widgetNE[i]->GetNumber() << std::endl; |
|
- | 362 | ||
- | 363 | // Relative PDE |
|
- | 364 | osettings << (int)relPde->widgetChBox[0]->IsDown() << std::endl; |
|
- | 365 | osettings << (int)midPeak->widgetChBox[0]->IsDown() << std::endl; |
|
- | 366 | osettings << zeroAngle->widgetNE[0]->GetNumber() << std::endl; |
|
- | 367 | ||
- | 368 | // Breakdown voltage |
|
- | 369 | osettings << minPeak->widgetNE[0]->GetNumber() << std::endl; |
|
- | 370 | osettings << peakSepCalc->widgetNE[0]->GetNumber() << std::endl; |
|
- | 371 | ||
- | 372 | // Surface scan |
|
- | 373 | for(int i = 0; i < 2; i++) |
|
- | 374 | osettings << (int)surfScanOpt->widgetChBox[i]->IsDown() << std::endl; |
|
- | 375 | for(int i = 0; i < 2; i++) |
|
- | 376 | osettings << resolSurf->widgetNE[i]->GetNumber() << std::endl; |
|
- | 377 | ||
- | 378 | // Fitting |
|
- | 379 | osettings << fitSigma->widgetNE[0]->GetNumber() << std::endl; |
|
- | 380 | osettings << fitTresh->widgetNE[0]->GetNumber() << std::endl; |
|
- | 381 | osettings << fitInter->widgetNE[0]->GetNumber() << std::endl; |
|
- | 382 | osettings << adcOffset->widgetNE[0]->GetNumber() << std::endl; |
|
- | 383 | osettings << accError->widgetNE[0]->GetNumber() << std::endl; |
|
- | 384 | osettings << pedesLow->widgetNE[0]->GetNumber() << std::endl; |
|
- | 385 | for(int i = 0; i < 2; i++) |
|
- | 386 | osettings << (int)fitChecks->widgetChBox[i]->IsDown() << std::endl; |
|
- | 387 | osettings << std::endl; |
|
- | 388 | ||
- | 389 | osettings << "# Histogram controls" << std::endl; |
|
- | 390 | for(int i = 0; i < 2; i++) |
|
- | 391 | osettings << adcRange->widgetNE[i]->GetNumber() << std::endl; |
|
- | 392 | for(int i = 0; i < 2; i++) |
|
- | 393 | osettings << tdcRange->widgetNE[i]->GetNumber() << std::endl; |
|
- | 394 | for(int i = 0; i < 2; i++) |
|
- | 395 | osettings << yRange->widgetNE[i]->GetNumber() << std::endl; |
|
- | 396 | osettings << selectCh->widgetNE[0]->GetNumber() << std::endl; |
|
- | 397 | for(int i = 0 ; i < 2; i++) |
|
- | 398 | osettings << (int)histOpt->widgetChBox[i]->IsDown() << std::endl; |
|
- | 399 | osettings << posUnitsPlot->widgetCB->GetSelected() << std::endl; |
|
- | 400 | ||
- | 401 | printf("Saving analysis settings to file.\n"); |
|
- | 402 | } |
|
- | 403 | else |
|
- | 404 | printf("Error! Save file can not be opened.\n"); |
|
- | 405 | osettings.close(); |
|
- | 406 | } |
|
- | 407 | ||
- | 408 | // Function for getting all measurement settings from a file |
|
- | 409 | void TGAppMainFrame::GetMeasSettings() |
|
- | 410 | { |
|
- | 411 | char *cTemp, readTemp[1024]; |
|
- | 412 | cTemp = new char[1024]; |
|
- | 413 | sprintf(cTemp, "%s/settings/measurement_settings.txt", rootdir); |
|
- | 414 | ||
- | 415 | int iTemp, k = 0; |
|
- | 416 | double dTemp; |
|
- | 417 | ||
- | 418 | std::ifstream isettings; |
|
- | 419 | ||
- | 420 | isettings.open(cTemp, std::ifstream::in); |
|
- | 421 | if(isettings.is_open()) |
|
- | 422 | { |
|
- | 423 | printf("Opening measurement settings from file.\n"); |
|
- | 424 | ||
- | 425 | while(1) |
|
- | 426 | { |
|
- | 427 | if(isettings.peek() == '#') |
|
- | 428 | { |
|
- | 429 | isettings.getline(readTemp, 1024, '\n'); |
|
- | 430 | if(DBGSIG > 1) printf("GetMeasSettings(): readTemp = %s\n", readTemp); |
|
- | 431 | } |
|
- | 432 | else if(isettings.peek() == '\n') |
|
- | 433 | isettings.ignore(1, '\n'); |
|
- | 434 | else |
|
- | 435 | { |
|
- | 436 | if(k == 0) |
|
- | 437 | { |
|
- | 438 | // Scan settings |
|
- | 439 | for(int i = 0; i < 4; i++) |
|
- | 440 | { |
|
- | 441 | isettings >> iTemp; |
|
- | 442 | isettings.ignore(1, '\n'); |
|
- | 443 | if(iTemp == 0) scansOn->widgetChBox[i]->SetState(kButtonUp); |
|
- | 444 | else if(iTemp == 1) scansOn->widgetChBox[i]->SetState(kButtonDown); |
|
- | 445 | } |
|
- | 446 | // Hard voltage limit |
|
- | 447 | isettings >> dTemp; |
|
- | 448 | isettings.ignore(1, '\n'); |
|
- | 449 | vHardlimit->widgetNE[0]->SetNumber(dTemp); |
|
- | 450 | // Number of channels |
|
- | 451 | isettings >> iTemp; |
|
- | 452 | isettings.ignore(1, '\n'); |
|
- | 453 | NCH->widgetNE[0]->SetNumber(iTemp); |
|
- | 454 | // Position units |
|
- | 455 | isettings >> iTemp; |
|
- | 456 | isettings.ignore(1, '\n'); |
|
- | 457 | posUnits->widgetCB->Select(iTemp); |
|
- | 458 | // Rotation units |
|
- | 459 | isettings >> iTemp; |
|
- | 460 | isettings.ignore(1, '\n'); |
|
- | 461 | rotUnits->widgetCB->Select(iTemp); |
|
- | 462 | // Oscilloscope IP address |
|
- | 463 | isettings.getline(readTemp, 1024, '\n'); |
|
- | 464 | oscConnect->widgetTE->SetText(readTemp); |
|
- | 465 | // Laser info |
|
- | 466 | isettings.getline(readTemp, 1024, '\n'); |
|
- | 467 | laserInfo->widgetTE->SetText(readTemp); |
|
- | 468 | // Chamber temperature |
|
- | 469 | isettings >> dTemp; |
|
- | 470 | isettings.ignore(1, '\n'); |
|
- | 471 | chtemp->widgetNE[0]->SetNumber(dTemp); |
|
- | 472 | // Live display |
|
- | 473 | isettings >> iTemp; |
|
- | 474 | isettings.ignore(1, '\n'); |
|
- | 475 | if(iTemp == 0) liveDisp->widgetChBox[0]->SetState(kButtonUp); |
|
- | 476 | else if(iTemp == 1) liveDisp->widgetChBox[0]->SetState(kButtonDown); |
|
- | 477 | ||
- | 478 | k++; |
|
- | 479 | } |
|
- | 480 | else if(k == 1) |
|
- | 481 | { |
|
- | 482 | // Voltage supply channel |
|
- | 483 | isettings >> iTemp; |
|
- | 484 | isettings.ignore(1, '\n'); |
|
- | 485 | vOutCh->widgetCB->Select(iTemp); |
|
- | 486 | // Voltage supply options |
|
- | 487 | for(int i = 0; i < 2; i++) |
|
- | 488 | { |
|
- | 489 | isettings >> iTemp; |
|
- | 490 | isettings.ignore(1, '\n'); |
|
- | 491 | if(iTemp == 0) vOutOpt->widgetChBox[i]->SetState(kButtonUp); |
|
- | 492 | else if(iTemp == 1) vOutOpt->widgetChBox[i]->SetState(kButtonDown); |
|
- | 493 | } |
|
- | 494 | // Voltage supply min, max and step |
|
- | 495 | isettings >> dTemp; |
|
- | 496 | isettings.ignore(1, '\n'); |
|
- | 497 | vOutStart->widgetNE[0]->SetNumber(dTemp); |
|
- | 498 | isettings >> dTemp; |
|
- | 499 | isettings.ignore(1, '\n'); |
|
- | 500 | vOutStop->widgetNE[0]->SetNumber(dTemp); |
|
- | 501 | isettings >> dTemp; |
|
- | 502 | isettings.ignore(1, '\n'); |
|
- | 503 | vOutStep->widgetNE[0]->SetNumber(dTemp); |
|
- | 504 | // Z axis scan min, max and step |
|
- | 505 | isettings >> dTemp; |
|
- | 506 | isettings.ignore(1, '\n'); |
|
- | 507 | zPosMin->widgetNE[0]->SetNumber(dTemp); |
|
- | 508 | isettings >> dTemp; |
|
- | 509 | isettings.ignore(1, '\n'); |
|
- | 510 | zPosMax->widgetNE[0]->SetNumber(dTemp); |
|
- | 511 | isettings >> dTemp; |
|
- | 512 | isettings.ignore(1, '\n'); |
|
- | 513 | zPosStep->widgetNE[0]->SetNumber(dTemp); |
|
- | 514 | // X axis scan min, max and step |
|
- | 515 | isettings >> dTemp; |
|
- | 516 | isettings.ignore(1, '\n'); |
|
- | 517 | xPosMin->widgetNE[0]->SetNumber(dTemp); |
|
- | 518 | isettings >> dTemp; |
|
- | 519 | isettings.ignore(1, '\n'); |
|
- | 520 | xPosMax->widgetNE[0]->SetNumber(dTemp); |
|
- | 521 | isettings >> dTemp; |
|
- | 522 | isettings.ignore(1, '\n'); |
|
- | 523 | xPosStep->widgetNE[0]->SetNumber(dTemp); |
|
- | 524 | // Y axis scan min, max and step |
|
- | 525 | isettings >> dTemp; |
|
- | 526 | isettings.ignore(1, '\n'); |
|
- | 527 | yPosMin->widgetNE[0]->SetNumber(dTemp); |
|
- | 528 | isettings >> dTemp; |
|
- | 529 | isettings.ignore(1, '\n'); |
|
- | 530 | yPosMax->widgetNE[0]->SetNumber(dTemp); |
|
- | 531 | isettings >> dTemp; |
|
- | 532 | isettings.ignore(1, '\n'); |
|
- | 533 | yPosStep->widgetNE[0]->SetNumber(dTemp); |
|
- | 534 | // Rotation min, max and step |
|
- | 535 | isettings >> dTemp; |
|
- | 536 | isettings.ignore(1, '\n'); |
|
- | 537 | rotPosMin->widgetNE[0]->SetNumber(dTemp); |
|
- | 538 | isettings >> dTemp; |
|
- | 539 | isettings.ignore(1, '\n'); |
|
- | 540 | rotPosMax->widgetNE[0]->SetNumber(dTemp); |
|
- | 541 | isettings >> dTemp; |
|
- | 542 | isettings.ignore(1, '\n'); |
|
- | 543 | rotPosStep->widgetNE[0]->SetNumber(dTemp); |
|
- | 544 | // Number of events |
|
- | 545 | isettings >> iTemp; |
|
- | 546 | isettings.ignore(1, '\n'); |
|
- | 547 | evtNum->widgetNE[0]->SetNumber(iTemp); |
|
- | 548 | // Save filename |
|
- | 549 | isettings.getline(readTemp, 1024, '\n'); |
|
- | 550 | fileName->widgetTE->SetText(readTemp); |
|
- | 551 | ||
- | 552 | k++; |
|
- | 553 | } |
|
- | 554 | else |
|
- | 555 | break; |
|
- | 556 | } |
|
- | 557 | } |
|
- | 558 | } |
|
- | 559 | else |
|
- | 560 | printf("Error! Measurement settings file can not be opened. Using defaults.\n"); |
|
- | 561 | } |
|
- | 562 | ||
- | 563 | // Function for getting all analysis settings from a file |
|
- | 564 | void TGAppMainFrame::GetAnalSettings() |
|
- | 565 | { |
|
- | 566 | char *cTemp, readTemp[1024]; |
|
- | 567 | cTemp = new char[1024]; |
|
- | 568 | sprintf(cTemp, "%s/settings/analysis_settings.txt", rootdir); |
|
- | 569 | ||
- | 570 | int iTemp, k = 0; |
|
- | 571 | double dTemp; |
|
- | 572 | ||
- | 573 | std::ifstream isettings; |
|
- | 574 | ||
- | 575 | isettings.open(cTemp, std::ifstream::in); |
|
- | 576 | if(isettings.is_open()) |
|
- | 577 | { |
|
- | 578 | printf("Opening analysis settings from file.\n"); |
|
- | 579 | ||
- | 580 | while(1) |
|
- | 581 | { |
|
- | 582 | if(isettings.peek() == '#') |
|
- | 583 | { |
|
- | 584 | isettings.getline(readTemp, 1024, '\n'); |
|
- | 585 | if(DBGSIG > 1) printf("GetAnalSettings(): readTemp = %s\n", readTemp); |
|
- | 586 | } |
|
- | 587 | else if(isettings.peek() == '\n') |
|
- | 588 | isettings.ignore(1, '\n'); |
|
- | 589 | else |
|
- | 590 | { |
|
- | 591 | if(k == 0) |
|
- | 592 | { |
|
- | 593 | // Integrate spectrum options |
|
- | 594 | for(int i = 0; i < 3; i++) |
|
- | 595 | { |
|
- | 596 | isettings >> iTemp; |
|
- | 597 | isettings.ignore(1, '\n'); |
|
- | 598 | if(iTemp == 0) intSpect->widgetChBox[i]->SetState(kButtonUp); |
|
- | 599 | else if(iTemp == 1) intSpect->widgetChBox[i]->SetState(kButtonDown); |
|
- | 600 | } |
|
- | 601 | // Integrate spectrum 2D resolution |
|
- | 602 | for(int i = 0; i < 2; i++) |
|
- | 603 | { |
|
- | 604 | isettings >> iTemp; |
|
- | 605 | isettings.ignore(1, '\n'); |
|
- | 606 | resol2d->widgetNE[i]->SetNumber(iTemp); |
|
- | 607 | } |
|
- | 608 | // Relative PDE normalization |
|
- | 609 | isettings >> iTemp; |
|
- | 610 | isettings.ignore(1, '\n'); |
|
- | 611 | if(iTemp == 0) relPde->widgetChBox[0]->SetState(kButtonUp); |
|
- | 612 | else if(iTemp == 1) relPde->widgetChBox[0]->SetState(kButtonDown); |
|
- | 613 | // Relative PDE middle peak |
|
- | 614 | isettings >> iTemp; |
|
- | 615 | isettings.ignore(1, '\n'); |
|
- | 616 | if(iTemp == 0) midPeak->widgetChBox[0]->SetState(kButtonUp); |
|
- | 617 | else if(iTemp == 1) midPeak->widgetChBox[0]->SetState(kButtonDown); |
|
- | 618 | // Relative PDE zero angle setting |
|
- | 619 | isettings >> dTemp; |
|
- | 620 | isettings.ignore(1, '\n'); |
|
- | 621 | zeroAngle->widgetNE[0]->SetNumber(dTemp); |
|
- | 622 | // Breakdown voltage minimum number of detected peaks |
|
- | 623 | isettings >> iTemp; |
|
- | 624 | isettings.ignore(1, '\n'); |
|
- | 625 | minPeak->widgetNE[0]->SetNumber(iTemp); |
|
- | 626 | // Breakdown voltage separation calculation |
|
- | 627 | isettings >> iTemp; |
|
- | 628 | isettings.ignore(1, '\n'); |
|
- | 629 | peakSepCalc->widgetNE[0]->SetNumber(iTemp); |
|
- | 630 | // Surface scan options |
|
- | 631 | for(int i = 0; i < 2; i++) |
|
- | 632 | { |
|
- | 633 | isettings >> iTemp; |
|
- | 634 | isettings.ignore(1, '\n'); |
|
- | 635 | if(iTemp == 0) surfScanOpt->widgetChBox[i]->SetState(kButtonUp); |
|
- | 636 | else if(iTemp == 1) surfScanOpt->widgetChBox[i]->SetState(kButtonDown); |
|
- | 637 | } |
|
- | 638 | // Surface scan 2D resolution |
|
- | 639 | for(int i = 0; i < 2; i++) |
|
- | 640 | { |
|
- | 641 | isettings >> iTemp; |
|
- | 642 | isettings.ignore(1, '\n'); |
|
- | 643 | resolSurf->widgetNE[i]->SetNumber(iTemp); |
|
- | 644 | } |
|
- | 645 | // Fitting - sigma |
|
- | 646 | isettings >> dTemp; |
|
- | 647 | isettings.ignore(1, '\n'); |
|
- | 648 | fitSigma->widgetNE[0]->SetNumber(dTemp); |
|
- | 649 | // Fitting - S/N ratio |
|
- | 650 | isettings >> dTemp; |
|
- | 651 | isettings.ignore(1, '\n'); |
|
- | 652 | fitTresh->widgetNE[0]->SetNumber(dTemp); |
|
- | 653 | // Fitting - interpolation |
|
- | 654 | isettings >> iTemp; |
|
- | 655 | isettings.ignore(1, '\n'); |
|
- | 656 | fitInter->widgetNE[0]->SetNumber(iTemp); |
|
- | 657 | // Fitting - ADC offset |
|
- | 658 | isettings >> dTemp; |
|
- | 659 | isettings.ignore(1, '\n'); |
|
- | 660 | adcOffset->widgetNE[0]->SetNumber(dTemp); |
|
- | 661 | // Fitting - Acceptable error |
|
- | 662 | isettings >> dTemp; |
|
- | 663 | isettings.ignore(1, '\n'); |
|
- | 664 | accError->widgetNE[0]->SetNumber(dTemp); |
|
- | 665 | // Fitting - Pedestal lower limit |
|
- | 666 | isettings >> dTemp; |
|
- | 667 | isettings.ignore(1, '\n'); |
|
- | 668 | pedesLow->widgetNE[0]->SetNumber(dTemp); |
|
- | 669 | // Fitting - settings |
|
- | 670 | for(int i = 0; i < 2; i++) |
|
- | 671 | { |
|
- | 672 | isettings >> iTemp; |
|
- | 673 | isettings.ignore(1, '\n'); |
|
- | 674 | if(iTemp == 0) fitChecks->widgetChBox[i]->SetState(kButtonUp); |
|
- | 675 | else if(iTemp == 1) fitChecks->widgetChBox[i]->SetState(kButtonDown); |
|
- | 676 | } |
|
- | 677 | ||
- | 678 | k++; |
|
- | 679 | } |
|
- | 680 | else if(k == 1) |
|
- | 681 | { |
|
- | 682 | // ADC range |
|
- | 683 | for(int i = 0; i < 2; i++) |
|
- | 684 | { |
|
- | 685 | isettings >> dTemp; |
|
- | 686 | isettings.ignore(1, '\n'); |
|
- | 687 | adcRange->widgetNE[i]->SetNumber(dTemp); |
|
- | 688 | } |
|
- | 689 | // TDC range |
|
- | 690 | for(int i = 0; i < 2; i++) |
|
- | 691 | { |
|
- | 692 | isettings >> dTemp; |
|
- | 693 | isettings.ignore(1, '\n'); |
|
- | 694 | tdcRange->widgetNE[i]->SetNumber(dTemp); |
|
- | 695 | } |
|
- | 696 | // Y axis range |
|
- | 697 | for(int i = 0; i < 2; i++) |
|
- | 698 | { |
|
- | 699 | isettings >> dTemp; |
|
- | 700 | isettings.ignore(1, '\n'); |
|
- | 701 | yRange->widgetNE[i]->SetNumber(dTemp); |
|
- | 702 | } |
|
- | 703 | // Displayed channel |
|
- | 704 | isettings >> iTemp; |
|
- | 705 | isettings.ignore(1, '\n'); |
|
- | 706 | selectCh->widgetNE[0]->SetNumber(iTemp); |
|
- | 707 | // Display options |
|
- | 708 | for(int i = 0; i < 2; i++) |
|
- | 709 | { |
|
- | 710 | isettings >> iTemp; |
|
- | 711 | isettings.ignore(1, '\n'); |
|
- | 712 | if(iTemp == 0) histOpt->widgetChBox[i]->SetState(kButtonUp); |
|
- | 713 | else if(iTemp == 1) histOpt->widgetChBox[i]->SetState(kButtonDown); |
|
- | 714 | } |
|
- | 715 | // Display position units |
|
- | 716 | isettings >> iTemp; |
|
- | 717 | isettings.ignore(1, '\n'); |
|
- | 718 | posUnitsPlot->widgetCB->Select(iTemp); |
|
- | 719 | ||
- | 720 | k++; |
|
- | 721 | } |
|
- | 722 | else |
|
- | 723 | break; |
|
- | 724 | } |
|
- | 725 | } |
|
- | 726 | } |
|
- | 727 | else |
|
- | 728 | printf("Error! Measurement settings file can not be opened. Using defaults.\n"); |
|
285 | } |
729 | } |
286 | 730 | ||
287 | // Layout function for the main window (width and height) |
731 | // Layout function for the main window (width and height) |
288 | void layoutMainWindow(int *w, int *h) |
732 | void layoutMainWindow(int *w, int *h) |
289 | { |
733 | { |