Logo ROOT  
Reference Guide
RDefineBase.cxx
Go to the documentation of this file.
1 // Author: Enrico Guiraud, Danilo Piparo CERN 09/2018
2 
3 /*************************************************************************
4  * Copyright (C) 1995-2018, 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 #include "ROOT/RDF/RDefineBase.hxx"
12 #include "ROOT/RDF/Utils.hxx"
13 #include "ROOT/RStringView.hxx"
14 #include "RtypesCore.h" // Long64_t
15 
16 #include <string>
17 #include <vector>
18 #include <atomic>
19 
22 
23 unsigned int RDefineBase::GetNextID()
24 {
25  static std::atomic_uint id(0U);
26  return ++id;
27 }
28 
30  const RDFInternal::RBookedDefines &defines,
31  const std::map<std::string, std::vector<void *>> &DSValuePtrs, ROOT::RDF::RDataSource *ds)
32  : fName(name), fType(type), fNSlots(nSlots),
33  fLastCheckedEntry(fNSlots * RDFInternal::CacheLineStep<Long64_t>(), -1), fDefines(defines),
34  fIsInitialized(nSlots, false), fDSValuePtrs(DSValuePtrs), fDataSource(ds)
35 {
36 }
37 
38 // pin vtable. Work around cling JIT issue.
40 
41 std::string RDefineBase::GetName() const
42 {
43  return fName;
44 }
45 
46 std::string RDefineBase::GetTypeName() const
47 {
48  return fType;
49 }
ROOT::Detail::RDF::RDefineBase::RDefineBase
RDefineBase(std::string_view name, std::string_view type, unsigned int nSlots, const RDFInternal::RBookedDefines &defines, const std::map< std::string, std::vector< void * >> &DSValuePtrs, ROOT::RDF::RDataSource *ds)
Definition: RDefineBase.cxx:29
ROOT::Detail::RDF::RDefineBase::GetName
std::string GetName() const
Definition: RDefineBase.cxx:41
ROOT::Detail::RDF::RDefineBase::GetTypeName
std::string GetTypeName() const
Definition: RDefineBase.cxx:46
ROOT::Detail::RDF::RDefineBase::~RDefineBase
virtual ~RDefineBase()
Definition: RDefineBase.cxx:39
Long64_t
long long Long64_t
Definition: RtypesCore.h:80
string_view
basic_string_view< char > string_view
Definition: libcpp_string_view.h:786
extract_docstrings.ds
ds
Definition: extract_docstrings.py:65
Utils.hxx
ROOT::Internal::RDF::RBookedDefines
Encapsulates the columns defined by the user.
Definition: RBookedDefines.hxx:39
ROOT::Detail::RDF::RDefineBase::fName
const std::string fName
The name of the custom column.
Definition: RDefineBase.hxx:36
RDefineBase.hxx
ROOT::RDF::RDataSource
RDataSource defines an API that RDataFrame can use to read arbitrary data formats.
Definition: RDataSource.hxx:106
id
XFontStruct * id
Definition: TGX11.cxx:109
ROOT::Detail::RDF::RDefineBase::fType
const std::string fType
The type of the custom column as a text string.
Definition: RDefineBase.hxx:37
ROOT::Detail::RDF::RDefineBase
Definition: RDefineBase.hxx:34
RStringView.hxx
ROOT::Detail::RDF::RDefineBase::GetNextID
static unsigned int GetNextID()
Definition: RDefineBase.cxx:23
RtypesCore.h
ROOT::Internal::RDF
Definition: RArrowDS.hxx:23
name
char name[80]
Definition: TGX11.cxx:110
type
int type
Definition: TGX11.cxx:121