Subversion Repositories f9daq

Compare Revisions

Regard whitespace Rev 166 → Rev 167

/lab/sipmscan/trunk/src/analysis.cpp
26,12 → 26,13
const char *filetypes[] = {"Histograms",histextall,0,0};
char *cTemp;
file_info.fFileTypes = filetypes;
cTemp = new char[1024];
sprintf(cTemp, "%s/results", rootdir);
file_info.fIniDir = StrDup(cTemp);
// cTemp = new char[1024];
// sprintf(cTemp, "%s/results", rootdir);
// file_info.fIniDir = StrDup(cTemp);
file_info.fIniDir = StrDup(currentOpenDir);
file_info.fMultipleSelection = kFALSE;
new TGFileDialog(gClient->GetDefaultRoot(), fMain, kFDOpen, &file_info);
delete[] cTemp;
// delete[] cTemp;
 
if(file_info.fFilename != NULL)
{
245,7 → 246,7
}
 
// X, Y and Z values from each file (table units or microns)
if(posUnits->widgetCB->GetSelected() == 0)
if(posUnitsPlot->widgetCB->GetSelected() == 0)
{
if(direction == 1)
surfxy[i] = (double)(evtheader.xpos);
253,7 → 254,7
surfxy[i] = (double)(evtheader.ypos);
surfz[i] = (double)(evtheader.zpos);
}
else if(posUnits->widgetCB->GetSelected() == 1)
else if(posUnitsPlot->widgetCB->GetSelected() == 1)
{
if(direction == 1)
surfxy[i] = (double)(evtheader.xpos*lenconversion);
417,7 → 418,7
gScan2D->GetYaxis()->SetTitleOffset(1.9);
gScan2D->GetYaxis()->CenterTitle(kTRUE);
gScan2D->GetYaxis()->SetLabelSize(0.027);
gScan2D->GetXaxis()->SetLabelOffset(0.02);
gScan2D->GetYaxis()->SetLabelOffset(0.02);
gScan2D->GetYaxis()->SetRangeUser(range[2], range[3]);
gScan2D->GetYaxis()->SetNoExponent(kTRUE);
 
428,16 → 429,16
{
if(direction == 1)
{
if(posUnits->widgetCB->GetSelected() == 0)
if(posUnitsPlot->widgetCB->GetSelected() == 0)
gScan2D->SetTitle("Laser focal point;X [table units];Z [table units]");
else if(posUnits->widgetCB->GetSelected() == 1)
else if(posUnitsPlot->widgetCB->GetSelected() == 1)
gScan2D->SetTitle("Laser focal point;X [#mum];Z [#mum]");
}
else if(direction == 2)
{
if(posUnits->widgetCB->GetSelected() == 0)
if(posUnitsPlot->widgetCB->GetSelected() == 0)
gScan2D->SetTitle("Laser focal point;Y [table units];Z [table units]");
else if(posUnits->widgetCB->GetSelected() == 1)
else if(posUnitsPlot->widgetCB->GetSelected() == 1)
gScan2D->SetTitle("Laser focal point;Y [#mum];Z [#mum]");
}
}
445,16 → 446,16
{
if(direction == 1)
{
if(posUnits->widgetCB->GetSelected() == 0)
if(posUnitsPlot->widgetCB->GetSelected() == 0)
gScan2D->SetTitle(";X [table units];Z [table units]");
else if(posUnits->widgetCB->GetSelected() == 1)
else if(posUnitsPlot->widgetCB->GetSelected() == 1)
gScan2D->SetTitle(";X [#mum];Z [#mum]");
}
else if(direction == 2)
{
if(posUnits->widgetCB->GetSelected() == 0)
if(posUnitsPlot->widgetCB->GetSelected() == 0)
gScan2D->SetTitle(";Y [table units];Z [table units]");
else if(posUnits->widgetCB->GetSelected() == 1)
else if(posUnitsPlot->widgetCB->GetSelected() == 1)
gScan2D->SetTitle(";Y [#mum];Z [#mum]");
}
}
583,16 → 584,16
{
if(axis == 1)
{
if(posUnits->widgetCB->GetSelected() == 0)
if(posUnitsPlot->widgetCB->GetSelected() == 0)
gScan[1]->SetTitle("SiPM edge detection;X [table units];Normalized ADC integral");
else if(posUnits->widgetCB->GetSelected() == 1)
else if(posUnitsPlot->widgetCB->GetSelected() == 1)
gScan[1]->SetTitle("SiPM edge detection;X [#mum];Normalized ADC integral");
}
else if(axis == 2)
{
if(posUnits->widgetCB->GetSelected() == 0)
if(posUnitsPlot->widgetCB->GetSelected() == 0)
gScan[1]->SetTitle("SiPM edge detection;Y [table units];Normalized ADC integral");
else if(posUnits->widgetCB->GetSelected() == 1)
else if(posUnitsPlot->widgetCB->GetSelected() == 1)
gScan[1]->SetTitle("SiPM edge detection;Y [#mum];Normalized ADC integral");
}
}
600,16 → 601,16
{
if(axis == 1)
{
if(posUnits->widgetCB->GetSelected() == 0)
if(posUnitsPlot->widgetCB->GetSelected() == 0)
gScan[1]->SetTitle(";X [table units];Normalized ADC integral");
else if(posUnits->widgetCB->GetSelected() == 1)
else if(posUnitsPlot->widgetCB->GetSelected() == 1)
gScan[1]->SetTitle(";X [#mum];Normalized ADC integral");
}
else if(axis == 2)
{
if(posUnits->widgetCB->GetSelected() == 0)
if(posUnitsPlot->widgetCB->GetSelected() == 0)
gScan[1]->SetTitle(";Y [table units];Normalized ADC integral");
else if(posUnits->widgetCB->GetSelected() == 1)
else if(posUnitsPlot->widgetCB->GetSelected() == 1)
gScan[1]->SetTitle(";Y [#mum];Normalized ADC integral");
}
}
693,6 → 694,91
{
for(int i = 0; i < (int)nrfiles; i++)
{
if( (nrfiles == 1) || (!multiSelect->widgetChBox[0]->IsDown()) )
{
printf("PhotonMu(): Only one file selected. Not running analysis, just showing the fit.\n");
 
// Replot the spectrum on analysisCanvas and do not close the input file
DisplayHistogram( (char*)(files->At(i)->GetTitle()), 0, 1);
analysisCanvas->GetCanvas()->Modified();
analysisCanvas->GetCanvas()->Update();
// Get the spectrum
histtemp = (TH1F*)analysisCanvas->GetCanvas()->GetPrimitive(histname);
npeaks = 15;
double par[300];
spec = new TSpectrum(npeaks);
// Find spectrum background
histback = spec->Background(histtemp, (int)fitInter->widgetNE[0]->GetNumber(), "same");
// Clone histogram and subtract background from it if we select that option
h2 = (TH1F*)histtemp->Clone("h2");
if(fitChecks->widgetChBox[0]->IsDown())
h2->Add(histback, -1);
// Search for the peaks
int found = spec->Search(h2, fitSigma->widgetNE[0]->GetNumber(), "goff", fitTresh->widgetNE[0]->GetNumber() );
printf("PhotonMu(): Found %d candidates to fit.\n",found);
npeaks = found;
// Set initial peak parameters
xpeaks = spec->GetPositionX();
for(j = 0; j < found; j++)
{
float xp = xpeaks[j];
int bin = h2->GetXaxis()->FindBin(xp);
float yp = h2->GetBinContent(bin);
par[3*j] = yp;
par[3*j+1] = xp;
par[3*j+2] = (double)fitSigma->widgetNE[0]->GetNumber();
}
// Fit the histogram
fit = new TF1("fit", FindPeaks, adcRange->widgetNE[0]->GetNumber(), adcRange->widgetNE[1]->GetNumber(), 3*npeaks);
TVirtualFitter::Fitter(histtemp, 3*npeaks);
fit->SetParameters(par);
fit->SetNpx(300);
h2->Fit("fit","Q");
// Get the fitted parameters
fittingfunc = h2->GetFunction("fit");
fparam = fittingfunc->GetParameters();
fparamerr = fittingfunc->GetParErrors();
// Gather the parameters (mean peak value for now)
int j = 1;
int nrfit = 0;
while(1)
{
if( (fparam[j] < 1.E-30) || (nrfit > 8) )
break;
else
{
// Check if pedestal is above the lower limit and sigma is smaller than the mean
if( (fparam[j] > pedesLow->widgetNE[0]->GetNumber()) && ((double)fparamerr[j]/fparam[j] < accError->widgetNE[0]->GetNumber()) )
{
// With the additional ADC offset, we can shift the mean values slightly, so they are not close to the X.5, but to the X.0 values
meansel[nrfit] = fparam[j]+(adcOffset->widgetNE[0]->GetNumber());
sigmasel[nrfit] = fparam[j+1];
nrfit++;
}
}
j+=3;
}
TMath::Sort(nrfit, meansel, sortindex, kFALSE);
 
fittingfunc->Draw("SAME");
analysisCanvas->GetCanvas()->Modified();
analysisCanvas->GetCanvas()->Update();
 
meanparam = meansel[sortindex[0]];
paramsigma = sigmasel[sortindex[0]];
 
for(j = 0; j < nrfit; j++)
printf("PhotonMu(): %d: peak mean = %lf\n", j, meansel[sortindex[j]]);
 
 
 
return;
}
if(files->At(i))
{
if(strcmp(files->At(i)->GetTitle(),darkRun->widgetTE->GetText()) == 0)
1011,6 → 1097,17
printf("PhotonMu(): %lf\t%lf\t%lf\n", angle[i], muval[i], pdeval[i]);
}
 
// Check for range of values to plot
double plotMax = 0.;
for(int i = 0; i < (int)nrfiles; i++)
{
plotMax = TMath::Max(plotMax, muval[i]);
plotMax = TMath::Max(plotMax, pdeval[i]);
}
if(plotMax <= 0.)
plotMax = 1.1;
printf("PhotonMu(): Maximum value: %lf\n", plotMax);
 
if(DBGSIG) printf("\n");
if(darkhist != -1)
printf("PhotonMu(): Number of excluded points: %d\n", (nrfiles-1-m));
1035,13 → 1132,15
pde->GetXaxis()->CenterTitle();
// pde->GetXaxis()->SetRange(angle[0],angle[nrfiles-1]);
// pde->GetXaxis()->SetRangeUser(angle[0],angle[nrfiles-1]);
pde->GetXaxis()->SetRange(-90,90);
pde->GetXaxis()->SetRangeUser(-90,90);
pde->GetXaxis()->SetLimits(-90,90);
pde->GetXaxis()->SetRange(-90.0,90.0);
pde->GetXaxis()->SetRangeUser(-90.0,90.0);
pde->GetXaxis()->SetLimits(-90.0,90.0);
pde->GetYaxis()->SetTitleOffset(1.2);
pde->GetYaxis()->SetLabelSize(0.030);
pde->GetYaxis()->CenterTitle();
pde->GetYaxis()->SetRangeUser(0., 1.2);
pde->GetYaxis()->SetRange(0., 1.1*plotMax);
pde->GetYaxis()->SetRangeUser(0., 1.1*plotMax);
pde->GetYaxis()->SetLimits(0., 1.1*plotMax);
pde->SetName("pde");
pde->Draw("ALP");
 
1139,6 → 1238,90
{
for(int i = 0; i < (int)nrfiles; i++)
{
if( (nrfiles == 1) || (!multiSelect->widgetChBox[0]->IsDown()) )
{
printf("BreakdownVolt(): Only one file selected. Not running analysis, just showing the fit.\n");
 
// Replot the spectrum on analysisCanvas and do not close the input file
DisplayHistogram( (char*)(files->At(i)->GetTitle()), 0, 1);
analysisCanvas->GetCanvas()->Modified();
analysisCanvas->GetCanvas()->Update();
// Get the spectrum
histtemp = (TH1F*)analysisCanvas->GetCanvas()->GetPrimitive(histname);
npeaks = 15;
double par[300];
spec = new TSpectrum(npeaks);
// Find spectrum background
histback = spec->Background(histtemp, (int)fitInter->widgetNE[0]->GetNumber(), "same");
// Clone histogram and subtract background from it if we select that option
h2 = (TH1F*)histtemp->Clone("h2");
if(fitChecks->widgetChBox[0]->IsDown())
h2->Add(histback, -1);
// Search for the peaks
int found = spec->Search(h2, fitSigma->widgetNE[0]->GetNumber(), "goff", fitTresh->widgetNE[0]->GetNumber() );
printf("PhotonMu(): Found %d candidates to fit.\n",found);
npeaks = found;
// Set initial peak parameters
xpeaks = spec->GetPositionX();
for(j = 0; j < found; j++)
{
float xp = xpeaks[j];
int bin = h2->GetXaxis()->FindBin(xp);
float yp = h2->GetBinContent(bin);
par[3*j] = yp;
par[3*j+1] = xp;
par[3*j+2] = (double)fitSigma->widgetNE[0]->GetNumber();
}
// Fit the histogram
fit = new TF1("fit", FindPeaks, adcRange->widgetNE[0]->GetNumber(), adcRange->widgetNE[1]->GetNumber(), 3*npeaks);
TVirtualFitter::Fitter(histtemp, 3*npeaks);
fit->SetParameters(par);
fit->SetNpx(300);
h2->Fit("fit","Q");
// Get the fitted parameters
fittingfunc = h2->GetFunction("fit");
fparam = fittingfunc->GetParameters();
fparamerr = fittingfunc->GetParErrors();
// Gather the parameters (mean peak value for now)
int j = 1;
int nrfit = 0;
while(1)
{
if( (fparam[j] < 1.E-30) || (nrfit > 8) )
break;
else
{
// Check if pedestal is above the lower limit and sigma is smaller than the mean
if( (fparam[j] > pedesLow->widgetNE[0]->GetNumber()) && ((double)fparamerr[j]/fparam[j] < accError->widgetNE[0]->GetNumber()) )
{
// With the additional ADC offset, we can shift the mean values slightly, so they are not close to the X.5, but to the X.0 values
meansel[nrfit] = fparam[j]+(adcOffset->widgetNE[0]->GetNumber());
sigmasel[nrfit] = fparam[j+1];
nrfit++;
}
}
j+=3;
}
TMath::Sort(nrfit, meansel, sortindex, kFALSE);
 
fittingfunc->Draw("SAME");
analysisCanvas->GetCanvas()->Modified();
analysisCanvas->GetCanvas()->Update();
 
meanparam = meansel[sortindex[0]];
meanparamerr = meanselerr[sortindex[0]];
paramsigma = sigmasel[sortindex[0]];
 
for(j = 0; j < nrfit; j++)
printf("BreakdownVolt(): %d: peak mean = %lf, peak err = %lf\n", j, meansel[sortindex[j]], meanselerr[sortindex[j]]);
 
return;
}
if(files->At(i))
{
// Replot the spectrum on analysisCanvas and do not close the input file
1383,9 → 1566,10
latex = new TLatex();
latex->SetTextSize(0.039);
latex->DrawLatex(volt[0], 0.97*sep[0][sortindex[p-1]], ctemp);
printf("#Delta_{p}(U) = (%.6lf #pm %.8lf)#timesU + (%.6lf #pm %.8lf)}{U_{0} = %.6lf #pm %.8lf\n", meansel[0], meanselerr[0], meansel[1], meanselerr[1], meansel[2], meansel[2]*(TMath::Abs(meanselerr[0]/meansel[0]) + TMath::Abs(meanselerr[1]/meansel[1])) );
}
else
printf("#Delta_{p}(U) = (%.2lf #pm %.2lf)#timesU + (%.2lf #pm %.3lf)}{U_{0} = %.2lf #pm %.3lf", meansel[0], meanselerr[0], meansel[1], meanselerr[1], meansel[2], meansel[2]*(TMath::Abs(meanselerr[0]/meansel[0]) + TMath::Abs(meanselerr[1]/meansel[1])) );
printf("#Delta_{p}(U) = (%.2lf #pm %.2lf)#timesU + (%.2lf #pm %.3lf)}{U_{0} = %.2lf #pm %.3lf\n", meansel[0], meanselerr[0], meansel[1], meanselerr[1], meansel[2], meansel[2]*(TMath::Abs(meanselerr[0]/meansel[0]) + TMath::Abs(meanselerr[1]/meansel[1])) );
 
if(edit == 0)
{
1423,9 → 1607,9
surfy = new double[nrfiles];
double xsurfmin = 0, ysurfmin = 0;
int nrentries;
// double minInteg, maxInteg;
double minInteg, maxInteg;
bool norm = surfScanOpt->widgetChBox[0]->IsDown();
// double curzval;
double curyval;
// bool edge2d = false;
TCanvas *gCanvas;
1487,7 → 1671,7
}
 
// X, Y and Z values from each file (table units or microns)
if(posUnits->widgetCB->GetSelected() == 0)
if(posUnitsPlot->widgetCB->GetSelected() == 0)
{
if(n == 1)
{
1498,7 → 1682,7
surfx[i] = (double)(evtheader.xpos);
surfy[i] = (double)(evtheader.ypos);
}
else if(posUnits->widgetCB->GetSelected() == 1)
else if(posUnitsPlot->widgetCB->GetSelected() == 1)
{
if(n == 1)
{
1529,60 → 1713,24
nrentries = n;
printf("SurfaceScan(): %d files were selected.\n", nrfiles);
 
// // If only an integral is needed, do not plot and exit here
// if( direction == 0 )
// {
// delete[] integralCount;
// delete[] surfxy;
// delete[] surfz;
// return;
// }
//
// // Current z value and the accumulated counter
// curzval = surfz[0];
// j = 0;
// int acc = 0;
// int zb;
// for(int i = 0; i <= (int)nrfiles; i++)
// {
// // Collect the accumulated integral in order to produce a PDF from a CDF
// // While we are at the same Z value, save under one set
// if( (surfz[i] == curzval) && (acc != nrfiles) )
// {
// integralAcc[j] = integralCount[i];
// if(DBGSIG) printf("IntegSpectrum(): Integral check 1 (i=%d,j=%d,z=%.2lf): %lf\t%lf\n", i, j, surfz[i], integralCount[i], integralAcc[j]);
// j++;
// acc++;
// }
// // When we switch to a new set of Z values and at the end, we must save the previous ones to make 1D edge plots
// else
// {
// // Find minimal and maximal integral values to subtract the offset and normate PDF to 1
// NormateSet(i, j, &minInteg, &maxInteg, integralCount, integralAcc);
//
// if(acc != nrfiles)
// {
// curzval = surfz[i];
// // PDF and CDF plot
// PlotEdgeDistribution(files, i, j, &minInteg, &maxInteg, surfxy, integralAcc, direction, edge2d, edit);
// i--;
// j = 0;
// }
// else
// {
// // PDF and CDF plot
// PlotEdgeDistribution(files, i, j, &minInteg, &maxInteg, surfxy, integralAcc, direction, edge2d, edit);
// i--;
// break;
// }
// }
//
// // Update the progress bar
// progVal = (float)(15.00/nrfiles)*i+75.00;
// analysisProgress->widgetPB->SetPosition(progVal);
// gVirtualX->Update(1);
// }
// Check for Minimum and Maximum values and normalize to 1, if normalization is selected
if(norm)
{
minInteg = TMath::MinElement(nrfiles, integralCount);
for(int i = 0; i < nrfiles; i++)
{
integralCount[i] -= minInteg;
if(DBGSIG) printf("Subtraction: %lf\n", integralCount[i]);
}
 
maxInteg = TMath::MaxElement(nrfiles, integralCount);
for(int i = 0; i < nrfiles; i++)
{
integralCount[i] = integralCount[i]/maxInteg;
if(DBGSIG) printf("Normalization: %lf\n", integralCount[i]);
}
}
 
// Make the 2D surface plot
if(edit == 0)
gCanvas = new TCanvas("canv","canv",1100,900);
1638,16 → 1786,16
if(!cleanPlots)
{
if(posUnits->widgetCB->GetSelected() == 0)
if(posUnitsPlot->widgetCB->GetSelected() == 0)
gScan2D->SetTitle("Surface scan;X [table units];Y [table units]");
else if(posUnits->widgetCB->GetSelected() == 1)
else if(posUnitsPlot->widgetCB->GetSelected() == 1)
gScan2D->SetTitle("Surface scan;X [#mum];Y [#mum]");
}
else
{
if(posUnits->widgetCB->GetSelected() == 0)
if(posUnitsPlot->widgetCB->GetSelected() == 0)
gScan2D->SetTitle(";X [table units];Y [table units]");
else if(posUnits->widgetCB->GetSelected() == 1)
else if(posUnitsPlot->widgetCB->GetSelected() == 1)
gScan2D->SetTitle(";X [#mum];Y [#mum]");
}
/* TGaxis *xax = (TGaxis*)gScan2D->GetXaxis();
1670,7 → 1818,7
gScan2D->GetYaxis()->SetTitleOffset(1.9);
gScan2D->GetYaxis()->CenterTitle(kTRUE);
gScan2D->GetYaxis()->SetLabelSize(0.027);
gScan2D->GetXaxis()->SetLabelOffset(0.02);
gScan2D->GetYaxis()->SetLabelOffset(0.02);
gScan2D->GetYaxis()->SetRangeUser(range[2], range[3]);
gScan2D->GetYaxis()->SetNoExponent(kTRUE);
/lab/sipmscan/trunk/src/connections.cpp
1961,17 → 1961,18
void TGAppMainFrame::SelectDirectory()
{
int i = fileList->GetNumberOfEntries();
char *cTemp;
// char *cTemp;
 
TGFileInfo file_info;
const char *filetypes[] = {"Histograms",histextall,0,0};
file_info.fFileTypes = filetypes;
cTemp = new char[1024];
sprintf(cTemp, "%s/results", rootdir);
file_info.fIniDir = StrDup(cTemp);
// cTemp = new char[1024];
// sprintf(cTemp, "%s/results", rootdir);
// file_info.fIniDir = StrDup(cTemp);
file_info.fIniDir = StrDup(currentOpenDir);
file_info.fMultipleSelection = kTRUE;
new TGFileDialog(gClient->GetDefaultRoot(), fMain, kFDOpen, &file_info);
delete[] cTemp;
// delete[] cTemp;
 
TList *files = file_info.fFileNamesList;
if(files)
1982,6 → 1983,7
while(file=(TSystemFile*)next())
{
fname = file->GetName();
remove_from_last((char*)fname.Data(), '/', currentOpenDir);
fileList->AddEntry(fname.Data(), i);
i++;
}
/lab/sipmscan/trunk/src/new_tabs.cpp
464,7 → 464,7
delete scope_data;
delete inroot;
printf("HeaderChange(): 6\n");
//printf("HeaderChange(): 6\n");
// Prepare branches for the new header
TTree *new_header_data = new TTree("header_data", "Header information for the measurement.");
new_header_data->Branch("nrch", &evtheader.nrch, "nrch/I");
477,7 → 477,7
new_header_data->Branch("angle", &evtheader.angle, "temperature/D");
new_header_data->Branch("laserinfo", &evtheader.laserinfo, "laserinfo/C");
 
printf("HeaderChange(): 7\n");
//printf("HeaderChange(): 7\n");
// Save new values (and old ones where we don't want to edit anything)
evtheader.nrch = itemp[0];
evtheader.timestamp = itemp[1];
517,7 → 517,7
else
sprintf(evtheader.laserinfo, "%s", ctemp);
 
printf("HeaderChange(): 8\n");
//printf("HeaderChange(): 8\n");
new_header_data->Fill();
 
// Write down the temporary output file
526,7 → 526,7
if(scopeTemp)
new_scope_data->Write();
 
printf("HeaderChange(): 9\n");
//printf("HeaderChange(): 9\n");
delete new_header_data;
delete new_meas_data;
if(scopeTemp)
664,6 → 664,7
 
// Actions for header editor
char cTemp[512];
exportExitAnalysis->widgetTB[0]->Connect("Clicked()", "TGAppMainFrame", this, "ExportTempAnalysisPlot()");
sprintf(cTemp, "CloseTempAnalysisTab(=%d)", newTab*100+startTab);
exportExitAnalysis->widgetTB[1]->Connect("Clicked()", "TGAppMainFrame", this, cTemp);
 
774,4 → 775,23
}
}
 
void TGAppMainFrame::ExportTempAnalysisPlot()
{
TCanvas *gCanvas = tempAnalysisCanvas->GetCanvas();
 
TGFileInfo file_info;
const char *filetypes[] = {"PDF","*.pdf","Encapsulated PostScript (.eps)","*.eps", "JPG/JPEG", "*.jpg", "PNG", "*.png",0,0};
char *cTemp;
file_info.fFileTypes = filetypes;
cTemp = new char[1024];
// sprintf(cTemp, "%s/results", rootdir);
// file_info.fIniDir = StrDup(cTemp);
file_info.fIniDir = StrDup(currentOpenDir);
new TGFileDialog(gClient->GetDefaultRoot(), fMain, kFDSave, &file_info);
delete[] cTemp;
 
if(file_info.fFilename != NULL)
gCanvas->SaveAs(file_info.fFilename);
}
 
// Temporary analysis window ------------------------------------------
/lab/sipmscan/trunk/src/sipmscan.cpp
14,6 → 14,10
 
char *cTemp;
 
// Prepare the default open directory (basedir)
currentOpenDir = new char[1024];
sprintf(currentOpenDir, "%s/results", rootdir);
 
// CAMAC and Scope objects
gDaq = new daq();
gScopeDaq = new daqscope();
1155,6 → 1159,14
if(editSelHist->TGLabelButton(analysisLayout[3], subgroup[0], 30, "Edit selected histograms:", "Edit", "center"))
analysisLayout[3]->AddFrame(editSelHist->outsidebox, f1expandXpad);
 
// Select position units to use for ploting (micrometer, table position units)
if(DBGSIG > 1) printf("AppLayout(): Creating TSubStructure *posUnitsPlot -> Dropdown menu for selecting the position units for ploting\n");
posUnitsPlot = new TSubStructure();
selnames[0] = "table units"; selnames[1] = "micrometers";
sprintf(selected, "table units");
if(posUnitsPlot->TGLabelDrop(analysisLayout[3], 2.*subgroup[0]/3., 30, "Position units for plots:", 2, selnames, selected))
analysisLayout[3]->AddFrame(posUnitsPlot->outsidebox, f0centerX);
 
// Actions for histogram controls pane //TODO
for(int i = 0; i < 2; i++)
{
/lab/sipmscan/trunk/src/tooltips.cpp
162,7 → 162,7
SetToolTipText("Replace the current \"Integrate spectrum\" settings with default settings.");
 
relPde->widgetChBox[0]->
SetToolTipText("Normalize the ADC integral to the number of events ([ADC integral]/[Nr. of events]).");
SetToolTipText("Normalize the ADC integral so that it is in a range between 0 and 1.");
midPeak->widgetChBox[0]->
SetToolTipText("Instead of taking the complete pedestal peak as noise, take only half of the peak.");
darkRun->widgetTE->
190,7 → 190,7
SetToolTipText("Replace the current \"Breakdown voltage\" settings with default settings.");
 
surfScanOpt->widgetChBox[0]->
SetToolTipText("Normalize the ADC integral to the number of events ([ADC integral]/[Nr. of events]).");
SetToolTipText("Normalize the ADC integral so that it is in a range between 0 and 1.");
surfScanOpt->widgetChBox[1]->
SetToolTipText("Start the X and Y axis values from zero in the bottom left corner of the 2D plot,\ninstead of taking the actual position of the table.");
resolSurf->widgetNE[0]->GetNumberEntry()->
250,4 → 250,5
SetToolTipText("Export the currently selected histogram (ADC, TDC or\nADC/TDC from selected files) into the .pdf format.");
editSelHist->widgetTB[0]->
SetToolTipText("Open the currently visible plot in the \"Histogram\"\nwindow in a new tab to enable further editing.");
// posUnitsPlot->widgetTB[0]->SetToolTipText("Open the currently visible plot in the \"Histogram\"\nwindow in a new tab to enable further editing.");
}