Analysis-Utilities 26.9.9
C++/ROOT utilities for nuclear measurement data analysis
Loading...
Searching...
No Matches
InteractiveFitEditor.hpp File Reference
#include "FittingUtils.hpp"
#include <TCanvas.h>
#include <TGButton.h>
#include <TGClient.h>
#include <TGDoubleSlider.h>
#include <TGFrame.h>
#include <TGLabel.h>
#include <TGNumberEntry.h>
#include <TGSlider.h>
#include <TGTab.h>
#include <TGraph.h>
#include <TLatex.h>
#include <TMath.h>
#include <TPad.h>
#include <TRootEmbeddedCanvas.h>
#include <TSystem.h>
#include <TTimer.h>
#include <iostream>
Include dependency graph for InteractiveFitEditor.hpp:

Go to the source code of this file.

Classes

class  InteractiveFitEditor
 Interactive editor for a TF1 fit from FittingUtils. More...

Functions

Bool_t LaunchInteractiveFitEditor (TH1 *hist, TF1 *fit_func, Double_t range_low, Double_t range_high, Int_t num_peaks, const TString &info_label)
 Open the editor and pump its event loop until the user is done.

Function Documentation

◆ LaunchInteractiveFitEditor()

Bool_t LaunchInteractiveFitEditor ( TH1 * hist,
TF1 * fit_func,
Double_t range_low,
Double_t range_high,
Int_t num_peaks,
const TString & info_label )

Open the editor and pump its event loop until the user is done.

Disables ROOT batch mode for the duration and restores it afterwards, so ordinary plot output is unaffected, and installs the tolerant X error handler from InteractiveEditorX11Guard.hpp around the loop.

Parameters
histHistogram being fitted.
fit_funcFit function, updated in place if the user accepts.
range_lowInitial lower fit bound.
range_highInitial upper fit bound.
num_peaksPeaks in the model, 1 to 3.
info_labelOptional annotation shown in the editor.
Returns
kTRUE if the user accepted; kFALSE on cancel, in which case fit_func is left as it was.

Definition at line 1037 of file InteractiveFitEditor.cpp.