Rev 167 | Rev 173 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 167 | Rev 172 | ||
---|---|---|---|
Line 13... | Line 13... | ||
13 | idtotal = 0; |
13 | idtotal = 0; |
14 | 14 | ||
15 | char *cTemp; |
15 | char *cTemp; |
16 | 16 | ||
17 | // Prepare the default open directory (basedir) |
17 | // Prepare the default open directory (basedir) |
- | 18 | currentMeasDir = new char[1024]; |
|
- | 19 | sprintf(currentMeasDir, "%s/results", rootdir); |
|
18 |
|
20 | currentAnalDir = new char[1024]; |
19 | sprintf( |
21 | sprintf(currentAnalDir, "%s/results", rootdir); |
20 | 22 | ||
21 | // CAMAC and Scope objects |
23 | // CAMAC and Scope objects |
22 | gDaq = new daq(); |
24 | gDaq = new daq(); |
23 | gScopeDaq = new daqscope(); |
25 | gScopeDaq = new daqscope(); |
24 | 26 | ||
Line 565... | Line 567... | ||
565 | if(zPosStep->TGLabelNEntry(fH2, 8*subgroup[0]/16, 30, "Z (step):", 0, numform, "center")) |
567 | if(zPosStep->TGLabelNEntry(fH2, 8*subgroup[0]/16, 30, "Z (step):", 0, numform, "center")) |
566 | fH2->AddFrame(zPosStep->outsidebox, f0centerX); |
568 | fH2->AddFrame(zPosStep->outsidebox, f0centerX); |
567 | fG1->AddFrame(fH2, f1expandXpad); |
569 | fG1->AddFrame(fH2, f1expandXpad); |
568 | 570 | ||
569 | // Set, get, home and reset position buttons |
571 | // Set, get, home and reset position buttons |
570 | if(DBGSIG > 1) printf("AppLayout(): Creating TSubStructure *posButtons -> |
572 | if(DBGSIG > 1) printf("AppLayout(): Creating TSubStructure *posButtons -> 5 buttons (set position, read current position, home the motor, reset all three controllers and emergency stop)\n"); |
571 | posButtons = new TSubStructure(); |
573 | posButtons = new TSubStructure(); |
572 | selnames[0] = "Set"; selnames[1] = "Get"; selnames[2] = "Home"; selnames[3] = "Reset"; |
574 | selnames[0] = "Set"; selnames[1] = "Get"; selnames[2] = "Home"; selnames[3] = "Reset"; selnames[4] = "Emergency stop"; |
573 | if(posButtons->TGMultiButton(fG1, 3*subgroup[0]/4, 30, |
575 | if(posButtons->TGMultiButton(fG1, 3*subgroup[0]/4, 30, 5, selnames, "center")) |
574 | fG1->AddFrame(posButtons->outsidebox, f1expandXpad); |
576 | fG1->AddFrame(posButtons->outsidebox, f1expandXpad); |
575 | 577 | ||
576 | // Position scan controls |
578 | // Position scan controls |
577 | if(DBGSIG > 1) printf("AppLayout(): Creating TSubStructure *xPosMin, *xPosMax, *xPosStep, *yPosMin, *yPosMax, *yPosStep -> Settings for X and Y axis scans\n"); |
579 | if(DBGSIG > 1) printf("AppLayout(): Creating TSubStructure *xPosMin, *xPosMax, *xPosStep, *yPosMin, *yPosMax, *yPosStep -> Settings for X and Y axis scans\n"); |
578 | fH2 = new TGCompositeFrame(fG1, 3*subgroup[0]/4, 30, kFixedWidth | kHorizontalFrame); |
580 | fH2 = new TGCompositeFrame(fG1, 3*subgroup[0]/4, 30, kFixedWidth | kHorizontalFrame); |
Line 625... | Line 627... | ||
625 | numform[0] = 7; numform[1] = 2; numform[3] = 2; numform[4] = -180.; numform[5] = 180.; |
627 | numform[0] = 7; numform[1] = 2; numform[3] = 2; numform[4] = -180.; numform[5] = 180.; |
626 | if(rotPos->TGLabelNEntry(fG1, 3*subgroup[0]/4, 30, "Incidence angle:", 0., numform, "center")) |
628 | if(rotPos->TGLabelNEntry(fG1, 3*subgroup[0]/4, 30, "Incidence angle:", 0., numform, "center")) |
627 | fG1->AddFrame(rotPos->outsidebox, f1expandXpad); |
629 | fG1->AddFrame(rotPos->outsidebox, f1expandXpad); |
628 | 630 | ||
629 | // Set, get, home and reset rotation buttons |
631 | // Set, get, home and reset rotation buttons |
630 | if(DBGSIG > 1) printf("AppLayout(): Creating TSubStructure *rotButtons -> |
632 | if(DBGSIG > 1) printf("AppLayout(): Creating TSubStructure *rotButtons -> 5 buttons (set rotation, read current rotation, home the motor, reset controller and emergency stop)\n"); |
631 | rotButtons = new TSubStructure(); |
633 | rotButtons = new TSubStructure(); |
632 | selnames[0] = "Set"; selnames[1] = "Get"; selnames[2] = "Home"; selnames[3] = "Reset"; |
634 | selnames[0] = "Set"; selnames[1] = "Get"; selnames[2] = "Home"; selnames[3] = "Reset"; selnames[4] = "Emergency stop"; |
633 | if(rotButtons->TGMultiButton(fG1, 3*subgroup[0]/4, 30, |
635 | if(rotButtons->TGMultiButton(fG1, 3*subgroup[0]/4, 30, 5, selnames, "center")) |
634 | fG1->AddFrame(rotButtons->outsidebox, f1expandXpad); |
636 | fG1->AddFrame(rotButtons->outsidebox, f1expandXpad); |
635 | 637 | ||
636 | // Rotation scan controls |
638 | // Rotation scan controls |
637 | if(DBGSIG > 1) printf("AppLayout(): Creating TSubStructure *rotPosMin -> Number entry for starting angle\n"); |
639 | if(DBGSIG > 1) printf("AppLayout(): Creating TSubStructure *rotPosMin -> Number entry for starting angle\n"); |
638 | rotPosMin = new TSubStructure(); |
640 | rotPosMin = new TSubStructure(); |
Line 706... | Line 708... | ||
706 | if(measProgress->TGButtonProgressTEntry(measLayout[2], 3*subgroup[0]/4, 30, "Start acquisition", "Estimated end time: ")) |
708 | if(measProgress->TGButtonProgressTEntry(measLayout[2], 3*subgroup[0]/4, 30, "Start acquisition", "Estimated end time: ")) |
707 | { |
709 | { |
708 | measProgress->widgetTE->SetState(kFALSE); |
710 | measProgress->widgetTE->SetState(kFALSE); |
709 | measLayout[2]->AddFrame(measProgress->outsidebox, f1expandXpad); |
711 | measLayout[2]->AddFrame(measProgress->outsidebox, f1expandXpad); |
710 | } |
712 | } |
- | 713 | ||
- | 714 | Pixel_t pixel_color; |
|
- | 715 | gClient->GetColorByName("white", pixel_color); |
|
- | 716 | posButtons->widgetTB[4]->SetTextColor(pixel_color); |
|
- | 717 | rotButtons->widgetTB[4]->SetTextColor(pixel_color); |
|
- | 718 | gClient->GetColorByName("red", pixel_color); |
|
- | 719 | posButtons->widgetTB[4]->SetBackgroundColor(pixel_color); |
|
- | 720 | rotButtons->widgetTB[4]->SetBackgroundColor(pixel_color); |
|
711 | 721 | ||
712 | // Actions for Main window //TODO |
722 | // Actions for Main window //TODO |
713 | vOutOpt->widgetChBox[0]->Connect("Clicked()", "TGAppMainFrame", this, "NegativePolarity()"); |
723 | vOutOpt->widgetChBox[0]->Connect("Clicked()", "TGAppMainFrame", this, "NegativePolarity()"); |
714 | vOutButtons->widgetTB[0]->Connect("Clicked()", "TGAppMainFrame", this, "VoltOut(=0)"); |
724 | vOutButtons->widgetTB[0]->Connect("Clicked()", "TGAppMainFrame", this, "VoltOut(=0)"); |
715 | vOutButtons->widgetTB[1]->Connect("Clicked()", "TGAppMainFrame", this, "VoltOut(=1)"); |
725 | vOutButtons->widgetTB[1]->Connect("Clicked()", "TGAppMainFrame", this, "VoltOut(=1)"); |
716 | vOutButtons->widgetTB[2]->Connect("Clicked()", "TGAppMainFrame", this, "VoltOut(=2)"); |
726 | vOutButtons->widgetTB[2]->Connect("Clicked()", "TGAppMainFrame", this, "VoltOut(=2)"); |
717 | posButtons->widgetTB[0]->Connect("Clicked()", "TGAppMainFrame", this, "PositionSet(=0)"); |
727 | posButtons->widgetTB[0]->Connect("Clicked()", "TGAppMainFrame", this, "PositionSet(=0)"); |
718 | posButtons->widgetTB[1]->Connect("Clicked()", "TGAppMainFrame", this, "PositionSet(=1)"); |
728 | posButtons->widgetTB[1]->Connect("Clicked()", "TGAppMainFrame", this, "PositionSet(=1)"); |
719 | posButtons->widgetTB[2]->Connect("Clicked()", "TGAppMainFrame", this, "PositionSet(=2)"); |
729 | posButtons->widgetTB[2]->Connect("Clicked()", "TGAppMainFrame", this, "PositionSet(=2)"); |
720 | posButtons->widgetTB[3]->Connect("Clicked()", "TGAppMainFrame", this, "PositionSet(=3)"); |
730 | posButtons->widgetTB[3]->Connect("Clicked()", "TGAppMainFrame", this, "PositionSet(=3)"); |
- | 731 | posButtons->widgetTB[4]->Connect("Clicked()", "TGAppMainFrame", this, "PositionSet(=4)"); |
|
721 | rotButtons->widgetTB[0]->Connect("Clicked()", "TGAppMainFrame", this, "RotationSet(=0)"); |
732 | rotButtons->widgetTB[0]->Connect("Clicked()", "TGAppMainFrame", this, "RotationSet(=0)"); |
722 | rotButtons->widgetTB[1]->Connect("Clicked()", "TGAppMainFrame", this, "RotationSet(=1)"); |
733 | rotButtons->widgetTB[1]->Connect("Clicked()", "TGAppMainFrame", this, "RotationSet(=1)"); |
723 | rotButtons->widgetTB[2]->Connect("Clicked()", "TGAppMainFrame", this, "RotationSet(=2)"); |
734 | rotButtons->widgetTB[2]->Connect("Clicked()", "TGAppMainFrame", this, "RotationSet(=2)"); |
724 | rotButtons->widgetTB[3]->Connect("Clicked()", "TGAppMainFrame", this, "RotationSet(=3)"); |
735 | rotButtons->widgetTB[3]->Connect("Clicked()", "TGAppMainFrame", this, "RotationSet(=3)"); |
- | 736 | rotButtons->widgetTB[4]->Connect("Clicked()", "TGAppMainFrame", this, "RotationSet(=4)"); |
|
725 | fileName->widgetTB[0]->Connect("Clicked()", "TGAppMainFrame", this, "SaveFile()"); |
737 | fileName->widgetTB[0]->Connect("Clicked()", "TGAppMainFrame", this, "SaveFile()"); |
726 | measProgress->widgetTB[0]->Connect("Clicked()", "TGAppMainFrame", this, "StartAcq()"); |
738 | measProgress->widgetTB[0]->Connect("Clicked()", "TGAppMainFrame", this, "StartAcq()"); |
727 | // TODO - Save file |
739 | // TODO - Save file |
728 | 740 | ||
729 | // Main window ----------------------------------------------------------------------------- |
741 | // Main window ----------------------------------------------------------------------------- |