ROOT
v6-28
Reference Guide
Loading...
Searching...
No Matches
RHistDraw7Provider.cxx
Go to the documentation of this file.
1
/// \file RHistDraw7Provider.cxx
2
/// \ingroup rbrowser
3
/// \author Bertrand Bellenot <bertrand.bellenot@cern.ch>
4
/// \author Sergey Linev <S.Linev@gsi.de>
5
/// \date 2019-10-17
6
/// \warning This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback
7
/// is welcome!
8
9
/*************************************************************************
10
* Copyright (C) 1995-2019, Rene Brun and Fons Rademakers. *
11
* All rights reserved. *
12
* *
13
* For the licensing terms see $ROOTSYS/LICENSE. *
14
* For the list of contributors see $ROOTSYS/README/CREDITS. *
15
*************************************************************************/
16
17
#include <
ROOT/Browsable/RProvider.hxx
>
18
#include <
ROOT/RHistDrawable.hxx
>
19
20
#include <
ROOT/RCanvas.hxx
>
21
22
using namespace
ROOT::Experimental::Browsable
;
23
24
class
RV7HistDrawProvider
:
public
RProvider
{
25
template
<
class
HistClass>
26
void
RegisterHistClass
()
27
{
28
RegisterDraw7
(TClass::GetClass<HistClass>(), [] (std::shared_ptr<ROOT::Experimental::RPadBase> &subpad, std::unique_ptr<RHolder> &obj,
const
std::string &) ->
bool
{
29
auto
hist = obj->get_shared<HistClass>();
30
if
(!hist)
return
false
;
31
32
subpad->Draw(hist);
33
return
true
;
34
});
35
}
36
37
public
:
38
39
RV7HistDrawProvider
()
40
{
41
RegisterHistClass<ROOT::Experimental::RH1D>();
42
RegisterHistClass<ROOT::Experimental::RH2D>();
43
RegisterHistClass<ROOT::Experimental::RH3D>();
44
}
45
46
}
newRV7HistDrawProvider
;
RCanvas.hxx
newRV7HistDrawProvider
RV7HistDrawProvider newRV7HistDrawProvider
RHistDrawable.hxx
RProvider.hxx
ROOT::Experimental::Browsable::RProvider
Provider of different browsing methods for supported classes.
Definition
RProvider.hxx:36
ROOT::Experimental::Browsable::RProvider::RegisterDraw7
void RegisterDraw7(const TClass *cl, Draw7Func_t func)
Definition
RProvider.cxx:127
RV7HistDrawProvider
Definition
RHistDraw7Provider.cxx:24
RV7HistDrawProvider::RV7HistDrawProvider
RV7HistDrawProvider()
Definition
RHistDraw7Provider.cxx:39
RV7HistDrawProvider::RegisterHistClass
void RegisterHistClass()
Definition
RHistDraw7Provider.cxx:26
ROOT::Experimental::Browsable
Definition
RAnyObjectHolder.hxx:16
gui
browsable
src
RHistDraw7Provider.cxx
ROOT v6-28 - Reference Guide Generated on Thu Oct 24 2024 01:49:19 (GVA Time) using Doxygen 1.9.8