Logo ROOT  
Reference Guide
ROOT::Experimental::RFitPanel Class Reference

web-based FitPanel prototype.

Definition at line 37 of file RFitPanel.hxx.

Classes

struct  FitRes
 

Public Member Functions

 RFitPanel (const std::string &title="Fit panel")
 Constructor. More...
 
 ~RFitPanel ()
 Destructor. More...
 
void AssignCanvas (const std::string &cname)
 
void AssignCanvas (std::shared_ptr< RCanvas > &canv)
 assign canvas to use for drawing results of fitting or showing fitpanel itself More...
 
void AssignHistogram (const std::string &hname)
 Assign histogram name to use with fit panel - it should be available in gDirectory. More...
 
void AssignHistogram (std::shared_ptr< RH1D > &hist)
 assign histogram for fitting More...
 
void AssignHistogram (TH1 *hist)
 Assign histogram to use with fit panel - without ownership. More...
 
std::shared_ptr< RWebWindowGetWindow ()
 Returns RWebWindow instance, used to display FitPanel. More...
 
void Hide ()
 hide FitPanel More...
 
void Show (const std::string &where="")
 show FitPanel in specified place More...
 

Private Member Functions

TF1copyTF1 (TF1 *f)
 Copies f into a new TF1 to be stored in the fitpanel with it's own ownership. More...
 
bool DoDraw ()
 Perform drawing using current model settings Returns true if any action was done. More...
 
bool DoFit ()
 Perform fitting using current model settings Returns true if any action was done. More...
 
TFitResultFindFitResult (const std::string &funcid)
 Creates new instance to make fitting. More...
 
TF1FindFunction (const std::string &funcid)
 Search for existing functions, ownership still belongs to FitPanel or global lists. More...
 
Color_t GetColor (const std::string &colorid)
 Extract color from string Should be coded as #ff00ff string. More...
 
TPadGetDrawPad (TObject *obj, bool force=false)
 Returns pad where histogram is drawn If canvas not exists, create new one. More...
 
std::unique_ptr< TF1GetFitFunction (const std::string &funcid)
 Creates new instance to make fitting. More...
 
RFitPanelModel::EFitObjectType GetFitObjectType (TObject *obj)
 Returns kind of object. More...
 
void GetFunctionsFromSystem ()
 Looks for all the functions registered in the current ROOT session. More...
 
TObjectGetSelectedObject (const std::string &objid)
 Returns object based on it string id Searches either in gDirectory or in internal panel list. More...
 
TObjectMakeConfidenceLevels (TFitResult *res)
 Create confidence levels drawing tab. More...
 
RFitPanelModelmodel ()
 Return reference on model object Model created if was not exists before. More...
 
void ProcessData (unsigned connid, const std::string &arg)
 Process data from FitPanel OpenUI5-based FitPanel sends commands or status changes. More...
 
void SelectFunction (const std::string &funcid)
 Select fit function. More...
 
void SelectObject (const std::string &objid)
 Select object for fitting. More...
 
void SendModel ()
 Send model object to the client. More...
 
void UpdateDataSet ()
 Update list of available data. More...
 
void UpdateFunctionsList ()
 Update list of available functions. More...
 
int UpdateModel (const std::string &json)
 Update fit model returns -1 if JSON fails return 0 if nothing large changed return 1 if important selection are changed and client need to be updated. More...
 

Private Attributes

std::shared_ptr< RCanvasfCanvas
 ! v7 canvas used to display results More...
 
std::string fCanvName
 ! v6 canvas name used to display fit, will be created if not exists More...
 
unsigned fConnId {0}
 ! client connection id More...
 
std::shared_ptr< RH1DfFitHist
 ! v7 histogram for fitting More...
 
std::unique_ptr< RFitPanelModelfModel
 
std::vector< TObject * > fObjects
 ! objects provided directly to panel for fitting More...
 
std::string fPadName
 ! v6 pad name in the canvas, where object is (was) drawn More...
 
std::list< FitResfPrevRes
 ! all previous functions used for fitting More...
 
std::vector< std::unique_ptr< TF1 > > fSystemFuncs
 ! local copy of all internal system funcs More...
 
std::shared_ptr< RWebWindowfWindow
 ! configured display More...
 

#include <ROOT/RFitPanel.hxx>

Constructor & Destructor Documentation

◆ RFitPanel()

ROOT::Experimental::RFitPanel::RFitPanel ( const std::string &  title = "Fit panel")

Constructor.

Definition at line 76 of file RFitPanel.cxx.

◆ ~RFitPanel()

ROOT::Experimental::RFitPanel::~RFitPanel ( )

Destructor.

Definition at line 86 of file RFitPanel.cxx.

Member Function Documentation

◆ AssignCanvas() [1/2]

void ROOT::Experimental::RFitPanel::AssignCanvas ( const std::string &  cname)
inline

Definition at line 107 of file RFitPanel.hxx.

◆ AssignCanvas() [2/2]

void ROOT::Experimental::RFitPanel::AssignCanvas ( std::shared_ptr< RCanvas > &  canv)

assign canvas to use for drawing results of fitting or showing fitpanel itself

Definition at line 323 of file RFitPanel.cxx.

◆ AssignHistogram() [1/3]

void ROOT::Experimental::RFitPanel::AssignHistogram ( const std::string &  hname)

Assign histogram name to use with fit panel - it should be available in gDirectory.

Definition at line 314 of file RFitPanel.cxx.

◆ AssignHistogram() [2/3]

void ROOT::Experimental::RFitPanel::AssignHistogram ( std::shared_ptr< RH1D > &  hist)

assign histogram for fitting

Definition at line 335 of file RFitPanel.cxx.

◆ AssignHistogram() [3/3]

void ROOT::Experimental::RFitPanel::AssignHistogram ( TH1 hist)

Assign histogram to use with fit panel - without ownership.

Definition at line 305 of file RFitPanel.cxx.

◆ copyTF1()

TF1 * ROOT::Experimental::RFitPanel::copyTF1 ( TF1 f)
private

Copies f into a new TF1 to be stored in the fitpanel with it's own ownership.

This is taken from Fit::StoreAndDrawFitFunction in HFitImpl.cxx

Definition at line 547 of file RFitPanel.cxx.

◆ DoDraw()

bool ROOT::Experimental::RFitPanel::DoDraw ( )
private

Perform drawing using current model settings Returns true if any action was done.

Definition at line 871 of file RFitPanel.cxx.

◆ DoFit()

bool ROOT::Experimental::RFitPanel::DoFit ( )
private

Perform fitting using current model settings Returns true if any action was done.

Definition at line 686 of file RFitPanel.cxx.

◆ FindFitResult()

TFitResult * ROOT::Experimental::RFitPanel::FindFitResult ( const std::string &  funcid)
private

Creates new instance to make fitting.

Definition at line 457 of file RFitPanel.cxx.

◆ FindFunction()

TF1 * ROOT::Experimental::RFitPanel::FindFunction ( const std::string &  funcid)
private

Search for existing functions, ownership still belongs to FitPanel or global lists.

Definition at line 433 of file RFitPanel.cxx.

◆ GetColor()

Color_t ROOT::Experimental::RFitPanel::GetColor ( const std::string &  colorid)
private

Extract color from string Should be coded as #ff00ff string.

Definition at line 790 of file RFitPanel.cxx.

◆ GetDrawPad()

TPad * ROOT::Experimental::RFitPanel::GetDrawPad ( TObject obj,
bool  force = false 
)
private

Returns pad where histogram is drawn If canvas not exists, create new one.

Definition at line 625 of file RFitPanel.cxx.

◆ GetFitFunction()

std::unique_ptr< TF1 > ROOT::Experimental::RFitPanel::GetFitFunction ( const std::string &  funcid)
private

Creates new instance to make fitting.

Definition at line 473 of file RFitPanel.cxx.

◆ GetFitObjectType()

ROOT::Experimental::RFitPanelModel::EFitObjectType ROOT::Experimental::RFitPanel::GetFitObjectType ( TObject obj)
private

Returns kind of object.

Definition at line 242 of file RFitPanel.cxx.

◆ GetFunctionsFromSystem()

void ROOT::Experimental::RFitPanel::GetFunctionsFromSystem ( )
private

Looks for all the functions registered in the current ROOT session.

Definition at line 588 of file RFitPanel.cxx.

◆ GetSelectedObject()

TObject * ROOT::Experimental::RFitPanel::GetSelectedObject ( const std::string &  objid)
private

Returns object based on it string id Searches either in gDirectory or in internal panel list.

Definition at line 223 of file RFitPanel.cxx.

◆ GetWindow()

std::shared_ptr< ROOT::Experimental::RWebWindow > ROOT::Experimental::RFitPanel::GetWindow ( )

Returns RWebWindow instance, used to display FitPanel.

Definition at line 94 of file RFitPanel.cxx.

◆ Hide()

void ROOT::Experimental::RFitPanel::Hide ( )

hide FitPanel

Hide FitPanel.

Definition at line 351 of file RFitPanel.cxx.

◆ MakeConfidenceLevels()

TObject * ROOT::Experimental::RFitPanel::MakeConfidenceLevels ( TFitResult result)
private

Create confidence levels drawing tab.

Then it call Virtual Fitter to perform it.

Definition at line 801 of file RFitPanel.cxx.

◆ model()

ROOT::Experimental::RFitPanelModel & ROOT::Experimental::RFitPanel::model ( )
private

Return reference on model object Model created if was not exists before.

Definition at line 362 of file RFitPanel.cxx.

◆ ProcessData()

void ROOT::Experimental::RFitPanel::ProcessData ( unsigned  connid,
const std::string &  arg 
)
private

Process data from FitPanel OpenUI5-based FitPanel sends commands or status changes.

Definition at line 387 of file RFitPanel.cxx.

◆ SelectFunction()

void ROOT::Experimental::RFitPanel::SelectFunction ( const std::string &  funcid)
private

Select fit function.

Definition at line 295 of file RFitPanel.cxx.

◆ SelectObject()

void ROOT::Experimental::RFitPanel::SelectObject ( const std::string &  objid)
private

Select object for fitting.

Definition at line 144 of file RFitPanel.cxx.

◆ SendModel()

void ROOT::Experimental::RFitPanel::SendModel ( )
private

Send model object to the client.

Definition at line 375 of file RFitPanel.cxx.

◆ Show()

void ROOT::Experimental::RFitPanel::Show ( const std::string &  where = "")

show FitPanel in specified place

Show FitPanel.

Definition at line 343 of file RFitPanel.cxx.

◆ UpdateDataSet()

void ROOT::Experimental::RFitPanel::UpdateDataSet ( )
private

Update list of available data.

Definition at line 122 of file RFitPanel.cxx.

◆ UpdateFunctionsList()

void ROOT::Experimental::RFitPanel::UpdateFunctionsList ( )
private

Update list of available functions.

Definition at line 268 of file RFitPanel.cxx.

◆ UpdateModel()

int ROOT::Experimental::RFitPanel::UpdateModel ( const std::string &  json)
private

Update fit model returns -1 if JSON fails return 0 if nothing large changed return 1 if important selection are changed and client need to be updated.

Definition at line 510 of file RFitPanel.cxx.

Member Data Documentation

◆ fCanvas

std::shared_ptr<RCanvas> ROOT::Experimental::RFitPanel::fCanvas
private

! v7 canvas used to display results

Definition at line 45 of file RFitPanel.hxx.

◆ fCanvName

std::string ROOT::Experimental::RFitPanel::fCanvName
private

! v6 canvas name used to display fit, will be created if not exists

Definition at line 42 of file RFitPanel.hxx.

◆ fConnId

unsigned ROOT::Experimental::RFitPanel::fConnId {0}
private

! client connection id

Definition at line 49 of file RFitPanel.hxx.

◆ fFitHist

std::shared_ptr<RH1D> ROOT::Experimental::RFitPanel::fFitHist
private

! v7 histogram for fitting

Definition at line 46 of file RFitPanel.hxx.

◆ fModel

std::unique_ptr<RFitPanelModel> ROOT::Experimental::RFitPanel::fModel
private

Definition at line 39 of file RFitPanel.hxx.

◆ fObjects

std::vector<TObject*> ROOT::Experimental::RFitPanel::fObjects
private

! objects provided directly to panel for fitting

Definition at line 41 of file RFitPanel.hxx.

◆ fPadName

std::string ROOT::Experimental::RFitPanel::fPadName
private

! v6 pad name in the canvas, where object is (was) drawn

Definition at line 43 of file RFitPanel.hxx.

◆ fPrevRes

std::list<FitRes> ROOT::Experimental::RFitPanel::fPrevRes
private

! all previous functions used for fitting

Definition at line 62 of file RFitPanel.hxx.

◆ fSystemFuncs

std::vector<std::unique_ptr<TF1> > ROOT::Experimental::RFitPanel::fSystemFuncs
private

! local copy of all internal system funcs

Definition at line 51 of file RFitPanel.hxx.

◆ fWindow

std::shared_ptr<RWebWindow> ROOT::Experimental::RFitPanel::fWindow
private

! configured display

Definition at line 48 of file RFitPanel.hxx.


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