Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RFieldProvider.hxx
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#ifndef ROOT_Browsable_RFieldProvider
10#define ROOT_Browsable_RFieldProvider
11
12#include "TH1.h"
13#include "TMath.h"
14#include <map>
15#include <memory>
16#include <string>
17#include <utility>
18
20
22#include <ROOT/RPageStorage.hxx>
24#include <ROOT/RNTupleView.hxx>
25
26#include "RFieldHolder.hxx"
27
28using namespace ROOT::Browsable;
29
30using namespace std::string_literals;
31
32// ==============================================================================================
33
34/** \class RFieldProvider
35\ingroup rbrowser
36\brief Base class for provider of RNTuple drawing
37\author Sergey Linev <S.Linev@gsi.de>
38\date 2021-03-09
39\warning This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback is welcome!
40*/
41
42class RFieldProvider : public RProvider {
43public:
44 // virtual ~RFieldProvider() = default;
45
47 {
48 if (!holder) return nullptr;
49
50 auto ntplReader = holder->GetNtplReader();
51
52 const auto qualifiedFieldName = ntplReader->GetDescriptor().GetQualifiedFieldName(holder->GetId());
53 auto view = ntplReader->GetView<void>(qualifiedFieldName);
54
56 view.GetField().AcceptVisitor(drawVisitor);
57 return drawVisitor.MoveHist();
58 }
59};
60
61#endif
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 of different browsing methods for supported classes.
Definition RProvider.hxx:37
TH1 is the base class of all histogram classes in ROOT.
Definition TH1.h:109