38 #include <TGFileDialog.h> 45 static const Char_t *
gFiletypes[] = {
"Data files",
"*.dat",
94 const Bool_t showAverage,
const Bool_t showAveragePerDataSet,
95 const Int_t fourierPlotOpt, Double_t fourierXrange[], Double_t phase,
96 Int_t wtopx, Int_t wtopy, Int_t ww, Int_t wh,
98 fBatchMode(batch), fAveragedView(showAverage), fAveragedViewPerDataSet(showAveragePerDataSet),
99 fDataSetTag(dataSetTag), fCurrentPlotView(fourierPlotOpt), fTitle(title), fFourier(fourier),
100 fCurrentFourierPhase(phase)
102 fInitialXRange[0] = fourierXrange[0];
103 fInitialXRange[1] = fourierXrange[1];
112 for (UInt_t i=0; i<fourier.size(); i++) {
114 style = 20+
static_cast<Int_t
>(rand.Integer(10));
115 fMarkerList.push_back(style);
116 color = TColor::GetColor(static_cast<Int_t>(rand.Integer(255)), static_cast<Int_t>(rand.Integer(255)), static_cast<Int_t>(rand.Integer(255)));
117 fColorList.push_back(color);
122 InitFourierDataSets();
123 InitFourierCanvas(fTitle, wtopx, wtopy, ww, wh);
125 gStyle->SetHistMinimumZero(kTRUE);
147 const Bool_t showAverage,
const Bool_t showAveragePerDataSet,
148 const Int_t fourierPlotOpt, Double_t fourierXrange[], Double_t phase,
149 Int_t wtopx, Int_t wtopy, Int_t ww, Int_t wh,
151 fBatchMode(batch), fAveragedView(showAverage), fAveragedViewPerDataSet(showAveragePerDataSet),
152 fDataSetTag(dataSetTag), fCurrentPlotView(fourierPlotOpt), fTitle(title), fFourier(fourier),
153 fCurrentFourierPhase(phase), fMarkerList(markerList), fColorList(colorList)
155 fInitialXRange[0] = fourierXrange[0];
156 fInitialXRange[1] = fourierXrange[1];
165 for (UInt_t i=static_cast<UInt_t>(fMarkerList.size()); i<fourier.size(); i++) {
167 style = 20+
static_cast<Int_t
>(rand.Integer(10));
168 fMarkerList.push_back(style);
170 for (UInt_t i=static_cast<UInt_t>(fColorList.size()); i<fourier.size(); i++) {
172 color = TColor::GetColor(static_cast<Int_t>(rand.Integer(255)), static_cast<Int_t>(rand.Integer(255)), static_cast<Int_t>(rand.Integer(255)));
173 fColorList.push_back(color);
178 InitFourierDataSets();
179 InitFourierCanvas(fTitle, wtopx, wtopy, ww, wh);
181 gStyle->SetHistMinimumZero(kTRUE);
194 Emit(
"Done(Int_t)",
status);
217 if (event != kKeyPress)
225 }
else if (x ==
'u') {
230 }
else if (x ==
'a') {
247 }
else if (x ==
'd') {
264 }
else if (x ==
'c') {
274 }
else if (x ==
'+') {
276 }
else if (x ==
'-') {
394 static TString dir(
".");
397 fi.fIniDir = StrDup(dir);
398 fi.fOverwrite =
true;
399 new TGFileDialog(
nullptr,
fImp, kFDSave, &fi);
400 if (fi.fFilename && strlen(fi.fFilename)) {
415 if (gROOT->GetListOfCanvases()->IsEmpty()) {
455 strncpy(dtStr, dt.AsSQLString(),
sizeof(dtStr));
456 TString str(
"musrFT: ");
461 for (UInt_t i=0; i<
fFourier.size(); i++) {
462 strncpy(title,
fFourier[i]->GetDataTitle(),
sizeof(title));
489 fTimeoutTimer->Connect(
"Timeout()",
"PFourierCanvas",
this,
"Done()");
504 std::cout << std::endl <<
">> SaveGraphicsAndQuit: will dump the canvas into a graphics output file: " << fileName <<
" ..." << std::endl;
522 pfn = TString(pathFileName);
524 std::cerr << std::endl <<
">> PFourierCanvas::ExportData **ERROR** NO path file name provided. Will do nothing." << std::endl;
528 TString xAxis(
""), yAxis(
"");
529 Int_t xMinBin, xMaxBin;
534 yAxis = TString(
"<Real>");
535 xMinBin =
fFourierHistos[0].dataFourierRe->GetXaxis()->GetFirst();
540 yAxis = TString(
"<Imag>");
541 xMinBin =
fFourierHistos[0].dataFourierIm->GetXaxis()->GetFirst();
546 yAxis = TString(
"<Power>");
547 xMinBin =
fFourierHistos[0].dataFourierPwr->GetXaxis()->GetFirst();
548 xMaxBin =
fFourierHistos[0].dataFourierPwr->GetXaxis()->GetLast();
551 xAxis =
fFourierHistos[0].dataFourierPhase->GetXaxis()->GetTitle();
552 yAxis = TString(
"<Phase>");
553 xMinBin =
fFourierHistos[0].dataFourierPhase->GetXaxis()->GetFirst();
554 xMaxBin =
fFourierHistos[0].dataFourierPhase->GetXaxis()->GetLast();
557 xAxis =
fFourierHistos[0].dataFourierPhaseOptReal->GetXaxis()->GetTitle();
558 yAxis = TString(
"<Phase>");
559 xMinBin =
fFourierHistos[0].dataFourierPhaseOptReal->GetXaxis()->GetFirst();
560 xMaxBin =
fFourierHistos[0].dataFourierPhaseOptReal->GetXaxis()->GetLast();
563 xAxis = TString(
"??");
564 yAxis = TString(
"??");
573 yAxis = TString(
"Real");
574 xMinBin =
fFourierHistos[0].dataFourierRe->GetXaxis()->GetFirst();
579 yAxis = TString(
"Imag");
580 xMinBin =
fFourierHistos[0].dataFourierIm->GetXaxis()->GetFirst();
585 yAxis = TString(
"Real+Imag");
586 xMinBin =
fFourierHistos[0].dataFourierRe->GetXaxis()->GetFirst();
591 yAxis = TString(
"Power");
592 xMinBin =
fFourierHistos[0].dataFourierPwr->GetXaxis()->GetFirst();
593 xMaxBin =
fFourierHistos[0].dataFourierPwr->GetXaxis()->GetLast();
596 xAxis =
fFourierHistos[0].dataFourierPhase->GetXaxis()->GetTitle();
597 yAxis = TString(
"Phase");
598 xMinBin =
fFourierHistos[0].dataFourierPhase->GetXaxis()->GetFirst();
599 xMaxBin =
fFourierHistos[0].dataFourierPhase->GetXaxis()->GetLast();
602 xAxis =
fFourierHistos[0].dataFourierPhaseOptReal->GetXaxis()->GetTitle();
603 yAxis = TString(
"Phase");
604 xMinBin =
fFourierHistos[0].dataFourierPhaseOptReal->GetXaxis()->GetFirst();
605 xMaxBin =
fFourierHistos[0].dataFourierPhaseOptReal->GetXaxis()->GetLast();
608 xAxis = TString(
"??");
609 yAxis = TString(
"??");
617 std::ofstream fout(pfn.Data(), std::ofstream::out);
621 fout <<
"% " << pfn << std::endl;
622 fout <<
"% averaged data of:" << std::endl;
624 fout <<
"% " <<
fFourierHistos[i].dataFourierRe->GetTitle() << std::endl;
626 fout <<
"%------------" << std::endl;
627 fout <<
"% " << xAxis <<
", " << yAxis << std::endl;
628 for (Int_t i=xMinBin; i<xMaxBin; i++) {
643 fout <<
fFourierAverage[0].dataFourierPhaseOptReal->GetBinCenter(i) <<
", " <<
fFourierAverage[0].dataFourierPhaseOptReal->GetBinContent(i) << std::endl;
651 fout <<
"% " << pfn << std::endl;
652 fout <<
"% data of:" << std::endl;
654 fout <<
"% " <<
fFourierHistos[i].dataFourierRe->GetTitle() << std::endl;
656 fout <<
"%------------" << std::endl;
659 fout << xAxis << i <<
", " << yAxis << i <<
", ";
664 for (Int_t i=xMinBin; i<xMaxBin; i++) {
682 fout <<
fFourierHistos[j].dataFourierPhaseOptReal->GetBinCenter(i) <<
", " <<
fFourierHistos[j].dataFourierPhaseOptReal->GetBinContent(i) <<
", ";
723 switch (
fFourier[0]->GetUnitTag()) {
750 TString musrFTStyle(
"musrFTStyle");
751 fStyle = std::make_unique<TStyle>(musrFTStyle, musrFTStyle);
780 Double_t max = 0.0, dval = 0.0;
785 for (Int_t j=start; j<=end; j++) {
787 if (fabs(dval) > max)
792 for (Int_t j=1; j<
fFourierHistos[i].dataFourierRe->GetNbinsX(); j++) {
799 for (Int_t j=start; j<=end; j++) {
801 if (fabs(dval) > max)
806 for (Int_t j=1; j<
fFourierHistos[i].dataFourierIm->GetNbinsX(); j++) {
814 for (Int_t j=start; j<=end; j++) {
816 if (fabs(dval) > max)
821 for (Int_t j=1; j<
fFourierHistos[i].dataFourierPwr->GetNbinsX(); j++) {
829 for (Int_t j=start; j<=end; j++) {
831 if (fabs(dval) > max)
836 for (Int_t j=1; j<
fFourierHistos[i].dataFourierPhase->GetNbinsX(); j++) {
844 for (Int_t j=start; j<=end; j++) {
845 dval =
fFourierHistos[i].dataFourierPhaseOptReal->GetBinContent(j);
846 if (fabs(dval) > max)
851 for (Int_t j=1; j<
fFourierHistos[i].dataFourierPhaseOptReal->GetNbinsX(); j++) {
912 TString canvasName = TString(
"fMainCanvas");
913 fMainCanvas = std::make_unique<TCanvas>(canvasName.Data(), title, wtopx, wtopy, ww, wh);
968 fBar->MapSubwindows();
971 fPopupMain->Connect(
"TGPopupMenu",
"Activated(Int_t)",
"PFourierCanvas",
this,
"HandleMenuPopup(Int_t)");
978 fTitlePad->SetFillColor(TColor::GetColor(255,255,255));
986 fFourierPad->SetFillColor(TColor::GetColor(255,255,255));
990 fInfoPad = std::make_unique<TLegend>(0.0, 0.0, 1.0,
YINFO,
"NDC");
992 fInfoPad->SetFillColor(TColor::GetColor(255,255,255));
999 std::cerr << std::endl <<
"PFourierCanvas::PFourierCanvas: **PANIC ERROR**: # Fourier != # Data Set Tags." << std::endl;
1006 fMainCanvas->Connect(
"ProcessedEvent(Int_t,Int_t,Int_t,TObject*)",
"PFourierCanvas",
1007 this,
"HandleCmdKey(Int_t,Int_t,Int_t,TObject*)");
1059 Bool_t phaseOptRealPresent =
false;
1061 phaseOptRealPresent =
true;
1068 name = TString(
fFourierHistos[0].dataFourierRe->GetTitle()) +
"_avg";
1073 name = TString(
fFourierHistos[0].dataFourierIm->GetTitle()) +
"_avg";
1078 name = TString(
fFourierHistos[0].dataFourierPwr->GetTitle()) +
"_avg";
1083 name = TString(
fFourierHistos[0].dataFourierPhase->GetTitle()) +
"_avg";
1088 if (phaseOptRealPresent) {
1089 name = TString(
fFourierHistos[0].dataFourierPhaseOptReal->GetTitle()) +
"_avg";
1091 fFourierHistos[0].dataFourierPhaseOptReal->GetXaxis()->GetXmin(),
1092 fFourierHistos[0].dataFourierPhaseOptReal->GetXaxis()->GetXmax());
1096 for (Int_t j=0; j<
fFourierHistos[0].dataFourierRe->GetNbinsX(); j++) {
1111 for (Int_t j=0; j<
fFourierHistos[0].dataFourierIm->GetNbinsX(); j++) {
1126 for (Int_t j=0; j<
fFourierHistos[0].dataFourierPwr->GetNbinsX(); j++) {
1141 for (Int_t j=0; j<
fFourierHistos[0].dataFourierPhase->GetNbinsX(); j++) {
1155 if (phaseOptRealPresent) {
1157 for (Int_t j=0; j<
fFourierHistos[0].dataFourierPhaseOptReal->GetNbinsX(); j++) {
1186 Int_t start=0, end=0;
1191 start = -1, end = -1;
1193 if ((count == i) && (start == -1)) {
1214 name = TString(
fFourierHistos[start].dataFourierRe->GetTitle()) +
"_avg";
1219 name = TString(
fFourierHistos[start].dataFourierIm->GetTitle()) +
"_avg";
1224 name = TString(
fFourierHistos[start].dataFourierPwr->GetTitle()) +
"_avg";
1229 name = TString(
fFourierHistos[start].dataFourierPhase->GetTitle()) +
"_avg";
1234 if (phaseOptRealPresent) {
1235 name = TString(
fFourierHistos[start].dataFourierPhaseOptReal->GetTitle()) +
"_avg";
1237 fFourierHistos[0].dataFourierPhaseOptReal->GetXaxis()->GetXmin(),
1238 fFourierHistos[0].dataFourierPhaseOptReal->GetXaxis()->GetXmax());
1242 for (Int_t j=0; j<
fFourierHistos[0].dataFourierRe->GetNbinsX(); j++) {
1244 for (Int_t k=start; k<=end; k++) {
1248 fFourierAverage[i].dataFourierRe->SetBinContent(j, dval/(end-start+1));
1257 for (Int_t j=0; j<
fFourierHistos[0].dataFourierIm->GetNbinsX(); j++) {
1259 for (Int_t k=start; k<=end; k++) {
1263 fFourierAverage[i].dataFourierIm->SetBinContent(j, dval/(end-start+1));
1272 for (Int_t j=0; j<
fFourierHistos[0].dataFourierPwr->GetNbinsX(); j++) {
1274 for (Int_t k=start; k<=end; k++) {
1278 fFourierAverage[i].dataFourierPwr->SetBinContent(j, dval/(end-start+1));
1287 for (Int_t j=0; j<
fFourierHistos[0].dataFourierPhase->GetNbinsX(); j++) {
1289 for (Int_t k=start; k<=end; k++) {
1293 fFourierAverage[i].dataFourierPhase->SetBinContent(j, dval/(end-start+1));
1301 if (phaseOptRealPresent) {
1303 for (Int_t j=0; j<
fFourierHistos[0].dataFourierPhaseOptReal->GetNbinsX(); j++) {
1305 for (Int_t k=start; k<=end; k++) {
1309 fFourierAverage[i].dataFourierPhaseOptReal->SetBinContent(j, dval/(end-start+1));
1332 Double_t dval=0.0, max=0.0;
1338 for (Int_t j=start; j<=end; j++) {
1339 dval =
fFourierHistos[i].dataFourierPhaseOptReal->GetBinContent(j);
1340 if (fabs(dval) > max)
1343 for (Int_t j=1; j<
fFourierHistos[i].dataFourierPhaseOptReal->GetNbinsX(); j++) {
1374 Double_t xmin=0, xmax=0;
1378 Double_t ymin=0, ymax=0;
1381 fFourierHistos[0].dataFourierRe->GetXaxis()->SetRangeUser(xmin, xmax);
1390 fFourierHistos[0].dataFourierRe->GetYaxis()->SetRangeUser(1.05*ymin, 1.05*ymax);
1392 fFourierHistos[0].dataFourierRe->GetYaxis()->SetTitleOffset(1.3);
1401 fFourierHistos[0].dataFourierIm->GetXaxis()->SetRangeUser(xmin, xmax);
1410 fFourierHistos[0].dataFourierIm->GetYaxis()->SetRangeUser(1.05*ymin, 1.05*ymax);
1411 fFourierHistos[0].dataFourierIm->GetYaxis()->SetTitleOffset(1.3);
1421 fFourierHistos[0].dataFourierRe->GetXaxis()->SetRangeUser(xmin, xmax);
1434 fFourierHistos[0].dataFourierRe->GetYaxis()->SetRangeUser(1.05*ymin, 1.05*ymax);
1435 fFourierHistos[0].dataFourierRe->GetYaxis()->SetTitleOffset(1.3);
1449 fFourierHistos[0].dataFourierPwr->GetXaxis()->SetRangeUser(xmin, xmax);
1456 fFourierHistos[0].dataFourierPwr->GetYaxis()->SetRangeUser(ymin, 1.03*ymax);
1458 fFourierHistos[0].dataFourierPwr->GetYaxis()->SetTitleOffset(1.3);
1459 fFourierHistos[0].dataFourierPwr->GetYaxis()->SetDecimals(kTRUE);
1467 fFourierHistos[0].dataFourierPhase->GetXaxis()->SetRangeUser(xmin, xmax);
1476 fFourierHistos[0].dataFourierPhase->GetYaxis()->SetRangeUser(1.05*ymin, 1.05*ymax);
1477 fFourierHistos[0].dataFourierPhase->GetYaxis()->SetTitleOffset(1.3);
1478 fFourierHistos[0].dataFourierPhase->GetYaxis()->SetDecimals(kTRUE);
1479 fFourierHistos[0].dataFourierPhase->GetYaxis()->SetTitle(
"Phase");
1487 fFourierHistos[0].dataFourierPhaseOptReal->GetXaxis()->SetRangeUser(xmin, xmax);
1496 fFourierHistos[0].dataFourierPhaseOptReal->GetYaxis()->SetRangeUser(ymin, 1.05*ymax);
1497 fFourierHistos[0].dataFourierPhaseOptReal->GetYaxis()->SetTitleOffset(1.3);
1498 fFourierHistos[0].dataFourierPhaseOptReal->GetYaxis()->SetDecimals(kTRUE);
1499 fFourierHistos[0].dataFourierPhaseOptReal->GetYaxis()->SetTitle(
"Phase Opt. Real");
1528 str = TString(
"phase = ");
1559 Double_t xmin=0.0, xmax=0.0;
1562 Double_t ymin=0.0, ymax=0.0;
1570 fFourierAverage[0].dataFourierRe->GetXaxis()->SetRangeUser(xmin, xmax);
1579 fFourierAverage[0].dataFourierRe->GetYaxis()->SetRangeUser(1.03*ymin, 1.03*ymax);
1584 fFourierAverage[0].dataFourierRe->GetXaxis()->SetRangeUser(xmin, xmax);
1588 fFourierAverage[0].dataFourierIm->GetXaxis()->SetRangeUser(xmin, xmax);
1597 fFourierAverage[0].dataFourierIm->GetYaxis()->SetRangeUser(1.03*ymin, 1.03*ymax);
1602 fFourierAverage[0].dataFourierIm->GetXaxis()->SetRangeUser(xmin, xmax);
1606 fFourierAverage[0].dataFourierRe->GetXaxis()->SetRangeUser(xmin, xmax);
1615 fFourierAverage[0].dataFourierRe->GetYaxis()->SetRangeUser(1.03*ymin, 1.03*ymax);
1618 fFourierAverage[0].dataFourierRe->GetYaxis()->SetTitle(
"<Real+Imag>");
1620 fFourierAverage[0].dataFourierRe->GetXaxis()->SetRangeUser(xmin, xmax);
1626 fFourierAverage[0].dataFourierPwr->GetXaxis()->SetRangeUser(xmin, xmax);
1633 fFourierAverage[0].dataFourierPwr->GetYaxis()->SetRangeUser(ymin, 1.03*ymax);
1641 fFourierAverage[0].dataFourierPhase->GetXaxis()->SetRangeUser(xmin, xmax);
1650 fFourierAverage[0].dataFourierPhase->GetYaxis()->SetRangeUser(1.03*ymin, 1.03*ymax);
1655 fFourierAverage[0].dataFourierPhase->GetXaxis()->SetRangeUser(xmin, xmax);
1660 std::cout <<
"debug> need to calculate phase opt. average first ..." << std::endl;
1664 fFourierAverage[0].dataFourierPhaseOptReal->GetXaxis()->SetRangeUser(xmin, xmax);
1673 fFourierAverage[0].dataFourierPhaseOptReal->GetYaxis()->SetRangeUser(ymin, 1.03*ymax);
1674 fFourierAverage[0].dataFourierPhaseOptReal->GetYaxis()->SetTitleOffset(1.3);
1675 fFourierAverage[0].dataFourierPhaseOptReal->GetYaxis()->SetDecimals(kTRUE);
1676 fFourierAverage[0].dataFourierPhaseOptReal->GetYaxis()->SetTitle(
"<Phase Opt. Real>");
1678 fFourierAverage[0].dataFourierPhaseOptReal->GetXaxis()->SetRangeUser(xmin, xmax);
1688 TString label = TString::Format(
"<%s>", str.Data());
1716 label = TString::Format(
"<%s>", str.Data());
1741 const Double_t cp = TMath::Cos(inc/180.0*TMath::Pi());
1742 const Double_t sp = TMath::Sin(inc/180.0*TMath::Pi());
1749 for (Int_t j=0; j<
fFourierHistos[i].dataFourierRe->GetNbinsX(); j++) {
1774 const Double_t cp = TMath::Cos(inc/180.0*TMath::Pi());
1775 const Double_t sp = TMath::Sin(inc/180.0*TMath::Pi());
1782 for (Int_t j=0; j<
fFourierHistos[i].dataFourierRe->GetNbinsX(); j++) {
1810 if (histo ==
nullptr)
1813 Int_t start=0, end=0;
1816 end = histo->GetNbinsX();
1818 start = histo->FindBin(xmin);
1819 if ((start==0) || (start==histo->GetNbinsX()+1))
1821 end = histo->FindBin(xmax);
1822 if ((end==0) || (end==histo->GetNbinsX()+1))
1823 end = histo->GetNbinsX();
1826 Double_t max = histo->GetBinContent(start);
1827 Double_t binContent;
1828 for (Int_t i=start; i<end; i++) {
1829 binContent = histo->GetBinContent(i);
1830 if (max < binContent)
1853 if (histo ==
nullptr)
1856 Int_t start=0, end=0;
1859 end = histo->GetNbinsX();
1861 start = histo->FindBin(xmin);
1862 if ((start==0) || (start==histo->GetNbinsX()+1))
1864 end = histo->FindBin(xmax);
1865 if ((end==0) || (end==histo->GetNbinsX()+1))
1866 end = histo->GetNbinsX();
1869 Double_t min = histo->GetBinContent(start);
1870 Double_t binContent;
1871 for (Int_t i=start; i<end; i++) {
1872 binContent = histo->GetBinContent(i);
1873 if (min > binContent)
1895 if (histo ==
nullptr)
1898 Int_t idx = histo->FindBin(xVal);
1901 if ((idx < 1) || (idx > histo->GetNbinsX()))
1906 if (histo->GetBinCenter(idx) > xVal)
1909 Double_t x0, x1, y0, y1;
1910 x0 = histo->GetBinCenter(idx);
1911 x1 = histo->GetBinCenter(idx+1);
1912 y0 = histo->GetBinContent(idx);
1913 y1 = histo->GetBinContent(idx+1);
1915 return (y1-y0)*(xVal-x0)/(x1-x0)+y0;
1933 Ssiz_t idx = str.First(
':');
1934 str.Remove(0, idx+1);
1935 idx = str.First(
',');
std::unique_ptr< TLatex > fCurrentFourierPhaseText
used in Re/Im Fourier to show the current phase in the pad
Int_t fTimeout
timeout after which the Done signal should be emited. If timeout <= 0, no timeout is taking place ...
virtual void DecrementFourierPhase()
PIntVector fColorList
list of colors
std::unique_ptr< TTimer > fTimeoutTimer
timeout timer in order to terminate if no action is taking place for too long
#define P_MENU_ID_FOURIER_PHASE_MINUS
virtual void SaveGraphicsAndQuit(const Char_t *fileName)
virtual void PlotAverage()
PFourierCanvasDataList fFourierHistos
keeps all the Fourier histos
#define P_MENU_ID_FOURIER_PHASE_PLUS
PIntVector fDataSetTag
vector holding the data set tags
std::unique_ptr< TPaveText > fTitlePad
title pad used to display a title
#define FOURIER_PLOT_POWER
#define P_MENU_ID_FOURIER
Int_t fCurrentPlotView
tag showing what the current plot view is: real, imag, power, phase, ...
virtual void LastCanvasClosed()
virtual void Done(Int_t status=0)
virtual void PlotFourierPhaseValue()
virtual void PlotFourier()
Bool_t fAveragedViewPerDataSet
tag showing that the averaged view for individual data sets or normal view should be presented...
Bool_t fValid
if true, everything looks OK
virtual void CleanupAverage()
#define FOURIER_PLOT_IMAG
TRootCanvas * fImp
ROOT native GUI version of main window with menubar and drawing area.
#define FOURIER_PLOT_REAL
std::vector< Int_t > PIntVector
virtual void SetTimeout(Int_t ival)
std::unique_ptr< TPad > fFourierPad
fourier pad used to display the fourier
#define FOURIER_UNIT_CYCLES
virtual void UpdateInfoPad()
std::unique_ptr< TLegend > fInfoPad
info pad used to display a legend of the data plotted
#define FOURIER_PLOT_REAL_AND_IMAG
#define P_MENU_ID_FOURIER_PWR
virtual void CalcPhaseOptReal()
#define FOURIER_UNIT_FREQ
#define P_MENU_ID_EXPORT_DATA
virtual void CreateXaxisTitle()
virtual void InitFourierDataSets()
std::unique_ptr< TLegend > fLegAvgPerDataSet
legend used for averaged per data set view
Double_t fInitialXRange[2]
keeps the initial x-range
Bool_t fAveragedView
tag showing that the averaged view for ALL data or normal view should be presented.
static const Char_t * gFiletypes[]
std::unique_ptr< TGPopupMenu > fPopupFourier
popup menu of the MusrFT/Fourier sub menu
Bool_t fBatchMode
musrview in ROOT batch mode
PFourierCanvasDataList fFourierAverage
keeps the average of the Fourier histos
virtual void HandleMenuPopup(Int_t id)
#define P_MENU_ID_AVERAGE_PER_DATA_SET
#define P_MENU_ID_FOURIER_PHASE
#define FOURIER_PLOT_PHASE
virtual TString GetDataSetName(TString title)
#define FOURIER_UNIT_GAUSS
virtual void IncrementFourierPhase()
ClassImpQ(PFourierCanvas) PFourierCanvas
virtual void HandleCmdKey(Int_t event, Int_t x, Int_t y, TObject *selected)
virtual Double_t GetInterpolatedValue(TH1F *histo, Double_t xVal)
#define FOURIER_UNIT_TESLA
std::vector< PFourier * > fFourier
keeps all the Fourier data, ownership is with the caller
#define FOURIER_PLOT_PHASE_OPT_REAL
#define FOURIER_PLOT_NOT_GIVEN
virtual Double_t GetMinimum(TH1F *histo, Double_t xmin=-1.0, Double_t xmax=-1.0)
#define P_MENU_ID_FOURIER_REAL
#define P_MENU_ID_FOURIER_PHASE_OPT_REAL
TGPopupMenu * fPopupMain
popup menu MusrFT in the main menu bar
#define P_MENU_ID_AVERAGE
std::unique_ptr< TStyle > fStyle
A collection of all graphics attributes.
virtual void HandleAverage()
#define P_MENU_ID_FOURIER_REAL_AND_IMAG
#define P_MENU_ID_FOURIER_IMAG
virtual void UpdateFourierPad()
PIntVector fMarkerList
list of markers
virtual void ExportData(const Char_t *pathFileName)
virtual void InitFourierCanvas(const Char_t *title, Int_t wtopx, Int_t wtopy, Int_t ww, Int_t wh)
std::unique_ptr< TCanvas > fMainCanvas
main canvas
virtual Double_t GetMaximum(TH1F *histo, Double_t xmin=-1.0, Double_t xmax=-1.0)
virtual void CreateStyle()
Double_t fCurrentFourierPhase
keeps the current Fourier phase (real/imag)