-
Notifications
You must be signed in to change notification settings - Fork 1.3k
/
Copy pathfitpanel6.cxx
43 lines (34 loc) · 1.27 KB
/
fitpanel6.cxx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/// \file
/// \ingroup tutorial_exp
///
/// \macro_code
///
/// \date 2019-04-11
/// \warning This is part of the experimental API, which might change in the future. Feedback is welcome!
/// \authors Sergey Linev <S.Linev@gsi.de>, Iliana Betsou <Iliana.Betsou@cern.ch>
/*************************************************************************
* 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"
void fitpanel6()
{
TFile::Open("hsimple.root");
if (gFile) {
gFile->Get("hpx");
gFile->Get("hpxpy");
gFile->Get("hprof");
}
// create panel
auto panel = std::make_shared<ROOT::Experimental::RFitPanel>("FitPanel");
TH1F *test = new TH1F("test","This is test histogram",100,-4,4);
test->FillRandom("gaus", 10000);
panel->AssignHistogram(test);
panel->Show();
panel->ClearOnClose(panel);
}