Subversion Repositories f9daq

Compare Revisions

Ignore whitespace Rev 171 → Rev 172

/lab/sipmscan/trunk/src/sipmscan.cpp
15,8 → 15,10
char *cTemp;
 
// Prepare the default open directory (basedir)
currentOpenDir = new char[1024];
sprintf(currentOpenDir, "%s/results", rootdir);
currentMeasDir = new char[1024];
sprintf(currentMeasDir, "%s/results", rootdir);
currentAnalDir = new char[1024];
sprintf(currentAnalDir, "%s/results", rootdir);
 
// CAMAC and Scope objects
gDaq = new daq();
567,10 → 569,10
fG1->AddFrame(fH2, f1expandXpad);
// Set, get, home and reset position buttons
if(DBGSIG > 1) printf("AppLayout(): Creating TSubStructure *posButtons -> 4 buttons (set position, read current position, home the motor and reset all three controllers)\n");
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");
posButtons = new TSubStructure();
selnames[0] = "Set"; selnames[1] = "Get"; selnames[2] = "Home"; selnames[3] = "Reset";
if(posButtons->TGMultiButton(fG1, 3*subgroup[0]/4, 30, 4, selnames, "center"))
selnames[0] = "Set"; selnames[1] = "Get"; selnames[2] = "Home"; selnames[3] = "Reset"; selnames[4] = "Emergency stop";
if(posButtons->TGMultiButton(fG1, 3*subgroup[0]/4, 30, 5, selnames, "center"))
fG1->AddFrame(posButtons->outsidebox, f1expandXpad);
 
// Position scan controls
627,10 → 629,10
fG1->AddFrame(rotPos->outsidebox, f1expandXpad);
// Set, get, home and reset rotation buttons
if(DBGSIG > 1) printf("AppLayout(): Creating TSubStructure *rotButtons -> 4 buttons (set rotation, read current rotation, home the motor and reset controller)\n");
if(DBGSIG > 1) printf("AppLayout(): Creating TSubStructure *rotButtons -> 5 buttons (set rotation, read current rotation, home the motor, reset controller and emergency stop)\n");
rotButtons = new TSubStructure();
selnames[0] = "Set"; selnames[1] = "Get"; selnames[2] = "Home"; selnames[3] = "Reset";
if(rotButtons->TGMultiButton(fG1, 3*subgroup[0]/4, 30, 4, selnames, "center"))
selnames[0] = "Set"; selnames[1] = "Get"; selnames[2] = "Home"; selnames[3] = "Reset"; selnames[4] = "Emergency stop";
if(rotButtons->TGMultiButton(fG1, 3*subgroup[0]/4, 30, 5, selnames, "center"))
fG1->AddFrame(rotButtons->outsidebox, f1expandXpad);
 
// Rotation scan controls
709,6 → 711,14
measLayout[2]->AddFrame(measProgress->outsidebox, f1expandXpad);
}
 
Pixel_t pixel_color;
gClient->GetColorByName("white", pixel_color);
posButtons->widgetTB[4]->SetTextColor(pixel_color);
rotButtons->widgetTB[4]->SetTextColor(pixel_color);
gClient->GetColorByName("red", pixel_color);
posButtons->widgetTB[4]->SetBackgroundColor(pixel_color);
rotButtons->widgetTB[4]->SetBackgroundColor(pixel_color);
 
// Actions for Main window //TODO
vOutOpt->widgetChBox[0]->Connect("Clicked()", "TGAppMainFrame", this, "NegativePolarity()");
vOutButtons->widgetTB[0]->Connect("Clicked()", "TGAppMainFrame", this, "VoltOut(=0)");
718,10 → 728,12
posButtons->widgetTB[1]->Connect("Clicked()", "TGAppMainFrame", this, "PositionSet(=1)");
posButtons->widgetTB[2]->Connect("Clicked()", "TGAppMainFrame", this, "PositionSet(=2)");
posButtons->widgetTB[3]->Connect("Clicked()", "TGAppMainFrame", this, "PositionSet(=3)");
posButtons->widgetTB[4]->Connect("Clicked()", "TGAppMainFrame", this, "PositionSet(=4)");
rotButtons->widgetTB[0]->Connect("Clicked()", "TGAppMainFrame", this, "RotationSet(=0)");
rotButtons->widgetTB[1]->Connect("Clicked()", "TGAppMainFrame", this, "RotationSet(=1)");
rotButtons->widgetTB[2]->Connect("Clicked()", "TGAppMainFrame", this, "RotationSet(=2)");
rotButtons->widgetTB[3]->Connect("Clicked()", "TGAppMainFrame", this, "RotationSet(=3)");
rotButtons->widgetTB[4]->Connect("Clicked()", "TGAppMainFrame", this, "RotationSet(=4)");
fileName->widgetTB[0]->Connect("Clicked()", "TGAppMainFrame", this, "SaveFile()");
measProgress->widgetTB[0]->Connect("Clicked()", "TGAppMainFrame", this, "StartAcq()");
// TODO - Save file