Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RHistDraw7Provider.cxx
Go to the documentation of this file.
1/// \file RHistDraw7Provider.cxx
2/// \ingroup rbrowser
3/// \author Bertrand Bellenot <bertrand.bellenot@cern.ch>
4/// \author Sergey Linev <S.Linev@gsi.de>
5/// \date 2019-10-17
6/// \warning This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback
7/// is welcome!
8
9/*************************************************************************
10 * Copyright (C) 1995-2019, Rene Brun and Fons Rademakers. *
11 * All rights reserved. *
12 * *
13 * For the licensing terms see $ROOTSYS/LICENSE. *
14 * For the list of contributors see $ROOTSYS/README/CREDITS. *
15 *************************************************************************/
16
19
20#include <ROOT/RCanvas.hxx>
21
22using namespace ROOT::Browsable;
23
25 template<class HistClass>
27 {
28 RegisterDraw7(TClass::GetClass<HistClass>(), [] (std::shared_ptr<ROOT::Experimental::RPadBase> &subpad, std::unique_ptr<RHolder> &obj, const std::string &) -> bool {
29 auto hist = obj->get_shared<HistClass>();
30 if (!hist) return false;
31
32 subpad->Draw(hist);
33 return true;
34 });
35 }
36
37public:
38
40 {
41 RegisterHistClass<ROOT::Experimental::RH1D>();
42 RegisterHistClass<ROOT::Experimental::RH2D>();
43 RegisterHistClass<ROOT::Experimental::RH3D>();
44 }
45
RV7HistDrawProvider newRV7HistDrawProvider
Provider of different browsing methods for supported classes.
Definition RProvider.hxx:37
void RegisterDraw7(const TClass *cl, Draw7Func_t func)