Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RNTupleDraw7Provider.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 "TClass.h"
10
11#include <ROOT/RCanvas.hxx>
13
14#include "RFieldProvider.hxx"
16
17using namespace ROOT::Browsable;
18
19// ==============================================================================================
20
21/** \class RNTupleDraw7Provider
22\ingroup rbrowser
23\brief Provider for RNTuple drawing on RCanvas
24\author Sergey Linev <S.Linev@gsi.de>
25\date 2021-03-09
26\warning This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback is
27welcome!
28*/
29
31private:
34
35public:
37 {
38 RegisterDraw7(TClass::GetClass<ROOT::RNTuple>(),
39 [this](std::shared_ptr<ROOT::Experimental::RPadBase> &subpad, std::unique_ptr<RHolder> &obj,
40 const std::string &opt) -> bool {
41 auto visHolder = dynamic_cast<RVisualizationHolder *>(obj.get());
42 if (visHolder) {
44 if (!treeMap)
45 return false;
46
47 std::shared_ptr<ROOT::Experimental::RTreeMapPainter> shared;
48 shared.reset(treeMap.release());
49
51 return true;
52 }
53
54 auto fieldHolder = dynamic_cast<RFieldHolder *>(obj.get());
55 if (fieldHolder) {
57 if (!h1)
58 return false;
59
60 std::shared_ptr<TH1> shared;
61 shared.reset(h1);
62
64 return true;
65 }
66
67 return false;
68 });
69 }
RNTupleDraw7Provider newRNTupleDraw7Provider
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Base class for provider of RNTuple drawing.
TH1 * DrawField(RFieldHolder *holder)
Provider for RNTuple drawing on RCanvas.
RVisualizationProvider visualizationProvider
Provider of different browsing methods for supported classes.
Definition RProvider.hxx:37
void RegisterDraw7(const TClass *cl, Draw7Func_t func)
Provides v7 drawing facilities for TObject types (TGraph, TH1, TH2, etc).
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.
TH1F * h1
Definition legend1.C:5