musrfit  1.9.2
PMusrCanvas Class Reference

#include <PMusrCanvas.h>

Inheritance diagram for PMusrCanvas:
Collaboration diagram for PMusrCanvas:

Public Member Functions

 PMusrCanvas ()
 
 PMusrCanvas (const Int_t number, const Char_t *title, Int_t wtopx, Int_t wtopy, Int_t ww, Int_t wh, const Bool_t batch, const Bool_t fourier=false, const Bool_t avg=false, const Bool_t theoAsData=false)
 
 PMusrCanvas (const Int_t number, const Char_t *title, Int_t wtopx, Int_t wtopy, Int_t ww, Int_t wh, PMsrFourierStructure fourierDefault, const PIntVector markerList, const PIntVector colorList, const Bool_t batch, const Bool_t fourier=false, const Bool_t avg=false, const Bool_t theoAsData=false)
 
virtual ~PMusrCanvas ()
 
virtual Bool_t IsValid ()
 
virtual void SetMsrHandler (PMsrHandler *msrHandler)
 
virtual void SetRunListCollection (PRunListCollection *runList)
 
virtual void SetTimeout (Int_t ival)
 
virtual void UpdateParamTheoryPad ()
 
virtual void UpdateDataTheoryPad ()
 
virtual void UpdateInfoPad ()
 
virtual void Done (Int_t status=0)
 
virtual void HandleCmdKey (Int_t event, Int_t x, Int_t y, TObject *selected)
 
virtual void HandleMenuPopup (Int_t id)
 
virtual void LastCanvasClosed ()
 
virtual void WindowClosed ()
 
virtual void SaveGraphicsAndQuit (Char_t *fileName, Char_t *graphicsFormat)
 
virtual void ExportData (const Char_t *fileName)
 

Private Member Functions

virtual void CreateStyle ()
 
virtual void InitFourier ()
 
virtual void InitAverage ()
 
virtual void InitMusrCanvas (const Char_t *title, Int_t wtopx, Int_t wtopy, Int_t ww, Int_t wh)
 
virtual void InitDataSet (PMusrCanvasDataSet &dataSet)
 
virtual void InitDataSet (PMusrCanvasNonMusrDataSet &dataSet)
 
virtual void CleanupDataSet (PMusrCanvasDataSet &dataSet)
 
virtual void CleanupDataSet (PMusrCanvasNonMusrDataSet &dataSet)
 
virtual void HandleDataSet (UInt_t plotNo, UInt_t runNo, PRunData *data)
 
virtual void HandleNonMusrDataSet (UInt_t plotNo, UInt_t runNo, PRunData *data)
 
virtual void HandleDifference ()
 
virtual void HandleFourier ()
 
virtual void HandleDifferenceFourier ()
 
virtual void HandleFourierDifference ()
 
virtual void HandleAverage ()
 
virtual void CleanupDifference ()
 
virtual void CleanupFourier ()
 
virtual void CleanupFourierDifference ()
 
virtual void CleanupAverage ()
 
virtual void CalcPhaseOptReFT ()
 PMusrCanvas::CalcPhaseOptReFT. More...
 
virtual Double_t CalculateDiff (const Double_t x, const Double_t y, TH1F *theo)
 
virtual Double_t CalculateDiff (const Double_t x, const Double_t y, TGraphErrors *theo)
 
virtual Int_t FindBin (const Double_t x, TGraphErrors *graph)
 
virtual Double_t GetMaximum (TH1F *histo, Double_t xmin=-1.0, Double_t xmax=-1.0)
 
virtual Double_t GetMinimum (TH1F *histo, Double_t xmin=-1.0, Double_t xmax=-1.0)
 
virtual Double_t GetMaximum (TGraphErrors *graph, Double_t xmin=-1.0, Double_t xmax=-1.0)
 
virtual Double_t GetMinimum (TGraphErrors *graph, Double_t xmin=-1.0, Double_t xmax=-1.0)
 
virtual void PlotData (Bool_t unzoom=false)
 
virtual void PlotDifference (Bool_t unzoom=false)
 
virtual void PlotFourier (Bool_t unzoom=false)
 
virtual void PlotFourierDifference (Bool_t unzoom=false)
 
virtual void PlotFourierPhaseValue (Bool_t unzoom=false)
 
virtual void PlotAverage (Bool_t unzoom=false)
 
virtual void IncrementFourierPhase ()
 
virtual void DecrementFourierPhase ()
 
virtual Bool_t IsScaleN0AndBkg ()
 
virtual UInt_t GetNeededAccuracy (PMsrParamStructure param)
 
virtual Double_t GetInterpolatedValue (TH1F *histo, Double_t xVal)
 
virtual void GetExportDataSet (const TH1F *data, const Double_t xmin, const Double_t xmax, PMusrCanvasAsciiDumpVector &dumpData, const Bool_t hasError=true)
 

Private Attributes

Bool_t fTheoAsData
 flag if true, calculate theory points only at the data points More...
 
Bool_t fStartWithFourier
 flag if true, the Fourier transform will be presented bypassing the time domain representation More...
 
Bool_t fStartWithAvg
 flag if true, the averaged data/Fourier will be presented More...
 
Int_t fTimeout
 timeout after which the Done signal should be emited. If timeout <= 0, no timeout is taking place More...
 
Bool_t fScaleN0AndBkg
 true=N0 and background is scaled to (1/ns), otherwise (1/bin) for the single histogram case More...
 
Bool_t fBatchMode
 musrview in ROOT batch mode More...
 
Bool_t fValid
 if true, everything looks OK More...
 
Bool_t fAveragedView
 tag showing that the averaged view or normal view should be presented. More...
 
Bool_t fDifferenceView
 tag showing that the shown data, fourier, are the difference between data and theory More...
 
Bool_t fToggleColor
 tag showing if a single histo theory is color toggled More...
 
Int_t fCurrentPlotView
 tag showing what the current plot view is: data, fourier, ... More...
 
Int_t fPreviousPlotView
 tag showing the previous plot view More...
 
Int_t fPlotType
 plot type tag: -1 == undefined, MSR_PLOT_SINGLE_HISTO == single histogram, MSR_PLOT_ASYM == asymmetry, MSR_PLOT_BNMR == beta-NMR asymmetry, MSR_PLOT_MU_MINUS == mu minus (not yet implemented), MSR_PLOT_NON_MUSR == non-muSR More...
 
Int_t fPlotNumber
 plot number More...
 
Bool_t fXRangePresent
 
Bool_t fYRangePresent
 flag indicating if x-/y-range is present More...
 
Double_t fXmin
 
Double_t fXmax
 
Double_t fYmin
 
Double_t fYmax
 data/theory frame range More...
 
PDoubleVector fCurrentFourierPhase
 holds the current Fourier phase(s) More...
 
std::unique_ptr< TLatex > fCurrentFourierPhaseText
 used in Re/Im Fourier to show the current phase in the pad More...
 
std::unique_ptr< TString > fRRFText
 RRF information. More...
 
std::unique_ptr< TLatex > fRRFLatexText
 used to display RRF info More...
 
std::unique_ptr< TStyle > fStyle
 A collection of all graphics attributes. More...
 
std::unique_ptr< TTimer > fTimeoutTimer
 timeout timer in order to terminate if no action is taking place for too long More...
 
TRootCanvas * fImp
 ROOT native GUI version of main window with menubar and drawing area. More...
 
TGMenuBar * fBar
 menu bar More...
 
TGPopupMenu * fPopupMain
 popup menu Musrfit in the main menu bar More...
 
std::unique_ptr< TGPopupMenu > fPopupFourier
 popup menu of the Musrfit/Fourier sub menu More...
 
std::unique_ptr< TCanvas > fMainCanvas
 main canvas More...
 
std::unique_ptr< TPaveText > fTitlePad
 title pad used to display a title More...
 
std::unique_ptr< TPad > fDataTheoryPad
 data/theory pad used to display the data/theory More...
 
std::unique_ptr< TPaveText > fParameterPad
 parameter pad used to display the fitting parameters More...
 
std::unique_ptr< TPaveText > fTheoryPad
 theory pad used to display the theory and functions More...
 
std::unique_ptr< TLegend > fInfoPad
 info pad used to display a legend of the data plotted More...
 
std::unique_ptr< TLegend > fMultiGraphLegend
 used for non-muSR plots to display a legend More...
 
TH1F * fHistoFrame
 fHistoFrame is a 'global' frame needed in order to plot histograms with (potentially) different x-frames More...
 
PMsrHandlerfMsrHandler
 msr-file handler More...
 
PRunListCollectionfRunList
 data handler More...
 
PMusrCanvasDataSet fDataAvg
 set of all averaged data to be plotted (asymmetry/single histogram) More...
 
PMusrCanvasDataList fData
 list of all histogram data to be plotted (asymmetry/single histogram) More...
 
PMusrCanvasNonMusrDataList fNonMusrData
 list of all error graphs to be plotted (non-muSR) More...
 
TMultiGraph * fMultiGraphData
 fMultiGraphData is a 'global' graph needed in order to plot error graphs (data) with (potentially) different x-frames More...
 
TMultiGraph * fMultiGraphDiff
 fMultiGraphDiff is a 'global' graph needed in order to plot error graphs (data-theory) with (potentially) different x-frames More...
 
PMsrFourierStructure fFourier
 structure holding all the information necessary to perform the Fourier transform More...
 
PIntVector fMarkerList
 list of markers More...
 
PIntVector fColorList
 list of colors More...
 

Detailed Description

The preprocessor tag MAKECLING is used to hide away from rootcling the overly complex spirit header files.

Definition at line 203 of file PMusrCanvas.h.

Constructor & Destructor Documentation

◆ PMusrCanvas() [1/3]

PMusrCanvas::PMusrCanvas ( )

◆ PMusrCanvas() [2/3]

PMusrCanvas::PMusrCanvas ( const Int_t  number,
const Char_t *  title,
Int_t  wtopx,
Int_t  wtopy,
Int_t  ww,
Int_t  wh,
const Bool_t  batch,
const Bool_t  fourier = false,
const Bool_t  avg = false,
const Bool_t  theoAsData = false 
)

Constructor.

Parameters
numberThe plot number of the msr-file PLOT block
titleTitle to be displayed
wtopxtop x coordinate (in pixels) to place the canvas.
wtopytop y coordinate (in pixels) to place the canvas.
wwwidth (in pixels) of the canvas.
whheight (in pixels) of the canvas.
batchflag: if set true, the canvas will not be displayed. This is used when just dumping of a graphical output file is wished.
fourierflag: if set true, the canvas will present the Fourier view.
avgflag: if set true, the canvas will present the averages data/Fourier view.

Definition at line 172 of file PMusrCanvas.cpp.

References CreateStyle(), fAveragedView, fHistoFrame, fMultiGraphData, fMultiGraphDiff, fTimeout, fXmax, fXmin, fXRangePresent, fYmax, fYmin, fYRangePresent, InitAverage(), InitFourier(), and InitMusrCanvas().

◆ PMusrCanvas() [3/3]

PMusrCanvas::PMusrCanvas ( const Int_t  number,
const Char_t *  title,
Int_t  wtopx,
Int_t  wtopy,
Int_t  ww,
Int_t  wh,
PMsrFourierStructure  fourierDefault,
const PIntVector  markerList,
const PIntVector  colorList,
const Bool_t  batch,
const Bool_t  fourier = false,
const Bool_t  avg = false,
const Bool_t  theoAsData = false 
)

Constructor.

Parameters
numberThe plot number of the msr-file PLOT block
titleTitle to be displayed
wtopxtop x coordinate (in pixels) to place the canvas.
wtopytop y coordinate (in pixels) to place the canvas.
wwwidth (in pixels) of the canvas.
whheight (in pixels) of the canvas.
fourierDefaultstructure holding the pre-defined settings for a Fourier transform
markerListpre-defined list of markers
colorListpre-defined list of colors
batchflag: if set true, the canvas will not be displayed. This is used when just dumping of a graphical output file is wished.
fourierflag: if set true, the canvas will present the Fourier view.
avgflag: if set true, the canvas will present the averages data/Fourier view.

Definition at line 222 of file PMusrCanvas.cpp.

References CreateStyle(), fHistoFrame, fMultiGraphData, fMultiGraphDiff, fTimeout, fXmax, fXmin, fXRangePresent, fYmax, fYmin, fYRangePresent, InitAverage(), and InitMusrCanvas().

◆ ~PMusrCanvas()

PMusrCanvas::~PMusrCanvas ( )
virtual

Destructor.

Definition at line 259 of file PMusrCanvas.cpp.

References CleanupDataSet(), fData, fMultiGraphData, fMultiGraphDiff, and fNonMusrData.

Member Function Documentation

◆ CalcPhaseOptReFT()

◆ CalculateDiff() [1/2]

double PMusrCanvas::CalculateDiff ( const Double_t  x,
const Double_t  y,
TH1F *  theo 
)
privatevirtual

Calculates the difference between data and theory for histograms.

return:

  • (data - theory) value
Parameters
xx-value of the data
yy-value of the data
theotheory histogram

Definition at line 4278 of file PMusrCanvas.cpp.

Referenced by HandleDifference().

◆ CalculateDiff() [2/2]

double PMusrCanvas::CalculateDiff ( const Double_t  x,
const Double_t  y,
TGraphErrors *  theo 
)
privatevirtual

Calculates the difference between data and theory for error graphs.

return:

  • (data - theory) value
Parameters
xx-value of the data
yy-value of the data
theotheory error graphs

Definition at line 4298 of file PMusrCanvas.cpp.

References FindBin().

◆ CleanupAverage()

◆ CleanupDataSet() [1/2]

◆ CleanupDataSet() [2/2]

◆ CleanupDifference()

void PMusrCanvas::CleanupDifference ( )
privatevirtual

Cleans up (deallocate) difference data.

Definition at line 4031 of file PMusrCanvas.cpp.

References fData.

Referenced by HandleCmdKey(), and HandleMenuPopup().

◆ CleanupFourier()

void PMusrCanvas::CleanupFourier ( )
privatevirtual

Cleans up (deallocate) Fourier transform data.

Definition at line 4047 of file PMusrCanvas.cpp.

References fData.

Referenced by HandleCmdKey(), and HandleMenuPopup().

◆ CleanupFourierDifference()

void PMusrCanvas::CleanupFourierDifference ( )
privatevirtual

Cleans up (deallocate) Fourier difference spectra.

Definition at line 4099 of file PMusrCanvas.cpp.

References fData.

Referenced by HandleCmdKey(), and HandleMenuPopup().

◆ CreateStyle()

void PMusrCanvas::CreateStyle ( )
privatevirtual

Set styles for the canvas. Perhaps one could transfer them to the startup-file in the future.

Definition at line 2237 of file PMusrCanvas.cpp.

References fPlotNumber, and fStyle.

Referenced by PMusrCanvas().

◆ DecrementFourierPhase()

void PMusrCanvas::DecrementFourierPhase ( )
privatevirtual

Decrements the Fourier phase and recalculate the real/imaginary part of the Fourier transform.

Definition at line 6297 of file PMusrCanvas.cpp.

References fCurrentFourierPhase, fCurrentPlotView, fData, fFourier, PMsrFourierStructure::fPhaseIncrement, PlotFourierPhaseValue(), and PV_FOURIER_PWR.

Referenced by HandleCmdKey(), and HandleMenuPopup().

◆ Done()

void PMusrCanvas::Done ( Int_t  status = 0)
virtual

Signal emitted that the user wants to terminate the application.

Parameters
statusStatus info

Definition at line 911 of file PMusrCanvas.cpp.

References status.

Referenced by HandleCmdKey(), LastCanvasClosed(), main(), and SaveGraphicsAndQuit().

◆ ExportData()

◆ FindBin()

Int_t PMusrCanvas::FindBin ( const Double_t  x,
TGraphErrors *  graph 
)
privatevirtual

Analog to FindBin for histograms (TH1F) but here for TGraphErrors.

return:

  • bin closest to a given x value.
Parameters
xx-value of the data
graphTGraphErrors which should be searched

Definition at line 4322 of file PMusrCanvas.cpp.

Referenced by CalculateDiff().

◆ GetExportDataSet()

void PMusrCanvas::GetExportDataSet ( const TH1F *  data,
const Double_t  xmin,
const Double_t  xmax,
PMusrCanvasAsciiDumpVector dumpData,
const Bool_t  hasError = true 
)
privatevirtual

extract data for export.

Parameters
data
xmin
xmax
dumpData
hasError

Definition at line 2207 of file PMusrCanvas.cpp.

References PMusrCanvasAsciiDump::data, PMusrCanvasAsciiDump::dataErr, and PMusrCanvasAsciiDump::dataX.

Referenced by ExportData().

◆ GetInterpolatedValue()

Double_t PMusrCanvas::GetInterpolatedValue ( TH1F *  histo,
Double_t  xVal 
)
privatevirtual

search for xVal in histo. If xVal is not found exactly, interpolate and return the interpolated y-value.

return:

  • interpolated value if xVal is within histo range, 0 otherwise.
Parameters
histopointer of the histogram
xValx-value to be looked for

Definition at line 6482 of file PMusrCanvas.cpp.

Referenced by HandleAverage().

◆ GetMaximum() [1/2]

Double_t PMusrCanvas::GetMaximum ( TH1F *  histo,
Double_t  xmin = -1.0,
Double_t  xmax = -1.0 
)
privatevirtual

returns the maximum of a histogram in the range [xmin, xmax]. If xmin = xmax = -1.0, the whole histogram range is used.

return:

  • maximum, or 0.0 if the histo pointer is the null pointer.
Parameters
histopointer of the histogram
xminlower edge for the search interval.
xmaxupper edge for the search interval.

Definition at line 4356 of file PMusrCanvas.cpp.

Referenced by PlotData(), PlotDifference(), PlotFourier(), and PlotFourierDifference().

◆ GetMaximum() [2/2]

Double_t PMusrCanvas::GetMaximum ( TGraphErrors *  graph,
Double_t  xmin = -1.0,
Double_t  xmax = -1.0 
)
privatevirtual

returns the maximum of a TGraphErrors object in the range [xmin, xmax]. If xmin = xmax = -1.0, the whole histogram range is used.

return:

  • maximum, or 0.0 if the histo pointer is the null pointer.
Parameters
graphpointer of the histogram
xminlower edge for the search interval.
xmaxupper edge for the search interval.

Definition at line 4442 of file PMusrCanvas.cpp.

◆ GetMinimum() [1/2]

Double_t PMusrCanvas::GetMinimum ( TH1F *  histo,
Double_t  xmin = -1.0,
Double_t  xmax = -1.0 
)
privatevirtual

returns the minimum of a histogram in the range [xmin, xmax]. If xmin = xmax = -1.0, the whole histogram range is used.

return:

  • minimum, or 0.0 if the histo pointer is the null pointer.
Parameters
histopointer of the histogram
xminlower edge for the search interval.
xmaxupper edge for the search interval.

Definition at line 4399 of file PMusrCanvas.cpp.

Referenced by PlotData(), PlotDifference(), PlotFourier(), and PlotFourierDifference().

◆ GetMinimum() [2/2]

Double_t PMusrCanvas::GetMinimum ( TGraphErrors *  graph,
Double_t  xmin = -1.0,
Double_t  xmax = -1.0 
)
privatevirtual

returns the minimum of a TGraphErrors object in the range [xmin, xmax]. If xmin = xmax = -1.0, the whole histogram range is used.

return:

  • minimum, or 0.0 if the histo pointer is the null pointer.
Parameters
graphpointer of the histogram
xminlower edge for the search interval.
xmaxupper edge for the search interval.

Definition at line 4482 of file PMusrCanvas.cpp.

◆ GetNeededAccuracy()

UInt_t PMusrCanvas::GetNeededAccuracy ( PMsrParamStructure  param)
privatevirtual

Calculates the needed accuracy of the parameter value based on the given errors.

return:

  • needed accuracy
Parameters
paramfit parameter with its additional informations, like errors etc.

Definition at line 6399 of file PMusrCanvas.cpp.

References PMsrParamStructure::fPosErrorPresent, PMsrParamStructure::fStep, and PMsrParamStructure::fValue.

Referenced by UpdateParamTheoryPad().

◆ HandleAverage()

◆ HandleCmdKey()

void PMusrCanvas::HandleCmdKey ( Int_t  event,
Int_t  x,
Int_t  y,
TObject *  selected 
)
virtual

Filters keyboard events, and if they are a command key (see below) carries out the necessary actions.

Currently implemented command keys:

  • 'q' quit musrview
  • 'd' toggle between difference view and data view
  • 'u' unzoom to the original plot range given in the msr-file.
  • 'f' Fourier transform data. Twice 'f' will switch back to the time domain view.
  • '+' increment the phase (real/imaginary Fourier). The phase step is defined in the musrfit_startup.xml
  • '-' decrement the phase (real/imaginary Fourier). The phase step is defined in the musrfit_startup.xml
Parameters
eventevent type
xcharacter key
ynot used
selectednot used

Definition at line 935 of file PMusrCanvas.cpp.

References CleanupAverage(), CleanupDifference(), CleanupFourier(), CleanupFourierDifference(), DecrementFourierPhase(), Done(), fAveragedView, fBatchMode, fColorList, fCurrentPlotView, fData, fDataTheoryPad, fDifferenceView, fFourier, fMainCanvas, FOURIER_PLOT_IMAG, FOURIER_PLOT_PHASE, FOURIER_PLOT_PHASE_OPT_REAL, FOURIER_PLOT_POWER, FOURIER_PLOT_REAL, FOURIER_PLOT_REAL_AND_IMAG, fPlotNumber, PMsrFourierStructure::fPlotTag, fPopupFourier, fPopupMain, fPreviousPlotView, fStartWithAvg, fToggleColor, HandleAverage(), HandleDifference(), HandleDifferenceFourier(), HandleFourier(), HandleFourierDifference(), IncrementFourierPhase(), P_MENU_ID_AVERAGE, P_MENU_ID_DATA, P_MENU_ID_DIFFERENCE, P_MENU_ID_FOURIER, P_MENU_ID_FOURIER_IMAG, P_MENU_ID_FOURIER_PHASE, P_MENU_ID_FOURIER_PHASE_MINUS, P_MENU_ID_FOURIER_PHASE_OPT_REAL, P_MENU_ID_FOURIER_PHASE_PLUS, P_MENU_ID_FOURIER_PWR, P_MENU_ID_FOURIER_REAL, P_MENU_ID_FOURIER_REAL_AND_IMAG, P_MENU_PLOT_OFFSET, PlotAverage(), PlotData(), PlotDifference(), PlotFourier(), PlotFourierDifference(), PV_DATA, PV_FOURIER_IMAG, PV_FOURIER_PHASE, PV_FOURIER_PHASE_OPT_REAL, PV_FOURIER_PWR, PV_FOURIER_REAL, and PV_FOURIER_REAL_AND_IMAG.

Referenced by UpdateDataTheoryPad().

◆ HandleDataSet()

void PMusrCanvas::HandleDataSet ( UInt_t  plotNo,
UInt_t  runNo,
PRunData data 
)
privatevirtual

◆ HandleDifference()

void PMusrCanvas::HandleDifference ( )
privatevirtual

Handles the calculation of the difference spectra (i.e. data-theory). It allocates the necessary objects if they are not already present. At the end it calls the plotting routine.

Definition at line 3200 of file PMusrCanvas.cpp.

References CalculateDiff(), fData, fNonMusrData, fPlotType, and MSR_PLOT_NON_MUSR.

Referenced by HandleCmdKey(), HandleDifferenceFourier(), and HandleMenuPopup().

◆ HandleDifferenceFourier()

void PMusrCanvas::HandleDifferenceFourier ( )
privatevirtual

Handles the calculation of the Fourier transform of the difference spectra (i.e. data-theory). It allocates the necessary objects if they are not already present. At the end it calls the plotting routine.

Definition at line 3432 of file PMusrCanvas.cpp.

References PMsrFourierStructure::fApodization, fCurrentFourierPhase, fData, PMsrFourierStructure::fDCCorrected, fFourier, PMsrFourierStructure::fFourierPower, fHistoFrame, PMsrFourierStructure::fPhase, fPlotType, PMsrFourierStructure::fUnits, PFourier::GetImaginaryFourier(), PFourier::GetPhaseFourier(), PFourier::GetPowerFourier(), PFourier::GetRealFourier(), HandleDifference(), PFourier::IsValid(), MSR_PLOT_NON_MUSR, and PFourier::Transform().

Referenced by HandleCmdKey(), and HandleMenuPopup().

◆ HandleFourier()

◆ HandleFourierDifference()

void PMusrCanvas::HandleFourierDifference ( )
privatevirtual

Handles the calculation of the difference of the Fourier spectra. It allocates the necessary objects if they are not already present. At the end it calls the plotting routine.

Definition at line 3534 of file PMusrCanvas.cpp.

References fData, fPlotType, and MSR_PLOT_NON_MUSR.

Referenced by HandleCmdKey(), and HandleMenuPopup().

◆ HandleMenuPopup()

◆ HandleNonMusrDataSet()

void PMusrCanvas::HandleNonMusrDataSet ( UInt_t  plotNo,
UInt_t  runNo,
PRunData data 
)
privatevirtual

◆ IncrementFourierPhase()

void PMusrCanvas::IncrementFourierPhase ( )
privatevirtual

Increments the Fourier phase and recalculate the real/imaginary part of the Fourier transform.

Definition at line 6244 of file PMusrCanvas.cpp.

References fCurrentFourierPhase, fCurrentPlotView, fData, fFourier, PMsrFourierStructure::fPhaseIncrement, PlotFourierPhaseValue(), and PV_FOURIER_PWR.

Referenced by HandleCmdKey(), and HandleMenuPopup().

◆ InitAverage()

◆ InitDataSet() [1/2]

◆ InitDataSet() [2/2]

◆ InitFourier()

◆ InitMusrCanvas()

void PMusrCanvas::InitMusrCanvas ( const Char_t *  title,
Int_t  wtopx,
Int_t  wtopy,
Int_t  ww,
Int_t  wh 
)
privatevirtual

Initialize the class, and sets up the necessary objects.

Parameters
titleTitle to be displayed
wtopxtop x coordinate (in pixels) to place the canvas.
wtopytop y coordinate (in pixels) to place the canvas.
wwwidth (in pixels) of the canvas.
whheight (in pixels) of the canvas.

Definition at line 2311 of file PMusrCanvas.cpp.

References fAveragedView, fBar, fBatchMode, fCurrentPlotView, fDataTheoryPad, fDifferenceView, fImp, fInfoPad, fMainCanvas, fParameterPad, fPlotNumber, fPlotType, fPopupFourier, fPopupMain, fPreviousPlotView, fScaleN0AndBkg, fTheoryPad, fTitlePad, fToggleColor, fValid, P_MENU_ID_AVERAGE, P_MENU_ID_DATA, P_MENU_ID_DIFFERENCE, P_MENU_ID_EXPORT_DATA, P_MENU_ID_FOURIER, P_MENU_ID_FOURIER_IMAG, P_MENU_ID_FOURIER_PHASE, P_MENU_ID_FOURIER_PHASE_MINUS, P_MENU_ID_FOURIER_PHASE_OPT_REAL, P_MENU_ID_FOURIER_PHASE_PLUS, P_MENU_ID_FOURIER_PWR, P_MENU_ID_FOURIER_REAL, P_MENU_ID_FOURIER_REAL_AND_IMAG, P_MENU_PLOT_OFFSET, PV_DATA, XTHEO, YINFO, and YTITLE.

Referenced by PMusrCanvas().

◆ IsScaleN0AndBkg()

Bool_t PMusrCanvas::IsScaleN0AndBkg ( )
privatevirtual

Checks if N0/Bkg normalization to 1/ns is whished. The default is yes, since most of the users want to have it that way. To overwrite this, one should add the line 'SCALE_N0_BKG FALSE' to the command block of the msr-file.

return:

  • true, if scaling of N0 and Bkg to 1/ns is whished
  • false, otherwise
Parameters
histoNoforward histogram number of the run

Definition at line 6358 of file PMusrCanvas.cpp.

References fMsrHandler, and PMsrHandler::GetMsrCommands().

Referenced by SetMsrHandler().

◆ IsValid()

virtual Bool_t PMusrCanvas::IsValid ( )
inlinevirtual

Definition at line 217 of file PMusrCanvas.h.

References fValid.

Referenced by main().

◆ LastCanvasClosed()

void PMusrCanvas::LastCanvasClosed ( )
virtual

Slot called when the last canvas has been closed. Will emit Done(0) which will terminate the application.

Definition at line 1443 of file PMusrCanvas.cpp.

References Done().

Referenced by WindowClosed().

◆ PlotAverage()

◆ PlotData()

◆ PlotDifference()

void PMusrCanvas::PlotDifference ( Bool_t  unzoom = false)
privatevirtual

◆ PlotFourier()

◆ PlotFourierDifference()

◆ PlotFourierPhaseValue()

void PMusrCanvas::PlotFourierPhaseValue ( Bool_t  unzoom = false)
privatevirtual

Writes the Fourier phase value into the data window.

Parameters
unzoomif true, rescale to the original Fourier range

Definition at line 5983 of file PMusrCanvas.cpp.

References fCurrentFourierPhase, fCurrentFourierPhaseText, fDataTheoryPad, fFourier, and PMsrFourierStructure::fPhase.

Referenced by DecrementFourierPhase(), IncrementFourierPhase(), PlotFourier(), and PlotFourierDifference().

◆ SaveGraphicsAndQuit()

void PMusrCanvas::SaveGraphicsAndQuit ( Char_t *  fileName,
Char_t *  graphicsFormat 
)
virtual

Will save the canvas as graphics output. Needed in the batch mode of musrview.

Parameters
fileNamefile name under which the canvas shall be saved.
graphicsFormatOne of the supported graphics formats.

Definition at line 1473 of file PMusrCanvas.cpp.

References Done(), fMainCanvas, fMsrHandler, fPlotNumber, fStartWithFourier, and PMsrHandler::GetMsrPlotList().

Referenced by main().

◆ SetMsrHandler()

◆ SetRunListCollection()

virtual void PMusrCanvas::SetRunListCollection ( PRunListCollection runList)
inlinevirtual

Definition at line 221 of file PMusrCanvas.h.

References fRunList.

Referenced by main().

◆ SetTimeout()

void PMusrCanvas::SetTimeout ( Int_t  timeout)
virtual
Parameters
timeoutafter which the done signal shall be emitted. Given in seconds

Definition at line 408 of file PMusrCanvas.cpp.

References fTimeout, fTimeoutTimer, and timeout.

Referenced by main().

◆ UpdateDataTheoryPad()

void PMusrCanvas::UpdateDataTheoryPad ( )
virtual

Feeds the pad with data/theory histograms (error graphs) and refreshes it.

Definition at line 551 of file PMusrCanvas.cpp.

References fBatchMode, fCurrentPlotView, fFourier, fMsrHandler, FOURIER_PLOT_IMAG, FOURIER_PLOT_PHASE, FOURIER_PLOT_PHASE_OPT_REAL, FOURIER_PLOT_POWER, FOURIER_PLOT_REAL, FOURIER_PLOT_REAL_AND_IMAG, fPlotNumber, PMsrFourierStructure::fPlotTag, fPlotType, PMsrPlotStructure::fPlotType, fPopupFourier, fPopupMain, fRunList, PMsrPlotStructure::fRuns, fStartWithAvg, fStartWithFourier, fValid, PRunListCollection::GetAsymmetry(), PRunListCollection::GetAsymmetryBNMR(), PRunListCollection::GetAsymmetryRRF(), PMsrGlobalBlock::GetFitType(), PMsrHandler::GetMsrGlobal(), PMsrHandler::GetMsrPlotList(), PMsrHandler::GetMsrRunList(), PRunListCollection::GetMuMinus(), PRunListCollection::GetNonMusr(), PRunListCollection::GetSingleHisto(), PRunListCollection::GetSingleHistoRRF(), HandleCmdKey(), HandleDataSet(), HandleFourier(), HandleNonMusrDataSet(), if(), PRunListCollection::kRunNo, MSR_FITTYPE_ASYM, MSR_FITTYPE_ASYM_RRF, MSR_FITTYPE_BNMR, MSR_FITTYPE_MU_MINUS, MSR_FITTYPE_NON_MUSR, MSR_FITTYPE_SINGLE_HISTO, MSR_FITTYPE_SINGLE_HISTO_RRF, MSR_PLOT_NON_MUSR, P_MENU_ID_DATA, P_MENU_ID_FOURIER, P_MENU_ID_FOURIER_IMAG, P_MENU_ID_FOURIER_PHASE, P_MENU_ID_FOURIER_PHASE_MINUS, P_MENU_ID_FOURIER_PHASE_OPT_REAL, P_MENU_ID_FOURIER_PHASE_PLUS, P_MENU_ID_FOURIER_PWR, P_MENU_ID_FOURIER_REAL, P_MENU_ID_FOURIER_REAL_AND_IMAG, P_MENU_PLOT_OFFSET, PlotData(), PlotFourier(), PV_FOURIER_IMAG, PV_FOURIER_PHASE, PV_FOURIER_PHASE_OPT_REAL, PV_FOURIER_PWR, PV_FOURIER_REAL, and PV_FOURIER_REAL_AND_IMAG.

Referenced by main().

◆ UpdateInfoPad()

◆ UpdateParamTheoryPad()

void PMusrCanvas::UpdateParamTheoryPad ( )
virtual

Feeds the pad with the fit parameter informations, and refreshes the pad.

Definition at line 428 of file PMusrCanvas.cpp.

References fMainCanvas, fMsrHandler, fParameterPad, fTheoryPad, fValid, PMsrHandler::GetMsrFunctions(), PMsrHandler::GetMsrParamList(), PMsrHandler::GetMsrTheory(), and GetNeededAccuracy().

Referenced by main().

◆ WindowClosed()

void PMusrCanvas::WindowClosed ( )
virtual

Slot called when the canvas is closed. Seems to be necessary on some systems.

Definition at line 1457 of file PMusrCanvas.cpp.

References fMainCanvas, and LastCanvasClosed().

Member Data Documentation

◆ fAveragedView

Bool_t PMusrCanvas::fAveragedView
private

tag showing that the averaged view or normal view should be presented.

Definition at line 246 of file PMusrCanvas.h.

Referenced by ClassImpQ(), ExportData(), HandleCmdKey(), HandleMenuPopup(), InitMusrCanvas(), and PMusrCanvas().

◆ fBar

TGMenuBar* PMusrCanvas::fBar
private

menu bar

Definition at line 268 of file PMusrCanvas.h.

Referenced by ClassImpQ(), and InitMusrCanvas().

◆ fBatchMode

Bool_t PMusrCanvas::fBatchMode
private

musrview in ROOT batch mode

Definition at line 244 of file PMusrCanvas.h.

Referenced by HandleCmdKey(), HandleMenuPopup(), InitMusrCanvas(), PlotData(), and UpdateDataTheoryPad().

◆ fColorList

PIntVector PMusrCanvas::fColorList
private

list of colors

Definition at line 297 of file PMusrCanvas.h.

Referenced by HandleCmdKey(), HandleDataSet(), and HandleNonMusrDataSet().

◆ fCurrentFourierPhase

PDoubleVector PMusrCanvas::fCurrentFourierPhase
private

holds the current Fourier phase(s)

Definition at line 257 of file PMusrCanvas.h.

Referenced by DecrementFourierPhase(), HandleDifferenceFourier(), HandleFourier(), IncrementFourierPhase(), and PlotFourierPhaseValue().

◆ fCurrentFourierPhaseText

std::unique_ptr<TLatex> PMusrCanvas::fCurrentFourierPhaseText
private

used in Re/Im Fourier to show the current phase in the pad

Definition at line 258 of file PMusrCanvas.h.

Referenced by PlotFourierPhaseValue().

◆ fCurrentPlotView

Int_t PMusrCanvas::fCurrentPlotView
private

◆ fData

◆ fDataAvg

PMusrCanvasDataSet PMusrCanvas::fDataAvg
private

set of all averaged data to be plotted (asymmetry/single histogram)

Definition at line 288 of file PMusrCanvas.h.

Referenced by CleanupAverage(), ExportData(), HandleAverage(), InitAverage(), and PlotAverage().

◆ fDataTheoryPad

std::unique_ptr<TPad> PMusrCanvas::fDataTheoryPad
private

data/theory pad used to display the data/theory

Definition at line 275 of file PMusrCanvas.h.

Referenced by HandleCmdKey(), InitMusrCanvas(), PlotAverage(), PlotData(), PlotDifference(), PlotFourier(), PlotFourierDifference(), and PlotFourierPhaseValue().

◆ fDifferenceView

Bool_t PMusrCanvas::fDifferenceView
private

tag showing that the shown data, fourier, are the difference between data and theory

Definition at line 247 of file PMusrCanvas.h.

Referenced by ClassImpQ(), ExportData(), HandleCmdKey(), HandleMenuPopup(), InitMusrCanvas(), and PlotAverage().

◆ fFourier

PMsrFourierStructure PMusrCanvas::fFourier
private

◆ fHistoFrame

TH1F* PMusrCanvas::fHistoFrame
private

fHistoFrame is a 'global' frame needed in order to plot histograms with (potentially) different x-frames

Definition at line 281 of file PMusrCanvas.h.

Referenced by ClassImpQ(), ExportData(), HandleDifferenceFourier(), HandleFourier(), PlotAverage(), PlotData(), PlotDifference(), PlotFourier(), PlotFourierDifference(), and PMusrCanvas().

◆ fImp

TRootCanvas* PMusrCanvas::fImp
private

ROOT native GUI version of main window with menubar and drawing area.

Definition at line 267 of file PMusrCanvas.h.

Referenced by ClassImpQ(), HandleMenuPopup(), and InitMusrCanvas().

◆ fInfoPad

std::unique_ptr<TLegend> PMusrCanvas::fInfoPad
private

info pad used to display a legend of the data plotted

Definition at line 278 of file PMusrCanvas.h.

Referenced by InitMusrCanvas(), and UpdateInfoPad().

◆ fMainCanvas

std::unique_ptr<TCanvas> PMusrCanvas::fMainCanvas
private

◆ fMarkerList

PIntVector PMusrCanvas::fMarkerList
private

list of markers

Definition at line 296 of file PMusrCanvas.h.

Referenced by HandleDataSet(), and HandleNonMusrDataSet().

◆ fMsrHandler

◆ fMultiGraphData

TMultiGraph* PMusrCanvas::fMultiGraphData
private

fMultiGraphData is a 'global' graph needed in order to plot error graphs (data) with (potentially) different x-frames

Definition at line 292 of file PMusrCanvas.h.

Referenced by ClassImpQ(), ExportData(), PlotData(), PlotDifference(), PMusrCanvas(), and ~PMusrCanvas().

◆ fMultiGraphDiff

TMultiGraph* PMusrCanvas::fMultiGraphDiff
private

fMultiGraphDiff is a 'global' graph needed in order to plot error graphs (data-theory) with (potentially) different x-frames

Definition at line 293 of file PMusrCanvas.h.

Referenced by ClassImpQ(), PlotData(), PlotDifference(), PMusrCanvas(), and ~PMusrCanvas().

◆ fMultiGraphLegend

std::unique_ptr<TLegend> PMusrCanvas::fMultiGraphLegend
private

used for non-muSR plots to display a legend

Definition at line 279 of file PMusrCanvas.h.

Referenced by PlotData(), and PlotDifference().

◆ fNonMusrData

PMusrCanvasNonMusrDataList PMusrCanvas::fNonMusrData
private

list of all error graphs to be plotted (non-muSR)

Definition at line 291 of file PMusrCanvas.h.

Referenced by ExportData(), HandleDifference(), HandleNonMusrDataSet(), PlotData(), PlotDifference(), and ~PMusrCanvas().

◆ fParameterPad

std::unique_ptr<TPaveText> PMusrCanvas::fParameterPad
private

parameter pad used to display the fitting parameters

Definition at line 276 of file PMusrCanvas.h.

Referenced by InitMusrCanvas(), and UpdateParamTheoryPad().

◆ fPlotNumber

◆ fPlotType

Int_t PMusrCanvas::fPlotType
private

plot type tag: -1 == undefined, MSR_PLOT_SINGLE_HISTO == single histogram, MSR_PLOT_ASYM == asymmetry, MSR_PLOT_BNMR == beta-NMR asymmetry, MSR_PLOT_MU_MINUS == mu minus (not yet implemented), MSR_PLOT_NON_MUSR == non-muSR

Definition at line 251 of file PMusrCanvas.h.

Referenced by ClassImpQ(), ExportData(), HandleAverage(), HandleDifference(), HandleDifferenceFourier(), HandleFourier(), HandleFourierDifference(), InitMusrCanvas(), PlotAverage(), PlotData(), PlotDifference(), PlotFourier(), PlotFourierDifference(), and UpdateDataTheoryPad().

◆ fPopupFourier

std::unique_ptr<TGPopupMenu> PMusrCanvas::fPopupFourier
private

popup menu of the Musrfit/Fourier sub menu

Definition at line 270 of file PMusrCanvas.h.

Referenced by HandleCmdKey(), HandleMenuPopup(), InitMusrCanvas(), PlotData(), and UpdateDataTheoryPad().

◆ fPopupMain

TGPopupMenu* PMusrCanvas::fPopupMain
private

popup menu Musrfit in the main menu bar

Definition at line 269 of file PMusrCanvas.h.

Referenced by ClassImpQ(), HandleCmdKey(), HandleMenuPopup(), InitMusrCanvas(), and UpdateDataTheoryPad().

◆ fPreviousPlotView

Int_t PMusrCanvas::fPreviousPlotView
private

tag showing the previous plot view

Definition at line 250 of file PMusrCanvas.h.

Referenced by ClassImpQ(), HandleCmdKey(), HandleMenuPopup(), InitMusrCanvas(), PlotData(), and PlotDifference().

◆ fRRFLatexText

std::unique_ptr<TLatex> PMusrCanvas::fRRFLatexText
private

used to display RRF info

Definition at line 260 of file PMusrCanvas.h.

Referenced by PlotAverage(), PlotData(), PlotDifference(), PlotFourier(), PlotFourierDifference(), and SetMsrHandler().

◆ fRRFText

std::unique_ptr<TString> PMusrCanvas::fRRFText
private

RRF information.

Definition at line 259 of file PMusrCanvas.h.

Referenced by PlotAverage(), PlotData(), PlotDifference(), PlotFourier(), PlotFourierDifference(), and SetMsrHandler().

◆ fRunList

PRunListCollection* PMusrCanvas::fRunList
private

data handler

Definition at line 285 of file PMusrCanvas.h.

Referenced by PlotData(), PlotDifference(), SetRunListCollection(), UpdateDataTheoryPad(), and UpdateInfoPad().

◆ fScaleN0AndBkg

Bool_t PMusrCanvas::fScaleN0AndBkg
private

true=N0 and background is scaled to (1/ns), otherwise (1/bin) for the single histogram case

Definition at line 243 of file PMusrCanvas.h.

Referenced by ClassImpQ(), InitMusrCanvas(), PlotAverage(), PlotData(), and SetMsrHandler().

◆ fStartWithAvg

Bool_t PMusrCanvas::fStartWithAvg
private

flag if true, the averaged data/Fourier will be presented

Definition at line 241 of file PMusrCanvas.h.

Referenced by HandleCmdKey(), and UpdateDataTheoryPad().

◆ fStartWithFourier

Bool_t PMusrCanvas::fStartWithFourier
private

flag if true, the Fourier transform will be presented bypassing the time domain representation

Definition at line 240 of file PMusrCanvas.h.

Referenced by HandleFourier(), SaveGraphicsAndQuit(), and UpdateDataTheoryPad().

◆ fStyle

std::unique_ptr<TStyle> PMusrCanvas::fStyle
private

A collection of all graphics attributes.

Definition at line 262 of file PMusrCanvas.h.

Referenced by CreateStyle().

◆ fTheoAsData

Bool_t PMusrCanvas::fTheoAsData
private

flag if true, calculate theory points only at the data points

Definition at line 239 of file PMusrCanvas.h.

Referenced by HandleFourier().

◆ fTheoryPad

std::unique_ptr<TPaveText> PMusrCanvas::fTheoryPad
private

theory pad used to display the theory and functions

Definition at line 277 of file PMusrCanvas.h.

Referenced by InitMusrCanvas(), and UpdateParamTheoryPad().

◆ fTimeout

Int_t PMusrCanvas::fTimeout
private

timeout after which the Done signal should be emited. If timeout <= 0, no timeout is taking place

Definition at line 242 of file PMusrCanvas.h.

Referenced by ClassImpQ(), PMusrCanvas(), and SetTimeout().

◆ fTimeoutTimer

std::unique_ptr<TTimer> PMusrCanvas::fTimeoutTimer
private

timeout timer in order to terminate if no action is taking place for too long

Definition at line 264 of file PMusrCanvas.h.

Referenced by SetTimeout().

◆ fTitlePad

std::unique_ptr<TPaveText> PMusrCanvas::fTitlePad
private

title pad used to display a title

Definition at line 274 of file PMusrCanvas.h.

Referenced by InitMusrCanvas().

◆ fToggleColor

Bool_t PMusrCanvas::fToggleColor
private

tag showing if a single histo theory is color toggled

Definition at line 248 of file PMusrCanvas.h.

Referenced by ClassImpQ(), HandleCmdKey(), and InitMusrCanvas().

◆ fValid

Bool_t PMusrCanvas::fValid
private

if true, everything looks OK

Definition at line 245 of file PMusrCanvas.h.

Referenced by ClassImpQ(), InitMusrCanvas(), IsValid(), UpdateDataTheoryPad(), UpdateInfoPad(), and UpdateParamTheoryPad().

◆ fXmax

Double_t PMusrCanvas::fXmax
private

◆ fXmin

Double_t PMusrCanvas::fXmin
private

◆ fXRangePresent

Bool_t PMusrCanvas::fXRangePresent
private

Definition at line 254 of file PMusrCanvas.h.

Referenced by ClassImpQ(), HandleDataSet(), HandleNonMusrDataSet(), and PMusrCanvas().

◆ fYmax

Double_t PMusrCanvas::fYmax
private

data/theory frame range

Definition at line 255 of file PMusrCanvas.h.

Referenced by ClassImpQ(), HandleDataSet(), HandleNonMusrDataSet(), PlotData(), and PMusrCanvas().

◆ fYmin

Double_t PMusrCanvas::fYmin
private

Definition at line 255 of file PMusrCanvas.h.

Referenced by ClassImpQ(), HandleDataSet(), HandleNonMusrDataSet(), PlotData(), and PMusrCanvas().

◆ fYRangePresent

Bool_t PMusrCanvas::fYRangePresent
private

flag indicating if x-/y-range is present

Definition at line 254 of file PMusrCanvas.h.

Referenced by ClassImpQ(), HandleDataSet(), HandleNonMusrDataSet(), PlotData(), and PMusrCanvas().


The documentation for this class was generated from the following files: