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 {
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) {
38 auto treeMap = visualizationProvider.CreateTreeMap(visHolder);
39 if (!treeMap)
40 return false;
41
42 pad->Add(treeMap.release(), opt.c_str());
43 return true;
44 }
45
46 auto fieldHolder = dynamic_cast<RFieldHolder *>(obj.get());
47 if (fieldHolder) {
48 auto h1 = fieldProvider.DrawField(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.
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.
static TClass * GetClass(const char *name, Bool_t load=kTRUE, Bool_t silent=kFALSE)
Static method returning pointer to TClass of the specified class name.
Definition TClass.cxx:2994
TVirtualPad is an abstract base class for the Pad and Canvas classes.
Definition TVirtualPad.h:51
virtual void Add(TObject *obj, Option_t *opt="", Bool_t modified=kTRUE)=0
TH1F * h1
Definition legend1.C:5