Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RNTupleDraw6Provider.cxx
Go to the documentation of this file.
1/*************************************************************************
2 * Copyright (C) 1995-2025, 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 "TVirtualPad.h"
10#include "TClass.h"
11
12#include "RFieldProvider.hxx"
14
15// ==============================================================================================
16
17/** \class RNTupleDraw6Provider
18\ingroup rbrowser
19\brief Provider for RNTuple drawing on TCanvas
20\author Sergey Linev <S.Linev@gsi.de>
21\date 2021-03-09
22\warning This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback is
23welcome!
24*/
25
27private:
30
31public:
33 {
34 RegisterDraw6(TClass::GetClass<ROOT::RNTuple>(),
35 [this](TVirtualPad *pad, std::unique_ptr<RHolder> &obj, const std::string &opt) -> bool {
36 auto visHolder = dynamic_cast<RVisualizationHolder *>(obj.get());
37 if (visHolder) {
39 if (!treeMap)
40 return false;
41
42 treeMap->Paint(opt.c_str());
43 return true;
44 }
45
46 auto fieldHolder = dynamic_cast<RFieldHolder *>(obj.get());
47 if (fieldHolder) {
49 if (!h1)
50 return false;
51
52 pad->Add(h1, opt.c_str());
53 return true;
54 }
55 return false;
56 });
57 }
RNTupleDraw6Provider newRNTupleDraw6Provider
Base class for provider of RNTuple drawing.
TH1 * DrawField(RFieldHolder *holder)
Provider for RNTuple drawing on TCanvas.
RVisualizationProvider visualizationProvider
Provider of different browsing methods for supported classes.
Definition RProvider.hxx:37
void RegisterDraw6(const TClass *cl, Draw6Func_t func)
Holder for RNTuple visualization data.
Provider for RNTuple TreeMap visualization on TCanvas.
std::unique_ptr< ROOT::Experimental::RTreeMapPainter > CreateTreeMap(RVisualizationHolder *holder) const
Create TreeMap visualization for RNTuple.
TVirtualPad is an abstract base class for the Pad and Canvas classes.
Definition TVirtualPad.h:51
TH1F * h1
Definition legend1.C:5