|
Analysis-Utilities 26.9.9
C++/ROOT utilities for nuclear measurement data analysis
|
Interactive editor for a TF1 fit from FittingUtils. More...
#include <InteractiveFitEditor.hpp>
Public Member Functions | |
| InteractiveFitEditor (const TGWindow *parent, TH1 *hist, TF1 *fit_func, Double_t range_low, Double_t range_high, Int_t num_peaks, const TString &info_label="") | |
| Build the editor around an existing histogram and fit function. | |
| virtual | ~InteractiveFitEditor () |
| Destroys the widgets and drawing objects the editor created. | |
| virtual Bool_t | ProcessMessage (Long_t msg, Long_t parm1, Long_t parm2) |
| ROOT GUI message dispatch for every widget in the editor. | |
| virtual Bool_t | HandleTimer (TTimer *timer) |
| Redraw tick. | |
| virtual void | CloseWindow () |
| Window-manager close. Treated as a cancel, not an accept. | |
| Bool_t | WasAccepted () const |
| Whether the user accepted rather than cancelled. | |
| Bool_t | IsDone () const |
| Whether the editor has finished and the loop may exit. | |
| TTimer * | GetRedrawTimer () |
| The coalescing redraw timer, for the driving event loop. | |
| TRootEmbeddedCanvas * | GetEmbeddedCanvas () |
| The canvas holding the fit and residual pads. | |
Interactive editor for a TF1 fit from FittingUtils.
The fit and residual pads update live as parameters move. Parameters can be fixed or freed individually, bounds edited, and Refit re-runs the minimiser from the current values as starting points. The residual panel is marked with dashed guide lines at plus and minus three sigma.
Definition at line 39 of file InteractiveFitEditor.hpp.
| InteractiveFitEditor::InteractiveFitEditor | ( | const TGWindow * | parent, |
| TH1 * | hist, | ||
| TF1 * | fit_func, | ||
| Double_t | range_low, | ||
| Double_t | range_high, | ||
| Int_t | num_peaks, | ||
| const TString & | info_label = "" ) |
Build the editor around an existing histogram and fit function.
| parent | Parent window, normally gClient->GetRoot(). |
| hist | Histogram being fitted. Borrowed. |
| fit_func | Fit function, edited in place. Borrowed. |
| range_low | Initial lower fit bound. |
| range_high | Initial upper fit bound. |
| num_peaks | Peaks in the model, 1 to 3; decides the tab layout. |
| info_label | Optional annotation shown in the editor. |
Definition at line 5 of file InteractiveFitEditor.cpp.
|
virtual |
Destroys the widgets and drawing objects the editor created.
Definition at line 97 of file InteractiveFitEditor.cpp.
|
virtual |
Window-manager close. Treated as a cancel, not an accept.
Definition at line 934 of file InteractiveFitEditor.cpp.
|
inline |
The canvas holding the fit and residual pads.
Definition at line 188 of file InteractiveFitEditor.hpp.
Referenced by LaunchInteractiveFitEditor().
|
inline |
The coalescing redraw timer, for the driving event loop.
Definition at line 185 of file InteractiveFitEditor.hpp.
Referenced by LaunchInteractiveFitEditor().
|
virtual |
Redraw tick.
Parameter edits set a dirty flag rather than redrawing inline; this coalesces them so dragging a slider does not queue one full redraw per pixel of travel.
| timer | Timer that fired. |
Definition at line 927 of file InteractiveFitEditor.cpp.
|
inline |
Whether the editor has finished and the loop may exit.
Definition at line 182 of file InteractiveFitEditor.hpp.
Referenced by LaunchInteractiveFitEditor().
|
virtual |
ROOT GUI message dispatch for every widget in the editor.
| msg | Encoded message type and subtype. |
| parm1 | Widget id that raised it. |
| parm2 | Message-specific payload. |
Definition at line 864 of file InteractiveFitEditor.cpp.
|
inline |
Whether the user accepted rather than cancelled.
Definition at line 180 of file InteractiveFitEditor.hpp.
Referenced by LaunchInteractiveFitEditor().