Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
fitpanel.cxx File Reference

Detailed Description

/*************************************************************************
* Copyright (C) 1995-2015, Rene Brun and Fons Rademakers. *
* All rights reserved. *
* *
* For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/
#include "ROOT/RHist.hxx"
#include "ROOT/RCanvas.hxx"
using namespace ROOT::Experimental;
void fitpanel() {
RAxisConfig xaxis(10, 0., 10.);
// Create the histogram.
auto pHist = std::make_shared<RH1D>(xaxis);
// Fill a few points.
pHist->Fill(1);
pHist->Fill(2);
pHist->Fill(2);
pHist->Fill(3);
auto canvas = RCanvas::Create("RCanvas with histogram");
canvas->Draw(pHist); //->SetLineColor(RColor::kRed);
canvas->Show();
canvas->Update(); // need to ensure canvas is drawn
auto panel = std::make_shared<RFitPanel>("FitPanel Title");
// TODO: how combine there methods together
// here std::shread_ptr<> on both sides
panel->AssignCanvas(canvas);
panel->AssignHistogram(pHist);
canvas->AddPanel(panel);
// preserve panel alive until connection is closed
canvas->ClearOnClose(panel);
}
Objects used to configure the different axis types.
Date
2015-03-22
Warning
This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback is welcome!
Author
Axel Naumann axel@.nosp@m.cern.nosp@m..ch

Definition in file fitpanel.cxx.