Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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
13#include "ROOT/RDF/Utils.hxx"
14#include "ROOT/RStringView.hxx"
15#include "RtypesCore.h" // Long64_t
16
17#include <string>
18#include <vector>
19#include <atomic>
20
22namespace RDFInternal = ROOT::Internal::RDF; // redundant (already present in the header), but Windows needs it
23
24RDefineBase::RDefineBase(std::string_view name, std::string_view type, const RDFInternal::RColumnRegister &colRegister,
26 const std::string &variationName)
27 : fName(name), fType(type), fLastCheckedEntry(lm.GetNSlots() * RDFInternal::CacheLineStep<Long64_t>(), -1),
28 fColRegister(colRegister), fLoopManager(&lm), fColumnNames(columnNames), fIsDefine(columnNames.size()),
29 fVariationDeps(fColRegister.GetVariationDeps(fColumnNames)), fVariation(variationName)
30{
31 const auto nColumns = fColumnNames.size();
32 for (auto i = 0u; i < nColumns; ++i) {
34 if (fVariation != "nominal" && fIsDefine[i])
35 fColRegister.GetColumns().at(fColumnNames[i])->MakeVariations({fVariation});
36 }
37}
38
39// pin vtable. Work around cling JIT issue.
41
42std::string RDefineBase::GetName() const
43{
44 return fName;
45}
46
47std::string RDefineBase::GetTypeName() const
48{
49 return fType;
50}
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
long long Long64_t
Definition RtypesCore.h:80
char name[80]
Definition TGX11.cxx:110
int type
Definition TGX11.cxx:121
ROOT::RVecB fIsDefine
The nth flag signals whether the nth input column is a custom column or not.
std::string fVariation
This indicates for what variation this define evaluates values.
const std::string fType
The type of the custom column as a text string.
std::string GetTypeName() const
RDefineBase(std::string_view name, std::string_view type, const RDFInternal::RColumnRegister &colRegister, RLoopManager &lm, const ColumnNames_t &columnNames, const std::string &variationName="nominal")
std::string GetName() const
RDFInternal::RColumnRegister fColRegister
const ROOT::RDF::ColumnNames_t fColumnNames
const std::string fName
The name of the custom column.
The head node of a RDF computation graph.
A binder for user-defined columns and aliases.
const DefinesMap_t & GetColumns() const
Returns a map of pointers to the defined columns.
bool HasName(std::string_view name) const
Check if the provided name is tracked in the names list.
std::vector< std::string > ColumnNames_t
Definition Utils.hxx:35