Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RNTupleDraw6Provider.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 "TVirtualPad.h"
10#include "TClass.h"
11
12#include "RFieldProvider.hxx"
13
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 welcome!
23*/
24
26
27public:
28
30 {
31 RegisterDraw6(TClass::GetClass<ROOT::RNTuple>(),
32 [this](TVirtualPad *pad, std::unique_ptr<RHolder> &obj, const std::string &opt) -> bool {
33 auto h1 = DrawField(dynamic_cast<RFieldHolder *>(obj.get()));
34 if (!h1)
35 return false;
36
37 pad->Add(h1, opt.c_str());
38
39 return true;
40 });
41 }
42
44
RNTupleDraw6Provider newRNTupleDraw6Provider
Base class for provider of RNTuple drawing.
TH1 * DrawField(RFieldHolder *holder)
Provider for RNTuple drawing on TCanvas.
void RegisterDraw6(const TClass *cl, Draw6Func_t func)
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