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,
30 : fColNames(colNames),
31 fVariationNames(variationTags),
32 fVariationName(variationName),
33 fType(type),
34 fLastCheckedEntry(lm.GetNSlots() * CacheLineStep<Long64_t>(), -1),
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)
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
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
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 Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
The head node of a RDF computation graph.
A binder for user-defined columns, variations and aliases.
bool IsDefineOrAlias(std::string_view name) const
Check if the provided name is tracked in the names list.
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.
unsigned int GetNSlots()
Definition RDFUtils.cxx:397
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