Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RColumnReaderBase.hxx
Go to the documentation of this file.
1// Author: Enrico Guiraud CERN 09/2020
2
3/*************************************************************************
4 * Copyright (C) 1995-2020, Rene Brun and Fons Rademakers. *
5 * All rights reserved. *
6 * *
7 * For the licensing terms see $ROOTSYS/LICENSE. *
8 * For the list of contributors see $ROOTSYS/README/CREDITS. *
9 *************************************************************************/
10
11#ifndef ROOT_INTERNAL_RDF_RCOLUMNREADERBASE
12#define ROOT_INTERNAL_RDF_RCOLUMNREADERBASE
13
14#include <Rtypes.h>
15
16namespace ROOT {
17namespace Detail {
18namespace RDF {
19
20/**
21\class ROOT::Internal::RDF::RColumnReaderBase
22\ingroup dataframe
23\brief Pure virtual base class for all column reader types
24
25This pure virtual class provides a common base class for the different column reader types, e.g. RTreeColumnReader and
26RDSColumnReader.
27**/
28class R__CLING_PTRCHECK(off) RColumnReaderBase {
29public:
30 virtual ~RColumnReaderBase() = default;
31
32 /// Return the column value for the given entry.
33 /// \tparam T The column type
34 /// \param entry The entry number
35 ///
36 /// The caller is responsible for checking that the returned value actually
37 /// exists.
38 template <typename T>
39 T *TryGet(Long64_t entry)
40 {
41 return static_cast<T *>(GetImpl(entry));
42 }
43
44private:
45 virtual void *GetImpl(Long64_t entry) = 0;
46};
47
48} // namespace RDF
49} // namespace Detail
50} // namespace ROOT
51
52#endif
long long Long64_t
Definition RtypesCore.h:69
virtual void * GetImpl(Long64_t entry)=0
T * TryGet(Long64_t entry)
Return the column value for the given entry.
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...