Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RJittedDefine.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
13
14#include <cassert>
15
16using namespace ROOT::Detail::RDF;
17
19{
21}
22
23void RJittedDefine::InitSlot(TTreeReader *r, unsigned int slot)
24{
25 assert(fConcreteDefine != nullptr);
26 fConcreteDefine->InitSlot(r, slot);
27}
28
29void *RJittedDefine::GetValuePtr(unsigned int slot)
30{
31 assert(fConcreteDefine != nullptr);
32 return fConcreteDefine->GetValuePtr(slot);
33}
34
35const std::type_info &RJittedDefine::GetTypeId() const
36{
38 return fConcreteDefine->GetTypeId();
39 else if (fTypeId)
40 return *fTypeId;
41 else
42 throw std::runtime_error("RDataFrame: Type info was requested for a Defined column type, but could not be "
43 "retrieved. This should never happen, please report this as a bug.");
44}
45
46void RJittedDefine::Update(unsigned int slot, Long64_t entry)
47{
48 assert(fConcreteDefine != nullptr);
49 fConcreteDefine->Update(slot, entry);
50}
51
52void RJittedDefine::Update(unsigned int slot, const ROOT::RDF::RSampleInfo &id)
53{
54 assert(fConcreteDefine != nullptr);
55 fConcreteDefine->Update(slot, id);
56}
57
58void RJittedDefine::FinaliseSlot(unsigned int slot)
59{
60 assert(fConcreteDefine != nullptr);
61 fConcreteDefine->FinaliseSlot(slot);
62}
63
64void RJittedDefine::MakeVariations(const std::vector<std::string> &variations)
65{
66 assert(fConcreteDefine != nullptr);
67 return fConcreteDefine->MakeVariations(variations);
68}
69
70RDefineBase &RJittedDefine::GetVariedDefine(const std::string &variationName)
71{
72 assert(fConcreteDefine != nullptr);
73 return fConcreteDefine->GetVariedDefine(variationName);
74}
ROOT::R::TRInterface & r
Definition Object.C:4
long long Long64_t
Definition RtypesCore.h:80
void InitSlot(TTreeReader *r, unsigned int slot) final
void FinaliseSlot(unsigned int slot) final
Clean-up operations to be performed at the end of a task.
void Update(unsigned int slot, Long64_t entry) final
Update the value at the address returned by GetValuePtr with the content corresponding to the given e...
RDefineBase & GetVariedDefine(const std::string &variationName) final
Return a clone of this Define that works with values in the variationName "universe".
const std::type_info * fTypeId
Type info obtained through TypeName2TypeID based on the column type name.
std::unique_ptr< RDefineBase > fConcreteDefine
void MakeVariations(const std::vector< std::string > &variations) final
Create clones of this Define that work with values in varied "universes".
const std::type_info & GetTypeId() const final
void * GetValuePtr(unsigned int slot) final
Return the (type-erased) address of the Define'd value for the given processing slot.
void Deregister(RDFInternal::RActionBase *actionPtr)
This type represents a sample identifier, to be used in conjunction with RDataFrame features such as ...
A simple, robust and fast interface to read values from ROOT columnar datasets such as TTree,...
Definition TTreeReader.h:44