Logo ROOT  
Reference Guide
Loading...
Searching...
No Matches
RVariationBase.cxx
Go to the documentation of this file.
1// Author: Enrico Guiraud, CERN 10/2021
2
3/*************************************************************************
4 * Copyright (C) 1995-2021, 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
14#include <ROOT/RDF/Utils.hxx> // CacheLineStep
15#include <string_view>
16#include <ROOT/RVec.hxx>
17#include <RtypesCore.h>
18
19#include <memory>
20#include <string>
21#include <vector>
22
23namespace ROOT {
24namespace Internal {
25namespace RDF {
26
27RVariationBase::RVariationBase(const std::vector<std::string> &colNames, std::string_view variationName,
28 const std::vector<std::string> &variationTags, std::string_view type,
29 const RColumnRegister &colRegister, RLoopManager &lm, const ColumnNames_t &inputColNames)
30 : fColNames(colNames),
31 fVariationNames(variationTags),
32 fVariationName(variationName),
33 fType(type),
35 fColumnRegister(colRegister),
36 fLoopManager(&lm),
37 fInputColumns(inputColNames),
38 fIsDefine(inputColNames.size())
39{
40 // prepend the variation name to each tag
41 for (auto &tag : fVariationNames)
42 tag = std::string(fVariationName) + ':' + tag;
43
44 const auto nColumns = fInputColumns.size();
45 for (auto i = 0u; i < nColumns; ++i)
46 fIsDefine[i] = fColumnRegister.IsDefineOrAlias(fInputColumns[i]);
47}
48
50
51const std::vector<std::string> &RVariationBase::GetColumnNames() const
52{
53 return fColNames;
54}
55
56const std::vector<std::string> &RVariationBase::GetVariationNames() const
57{
58 return fVariationNames;
59}
60
61const std::string &RVariationBase::GetVariationName() const
62{
63 return fVariationName;
64}
65
66std::string RVariationBase::GetTypeName() const
67{
68 return fType;
69}
70
71} // namespace RDF
72} // namespace Internal
73} // namespace ROOT
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
Basic types used by ROOT and required by TInterpreter.
long long Long64_t
Portable signed long integer 8 bytes.
Definition RtypesCore.h:83
The head node of a RDF computation graph.
A binder for user-defined columns, variations and aliases.
std::vector< std::string > fColNames
The names of the varied columns.
const std::vector< std::string > & GetVariationNames() const
const std::vector< std::string > & GetColumnNames() const
std::string fType
The type of the custom column as a text string.
std::string fVariationName
The name of the systematic variation.
const std::string & GetVariationName() const
RVariationBase(const std::vector< std::string > &colNames, std::string_view variationName, const std::vector< std::string > &variationTags, std::string_view type, const RColumnRegister &colRegister, RLoopManager &lm, const ColumnNames_t &inputColNames)
ROOT::RVecB fIsDefine
The nth flag signals whether the nth input column is a custom column or not.
std::vector< std::string > fVariationNames
The tags of the systematic variation.
std::vector< Long64_t > fLastCheckedEntry
unsigned int GetNSlots()
Definition RDFUtils.cxx:402
constexpr std::size_t CacheLineStep()
Stepping through CacheLineStep<T> values in a vector<T> brings you to a new cache line.
Definition Utils.hxx:225
std::vector< std::string > ColumnNames_t