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
12
13#include <cassert>
14
15using namespace ROOT::Detail::RDF;
16
18
19void RJittedDefine::InitSlot(TTreeReader *r, unsigned int slot)
20{
21 assert(fConcreteDefine != nullptr);
22 fConcreteDefine->InitSlot(r, slot);
23}
24
25void *RJittedDefine::GetValuePtr(unsigned int slot)
26{
27 assert(fConcreteDefine != nullptr);
28 return fConcreteDefine->GetValuePtr(slot);
29}
30
31const std::type_info &RJittedDefine::GetTypeId() const
32{
34 return fConcreteDefine->GetTypeId();
35 else if (fTypeId)
36 return *fTypeId;
37 else
38 throw std::runtime_error("RDataFrame: Type info was requested for a Defined column type, but could not be "
39 "retrieved. This should never happen, please report this as a bug.");
40}
41
42void RJittedDefine::Update(unsigned int slot, Long64_t entry)
43{
44 assert(fConcreteDefine != nullptr);
45 fConcreteDefine->Update(slot, entry);
46}
47
48void RJittedDefine::Update(unsigned int slot, const ROOT::RDF::RSampleInfo &id)
49{
50 assert(fConcreteDefine != nullptr);
51 fConcreteDefine->Update(slot, id);
52}
53
54void RJittedDefine::FinalizeSlot(unsigned int slot)
55{
56 assert(fConcreteDefine != nullptr);
57 fConcreteDefine->FinalizeSlot(slot);
58}
59
60void RJittedDefine::MakeVariations(const std::vector<std::string> &variations)
61{
62 assert(fConcreteDefine != nullptr);
63 return fConcreteDefine->MakeVariations(variations);
64}
65
66RDefineBase &RJittedDefine::GetVariedDefine(const std::string &variationName)
67{
68 assert(fConcreteDefine != nullptr);
69 return fConcreteDefine->GetVariedDefine(variationName);
70}
long long Long64_t
Definition RtypesCore.h:80
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
void InitSlot(TTreeReader *r, unsigned int slot) final
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".
void FinalizeSlot(unsigned int slot) final
Clean-up operations to be performed at the end of a task.
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.
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