ROOT
v6-28
Reference Guide
Loading...
Searching...
No Matches
RNTupleDraw7Provider.cxx
Go to the documentation of this file.
1
/*************************************************************************
2
* Copyright (C) 1995-2021, Rene Brun and Fons Rademakers. *
3
* All rights reserved. *
4
* *
5
* For the licensing terms see $ROOTSYS/LICENSE. *
6
* For the list of contributors see $ROOTSYS/README/CREDITS. *
7
*************************************************************************/
8
9
#include "
TClass.h
"
10
11
#include <
ROOT/RCanvas.hxx
>
12
#include <
ROOT/TObjectDrawable.hxx
>
13
14
#include "
RFieldProvider.hxx
"
15
16
using namespace
ROOT::Experimental
;
17
18
// ==============================================================================================
19
20
/** \class RNTupleDraw7Provider
21
\ingroup rbrowser
22
\brief Provider for RNTuple drawing on RCanvas
23
\author Sergey Linev <S.Linev@gsi.de>
24
\date 2021-03-09
25
\warning This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback is welcome!
26
*/
27
28
class
RNTupleDraw7Provider
:
public
RFieldProvider
{
29
30
public
:
31
32
RNTupleDraw7Provider
()
33
{
34
RegisterDraw7
(TClass::GetClass<ROOT::Experimental::RNTuple>(), [
this
](std::shared_ptr<RPadBase> &subpad, std::unique_ptr<RHolder> &obj,
const
std::string &opt) ->
bool
{
35
36
auto
h1
=
DrawField
(
dynamic_cast<
RFieldHolder
*
>
(obj.get()));
37
if
(!
h1
)
return
false
;
38
39
std::shared_ptr<TH1> shared;
40
shared.reset(
h1
);
41
42
subpad->Draw<
ROOT::Experimental::TObjectDrawable
>(shared, opt);
43
subpad->GetCanvas()->Update(
true
);
44
return
true
;
45
});
46
}
47
48
}
newRNTupleDraw7Provider
;
49
RCanvas.hxx
RFieldProvider.hxx
newRNTupleDraw7Provider
RNTupleDraw7Provider newRNTupleDraw7Provider
TClass.h
TObjectDrawable.hxx
RFieldHolder
Definition
RFieldHolder.hxx:27
RFieldProvider
Base class for provider of RNTuple drawing.
Definition
RFieldProvider.hxx:44
RFieldProvider::DrawField
TH1 * DrawField(RFieldHolder *holder)
Definition
RFieldProvider.hxx:170
RNTupleDraw7Provider
Provider for RNTuple drawing on RCanvas.
Definition
RNTupleDraw7Provider.cxx:28
RNTupleDraw7Provider::RNTupleDraw7Provider
RNTupleDraw7Provider()
Definition
RNTupleDraw7Provider.cxx:32
ROOT::Experimental::Browsable::RProvider::RegisterDraw7
void RegisterDraw7(const TClass *cl, Draw7Func_t func)
Definition
RProvider.cxx:127
ROOT::Experimental::TObjectDrawable
Provides v7 drawing facilities for TObject types (TGraph, TH1, TH2, etc).
Definition
TObjectDrawable.hxx:37
h1
TH1F * h1
Definition
legend1.C:5
ROOT::Experimental
Definition
RDirectory.hxx:30
gui
browsable
src
RNTupleDraw7Provider.cxx
ROOT v6-28 - Reference Guide Generated on Thu Oct 24 2024 01:49:19 (GVA Time) using Doxygen 1.9.8