Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
fitpanel6.cxx
Go to the documentation of this file.
1/// \file
2/// \ingroup tutorial_v7
3///
4/// \macro_code
5///
6/// \date 2019-04-11
7/// \warning This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback is welcome!
8/// \authors Sergey Linev <S.Linev@gsi.de>, Iliana Betsou <Iliana.Betsou@cern.ch>
9
10/*************************************************************************
11 * Copyright (C) 1995-2019, Rene Brun and Fons Rademakers. *
12 * All rights reserved. *
13 * *
14 * For the licensing terms see $ROOTSYS/LICENSE. *
15 * For the list of contributors see $ROOTSYS/README/CREDITS. *
16 *************************************************************************/
17
18#include <ROOT/RFitPanel.hxx>
19#include "ROOT/RDirectory.hxx"
20#include "TH1.h"
21#include "TFile.h"
22
23using namespace ROOT::Experimental;
24
25void fitpanel6()
26{
27 TFile::Open("hsimple.root");
28 if (gFile) {
29 gFile->Get("hpx");
30 gFile->Get("hpxpy");
31 gFile->Get("hprof");
32 }
33
34 // create panel
35 auto panel = std::make_shared<RFitPanel>("FitPanel");
36 RDirectory::Heap().Add("fitpanel", panel);
37
38 TH1F *test = new TH1F("test","This is test histogram",100,-4,4);
39 test->FillRandom("gaus", 10000);
40
41 panel->AssignHistogram(test);
42
43 panel->Show();
44}
45
#define gFile
Definition TFile.h:342
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:4053
1-D histogram with a float per channel (see TH1 documentation)}
Definition TH1.h:577
Definition test.py:1