Logo ROOT  
Reference Guide
fitpanel6.cxx File Reference

Detailed Description

/*************************************************************************
* 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. *
*************************************************************************/
#include <ROOT/RFitPanel.hxx>
#include "TH1.h"
#include "TFile.h"
using namespace ROOT::Experimental;
void fitpanel6()
{
TFile::Open("hsimple.root");
if (gFile) {
gFile->Get("hpx");
gFile->Get("hpxpy");
gFile->Get("hprof");
}
// create panel
auto panel = std::make_shared<RFitPanel>("FitPanel");
RDirectory::Heap().Add("fitpanel", panel);
TH1F *test = new TH1F("test","This is test histogram",100,-4,4);
test->FillRandom("gaus", 10000);
panel->AssignHistogram(test);
panel->Show();
}
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!
Author
Sergey Linev S.Lin.nosp@m.ev@g.nosp@m.si.de

Definition in file fitpanel6.cxx.

ROOT::Experimental::RDirectory::Add
void Add(std::string_view name, const std::shared_ptr< T > &ptr)
Add an existing object (rather a shared_ptr to it) to the RDirectory.
Definition: RDirectory.hxx:184
gFile
#define gFile
Definition: TFile.h:343
TFile::Open
static TFile * Open(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=ROOT::RCompressionSetting::EDefaults::kUseCompiledDefault, Int_t netopt=0)
Create / open a file.
Definition: TFile.cxx:3946
RDirectory.hxx
test
Definition: test.py:1
TFile.h
TH1F
1-D histogram with a float per channel (see TH1 documentation)}
Definition: TH1.h:572
ROOT::Experimental::RDirectory::Heap
static RDirectory & Heap()
Dedicated, process-wide RDirectory.
Definition: RFile.cxx:23
ROOT::Experimental
Definition: RDirectory.hxx:36
TH1.h