// Authors: Sergey Linev Iliana Betsou // Date: 2019-04-11 // Warning: This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback is welcome! /************************************************************************* * Copyright (C) 1995-2019, Rene Brun and Fons Rademakers. * * All rights reserved. * * * * For the licensing terms see $ROOTSYS/LICENSE. * * For the list of contributors see $ROOTSYS/README/CREDITS. * *************************************************************************/ #ifndef ROOT_RFitPanel #define ROOT_RFitPanel #include #include #include #include "ROOT/RHist.hxx" #include "TFitResultPtr.h" #include #include #include class TPad; class TH1; class TF1; namespace ROOT { namespace Experimental { class RFitPanel { std::unique_ptr fModel; std::vector fObjects; /// fCanvas; /// fFitHist; /// fWindow; ///> fSystemFuncs; /// func; // function TFitResultPtr res; // result FitRes() = default; FitRes(const std::string &_objid, std::unique_ptr &_func, TFitResultPtr &_res); ~FitRes(); }; std::list fPrevRes; /// GetFitFunction(const std::string &funcid); void SelectFunction(const std::string &funcid); TObject *MakeConfidenceLevels(TFitResult *res); Color_t GetColor(const std::string &colorid); TPad *GetDrawPad(TObject *obj, bool force = false); void DoPadUpdate(TPad *pad); void SendModel(); bool DoFit(); bool DoDraw(); public: RFitPanel(const std::string &title = "Fit panel"); ~RFitPanel(); // method required when any panel want to be inserted into the RCanvas std::shared_ptr GetWindow(); void AssignHistogram(TH1 *hist); void AssignHistogram(const std::string &hname); void AssignCanvas(const std::string &cname) { fCanvName = cname; } void AssignCanvas(std::shared_ptr &canv); void AssignHistogram(std::shared_ptr &hist); /// show FitPanel in specified place void Show(const std::string &where = ""); /// hide FitPanel void Hide(); void ClearOnClose(const std::shared_ptr &handle); }; } // namespace Experimental } // namespace ROOT #endif