19#ifndef ROOT_RDFOPERATIONS
20#define ROOT_RDFOPERATIONS
80 std::vector<TBranch *> fBranches;
81 std::vector<std::string> fNames;
86 auto it = std::find(fNames.begin(), fNames.end(),
name);
87 if (it == fNames.end())
89 return fBranches[std::distance(fNames.begin(), it)];
92 void Insert(
const std::string &
name,
TBranch *address)
94 if (address ==
nullptr) {
95 throw std::logic_error(
"Trying to insert a null branch address.");
97 if (std::find(fBranches.begin(), fBranches.end(), address) != fBranches.end()) {
98 throw std::logic_error(
"Trying to insert a branch address that's already present.");
100 if (std::find(fNames.begin(), fNames.end(),
name) != fNames.end()) {
101 throw std::logic_error(
"Trying to insert a branch name that's already present.");
103 fNames.emplace_back(
name);
104 fBranches.emplace_back(address);
117 [](
TBranch *
b) { return b->GetAddress() == nullptr; });
126 std::string
msg =
"RDataFrame::Snapshot:";
129 " is needed as it provides the size for one or more branches containing dynamically sized arrays, but "
135 msg.resize(
msg.size() - 2);
137 " are needed as they provide the size of other branches containing dynamically sized arrays, but they are";
139 msg +=
" not part of the set of branches that are being written out.";
140 throw std::runtime_error(
msg);
149using Results = std::conditional_t<std::is_same<T, bool>::value, std::deque<T>, std::vector<T>>;
163 template <
typename... Args>
164 void Exec(
unsigned int slot, Args &&... args)
167 static_assert(std::is_same<TypeList<std::decay_t<Args>...>, ColumnTypes_t>
::value,
"");
175 std::string GetActionName() {
return "ForeachSlot"; }
195 return std::make_unique<RMergeableCount>(*
fResultCount);
200 std::string GetActionName() {
return "Count"; }
209template <
typename RNode_t>
211 std::shared_ptr<RCutFlowReport>
fReport;
224 void Exec(
unsigned int ) {}
232 std::string GetActionName() {
return "Report"; }
236 auto &&
result = *
static_cast<std::shared_ptr<RCutFlowReport> *
>(
newResult);
238 std::static_pointer_cast<RNode_t>(fNode->GetVariedFilter(std::string(
variation))).get(),
254 using Buf_t = std::vector<BufEl_t>;
256 std::vector<Buf_t> fBuffers;
259 unsigned int fNSlots;
260 unsigned int fBufSize;
274 void Exec(
unsigned int slot,
double v,
double w);
288 void Exec(
unsigned int slot,
const T &
vs,
const W &ws)
317 void Exec(
unsigned int slot,
const T
v,
const W &ws)
327 Hist_t &PartialUpdate(
unsigned int);
336 return std::make_unique<RMergeableFill<Hist_t>>(*fResultHist);
339 std::string GetActionName()
348 result->SetDirectory(
nullptr);
355template <
typename HIST = Hist_t>
357 std::vector<HIST *> fObjects;
370 throw std::runtime_error(
371 "A systematic variation was requested for a custom Fill action, but the type of the object to be filled does "
372 "not implement a Reset method, so we cannot safely re-initialize variations of the result. Aborting.");
376 h->SetDirectory(
nullptr);
383 auto Merge(std::vector<H *> &
objs,
int )
393 template <
typename H>
394 auto Merge(std::vector<H *> &
objs,
double )
395 ->
decltype(
objs[0]->Merge(std::vector<HIST *>{}),
void())
401 template <
typename T>
404 static_assert(
sizeof(T) < 0,
405 "The type passed to Fill does not provide a Merge(TCollection*) or Merge(const std::vector&) method.");
409 template <
typename T>
434 return std::begin(val);
439 std::size_t GetSize(
const T &)
446 std::size_t GetSize(
const T &val)
448#if __cplusplus >= 201703L
449 return std::size(val);
455 template <std::size_t
ColIdx,
typename End_t,
typename...
Its>
461 auto nop = [](
auto &&...) {};
473 fObjects[0] =
h.get();
475 for (
unsigned int i = 1; i <
nSlots; ++i) {
476 fObjects[i] =
new HIST(*fObjects[0]);
484 template <
typename...
ValTypes, std::enable_if_t<!Disjunction<IsDataContainer<ValTypes>...>
::value,
int> = 0>
487 fObjects[
slot]->Fill(
x...);
491 template <
typename...
Xs, std::enable_if_t<Disjunction<IsDataContainer<Xs>...>
::value,
int> = 0>
495 constexpr std::array<
bool,
sizeof...(Xs)>
isContainer{IsDataContainer<Xs>::value...};
500 static_assert(
colidx <
sizeof...(Xs),
"Error: index of collection-type argument not found.");
506 std::array<std::size_t,
sizeof...(xs)>
sizes = {{GetSize(
xs)...}};
508 for (std::size_t i = 0; i <
sizeof...(xs); ++i) {
510 throw std::runtime_error(
"Cannot fill histogram with values in containers of different sizes.");
517 template <
typename T = HIST>
520 static_assert(
sizeof(T) < 0,
521 "When filling an object with RDataFrame (e.g. via a Fill action) the number or types of the "
522 "columns passed did not match the signature of the object's `Fill` method.");
529 if (fObjects.size() == 1)
535 for (
auto it = ++fObjects.begin(); it != fObjects.end(); ++it)
539 HIST &PartialUpdate(
unsigned int slot) {
return *fObjects[
slot]; }
544 return std::make_unique<RMergeableFill<HIST>>(*fObjects[0]);
549 std::string GetActionName()
551 return std::string(fObjects[0]->
IsA()->GetName()) +
"\\n" + std::string(fObjects[0]->GetName());
556 std::string GetActionName()
558 return "Fill custom object";
561 template <
typename H = HIST>
576 std::vector<::TGraph *> fGraphs;
584 fGraphs[0] =
g.get();
586 for (
unsigned int i = 1; i <
nSlots; ++i) {
587 fGraphs[i] =
new TGraph(*fGraphs[0]);
595 template <
typename X0,
typename X1,
596 std::enable_if_t<IsDataContainer<X0>::value && IsDataContainer<X1>::value,
int> = 0>
599 if (
x0s.size() !=
x1s.size()) {
600 throw std::runtime_error(
"Cannot fill Graph with values in containers of different sizes.");
612 template <
typename X0,
typename X1,
613 std::enable_if_t<!IsDataContainer<X0>::value && !IsDataContainer<X1>::value,
int> = 0>
625 throw std::runtime_error(
"Graph was applied to a mix of scalar values and collections. This is not supported.");
630 const auto nSlots = fGraphs.size();
635 l.Add(fGraphs[
slot]);
643 return std::make_unique<RMergeableFill<Result_t>>(*fGraphs[0]);
646 std::string GetActionName() {
return "Graph"; }
648 Result_t &PartialUpdate(
unsigned int slot) {
return *fGraphs[
slot]; }
675 for (
unsigned int i = 1; i <
nSlots; ++i) {
685 typename X,
typename Y,
typename EXL,
typename EXH,
typename EYL,
typename EYH,
686 std::enable_if_t<IsDataContainer<X>::value && IsDataContainer<Y>::value && IsDataContainer<EXL>::value &&
687 IsDataContainer<EXH>::value && IsDataContainer<EYL>::value && IsDataContainer<EYH>::value,
692 if ((
xs.size() !=
ys.size()) || (
xs.size() !=
exls.size()) || (
xs.size() !=
exhs.size()) ||
693 (
xs.size() !=
eyls.size()) || (
xs.size() !=
eyhs.size())) {
694 throw std::runtime_error(
"Cannot fill GraphAsymmErrors with values in containers of different sizes.");
697 auto xsIt = std::begin(
xs);
698 auto ysIt = std::begin(
ys);
703 while (
xsIt != std::end(
xs)) {
712 typename X,
typename Y,
typename EXL,
typename EXH,
typename EYL,
typename EYH,
713 std::enable_if_t<!IsDataContainer<X>::value && !IsDataContainer<Y>::value && !IsDataContainer<EXL>::value &&
714 !IsDataContainer<EXH>::value && !IsDataContainer<EYL>::value && !IsDataContainer<EYH>::value,
726 template <
typename X,
typename Y,
typename EXL,
typename EXH,
typename EYL,
typename EYH,
730 throw std::runtime_error(
731 "GraphAsymmErrors was applied to a mix of scalar values and collections. This is not supported.");
752 std::string GetActionName() {
return "GraphAsymmErrors"; }
758 auto &
result = *
static_cast<std::shared_ptr<TGraphAsymmErrors> *
>(
newResult);
770template <
typename V,
typename COLL>
776template <
typename COLL>
783template <
typename RealT_t,
typename T,
typename COLL>
792 for (
unsigned int i = 1; i <
nSlots; ++i)
793 fColls.emplace_back(std::make_shared<COLL>());
807 for (
unsigned int i = 1; i <
fColls.size(); ++i) {
820 std::string GetActionName() {
return "Take"; }
832template <
typename RealT_t,
typename T>
834 :
public RActionImpl<TakeHelper<RealT_t, T, std::vector<T>>> {
842 for (
unsigned int i = 1; i <
nSlots; ++i) {
843 auto v = std::make_shared<std::vector<T>>();
865 for (
unsigned int i = 1; i <
fColls.size(); ++i) {
871 std::vector<T> &PartialUpdate(
unsigned int slot) {
return *
fColls[
slot]; }
873 std::string GetActionName() {
return "Take"; }
877 auto &
result = *
static_cast<std::shared_ptr<std::vector<T>
> *>(
newResult);
885template <
typename RealT_t,
typename COLL>
887 :
public RActionImpl<TakeHelper<RealT_t, RVec<RealT_t>, COLL>> {
895 for (
unsigned int i = 1; i <
nSlots; ++i)
896 fColls.emplace_back(std::make_shared<COLL>());
910 for (
unsigned int i = 1; i <
fColls.size(); ++i) {
912 for (
auto &
v : *
coll) {
918 std::string GetActionName() {
return "Take"; }
930template <
typename RealT_t>
932 :
public RActionImpl<TakeHelper<RealT_t, RVec<RealT_t>, std::vector<RealT_t>>> {
941 for (
unsigned int i = 1; i <
nSlots; ++i) {
942 auto v = std::make_shared<std::vector<RealT_t>>();
964 for (
unsigned int i = 1; i <
fColls.size(); ++i) {
970 std::string GetActionName() {
return "Take"; }
983template <
typename RealT_t,
typename T,
typename COLL>
985template <
typename RealT_t,
typename T>
987template <
typename RealT_t,
typename COLL>
989template <
typename RealT_t>
1005template <
typename ResultType>
1032 *
fResultMin = std::numeric_limits<ResultType>::max();
1040 return std::make_unique<RMergeableMin<ResultType>>(*fResultMin);
1045 std::string GetActionName() {
return "Min"; }
1049 auto &
result = *
static_cast<std::shared_ptr<ResultType> *
>(
newResult);
1054template <
typename ResultType>
1081 *
fResultMax = std::numeric_limits<ResultType>::lowest();
1090 return std::make_unique<RMergeableMax<ResultType>>(*fResultMax);
1095 std::string GetActionName() {
return "Max"; }
1099 auto &
result = *
static_cast<std::shared_ptr<ResultType> *
>(
newResult);
1104template <
typename ResultType>
1113 template <
typename T = ResultType>
1119 template <
typename T = ResultType,
typename Dummy =
int>
1147 for (
auto &&
v :
vs) {
1173 return std::make_unique<RMergeableSum<ResultType>>(*fResultSum);
1178 std::string GetActionName() {
return "Sum"; }
1182 auto &
result = *
static_cast<std::shared_ptr<ResultType> *
>(
newResult);
1190 std::vector<ULong64_t> fCounts;
1191 std::vector<double>
fSums;
1205 for (
auto &&
v :
vs) {
1223 const ULong64_t counts = std::accumulate(fCounts.begin(), fCounts.end(), 0ull);
1227 double &PartialUpdate(
unsigned int slot);
1229 std::string GetActionName() {
return "Mean"; }
1240 unsigned int fNSlots;
1243 std::vector<ULong64_t> fCounts;
1245 std::vector<double> fMeans;
1259 for (
auto &&
v :
vs) {
1271 const ULong64_t counts = std::accumulate(fCounts.begin(), fCounts.end(), 0ull);
1273 std::inner_product(fMeans.begin(), fMeans.end(), fCounts.begin(), 0.) /
static_cast<Double_t>(
counts);
1277 std::string GetActionName() {
return "StdDev"; }
1286template <
typename PrevNodeType>
1291 std::shared_ptr<PrevNodeType> fPrevNode;
1292 size_t fEntriesToProcess;
1295 DisplayHelper(
size_t nRows,
const std::shared_ptr<Display_t> &
d,
const std::shared_ptr<PrevNodeType> &prevNode)
1299 DisplayHelper(DisplayHelper &&) =
default;
1300 DisplayHelper(
const DisplayHelper &) =
delete;
1303 template <
typename...
Columns>
1306 if (fEntriesToProcess == 0)
1310 --fEntriesToProcess;
1312 if (fEntriesToProcess == 0) {
1317 fPrevNode->StopProcessing();
1325 std::string GetActionName() {
return "Display"; }
1328template <
typename T>
1334template <
typename T>
1340template <
typename T>
1406template <
typename T>
1425 "Branch \"%s\" contains TClonesArrays but the type specified to Snapshot was RVec<T>. The branch will "
1426 "be written out as a RVec instead of a TClonesArray. Specify that the type of the branch is "
1427 "TClonesArray as a Snapshot template parameter to write out a TClonesArray instead.",
1467 const auto bname =
leaf->GetName();
1484 const auto btype =
leaf->GetTypeName();
1488 "RDataFrame::Snapshot: could not correctly construct a leaflist for C-style array in column %s. This "
1489 "column will not be written out.",
1512 const std::string &fileName);
1517 std::string fFileName;
1518 std::string fDirName;
1519 std::string fTreeName;
1521 std::unique_ptr<TFile> fOutputFile;
1528 std::vector<TBranch *> fBranches;
1529 std::vector<void *> fBranchAddresses;
1531 std::vector<bool> fIsDefine;
1560 if (!fTreeName.empty() && !fOutputFile && fOptions.
fLazy) {
1564 return checkupdate ==
"update" ?
"updated" :
"created";
1567 "A lazy Snapshot action was booked but never triggered. The tree '%s' in output file '%s' was not %s. "
1568 "In case it was desired instead, remember to trigger the Snapshot operation, by storing "
1569 "its result in a variable and for example calling the GetValue() method on it.",
1594 template <std::size_t...
S>
1603 int expander[] = {(fBranches[
S] && fBranchAddresses[
S] != GetData(values)
1604 ? fBranches[
S]->SetAddress(GetData(values)),
1605 fBranchAddresses[
S] = GetData(values), 0 : 0, 0)...,
1610 template <std::size_t...
S>
1623 template <std::size_t...
S>
1641 throw std::runtime_error(
"Snapshot: could not create output file " + fFileName);
1644 if (!fDirName.empty()) {
1648 outputDir = fOutputFile->mkdir(fDirName.c_str(),
"",
true);
1650 outputDir = fOutputFile->mkdir(fDirName.c_str());
1654 std::make_unique<TTree>(fTreeName.c_str(), fTreeName.c_str(), fOptions.
fSplitLevel,
outputDir);
1663 assert(fOutputFile !=
nullptr);
1675 fOutputFile->Close();
1678 auto fullTreeName = fDirName.empty() ? fTreeName : fDirName +
'/' + fTreeName;
1682 std::string GetActionName() {
return "Snapshot"; }
1702 const std::string
finalName = *
reinterpret_cast<const std::string *
>(
newName);
1709 std::vector<bool>(fIsDefine),
1718 unsigned int fNSlots;
1719 std::unique_ptr<ROOT::TBufferMerger> fMerger;
1720 std::vector<std::shared_ptr<ROOT::TBufferMergerFile>>
fOutputFiles;
1723 std::string fFileName;
1724 std::string fDirName;
1725 std::string fTreeName;
1729 std::vector<TTree *> fInputTrees;
1731 std::vector<std::vector<TBranch *>> fBranches;
1733 std::vector<std::vector<void *>> fBranchAddresses;
1735 std::vector<bool> fIsDefine;
1757 fInputTrees(fNSlots),
1759 fBranchAddresses(fNSlots, std::vector<void *>(
vbnames.
size(), nullptr)),
1776 return checkupdate ==
"update" ?
"updated" :
"created";
1779 "A lazy Snapshot action was booked but never triggered. The tree '%s' in output file '%s' was not %s. "
1780 "In case it was desired instead, remember to trigger the Snapshot operation, by storing "
1781 "its result in a variable and for example calling the GetValue() method on it.",
1794 if (!fDirName.empty()) {
1809 fInputTrees[
slot] =
r->GetTree();
1841 template <std::size_t...
S>
1850 int expander[] = {(fBranches[
slot][
S] && fBranchAddresses[
slot][
S] != GetData(values)
1851 ? fBranches[
slot][
S]->SetAddress(GetData(values)),
1852 fBranchAddresses[
slot][
S] = GetData(values), 0 : 0, 0)...,
1858 template <std::size_t...
S>
1871 template <std::size_t...
S>
1886 auto outFile = std::unique_ptr<TFile>{
1889 throw std::runtime_error(
"Snapshot: could not create output file " + fFileName);
1891 fMerger = std::make_unique<ROOT::TBufferMerger>(std::move(
outFile));
1907 auto fullTreeName = fDirName.empty() ? fTreeName : fDirName +
'/' + fTreeName;
1908 assert(fOutputFile &&
"Missing output file in Snapshot finalization.");
1913 if (!fDirName.empty()) {
1924 fOutputFile->
Write();
1935 std::string GetActionName() {
return "Snapshot"; }
1955 const std::string
finalName = *
reinterpret_cast<const std::string *
>(
newName);
1963 std::vector<bool>(fIsDefine),
1973 const std::string &fileName);
1976template <
typename T>
1985 std::string fFileName;
1986 std::string fDirName;
1987 std::string fNTupleName;
1989 std::unique_ptr<TFile> fOutputFile{
nullptr};
1995 std::unique_ptr<ROOT::RNTupleWriter> fWriter{
nullptr};
1999 std::vector<bool> fIsDefine;
2025 Warning(
"Snapshot",
"A lazy Snapshot action was booked but never triggered.");
2038 template <std::size_t...
S>
2058 throw std::runtime_error(
"Snapshot: could not create output file " + fFileName);
2061 if (!fDirName.empty()) {
2073 template <std::size_t...
S>
2085 std::make_unique<ROOT::RDF::RNTupleDS>(fDirName +
"/" + fNTupleName, fFileName));
2088 std::string GetActionName() {
return "Snapshot"; }
2108 const std::string
finalName = *
reinterpret_cast<const std::string *
>(
newName);
2115 std::vector<bool>(fIsDefine)};
2119template <
typename Acc,
typename Merge,
typename R,
typename T,
typename U,
2122 :
public RActionImpl<AggregateHelper<Acc, Merge, R, T, U, MustCopyAssign>> {
2125 std::shared_ptr<U> fResult;
2146 template <
bool MustCopyAssign_ = MustCopyAssign, std::enable_if_t<MustCopyAssign_,
int> = 0>
2152 template <
bool MustCopyAssign_ = MustCopyAssign, std::enable_if_t<!MustCopyAssign_,
int> = 0>
2161 bool MergeAll = std::is_same<void, MergeRet>::value>
2162 std::enable_if_t<MergeAll, void>
Finalize()
2170 std::enable_if_t<MergeTwoByTwo, void>
Finalize(...)
2173 *fResult = fMerge(*fResult,
acc);
2178 std::string GetActionName() {
return "Aggregate"; }
Handle_t Display_t
Display handle.
#define R(a, b, c, d, e, f, g, h, i)
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
unsigned long long ULong64_t
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
void Warning(const char *location, const char *msgfmt,...)
Use this function in warning situations.
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 filename
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
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 result
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
Option_t Option_t TPoint TPoint const char x1
void operator=(const TProof &)
Int_t Exec(const char *cmd, ESlaves list, Bool_t plusMaster)
Long64_t Finalize(Int_t query=-1, Bool_t force=kFALSE)
TClass * IsA() const override
TTime operator*(const TTime &t1, const TTime &t2)
Base class for action helpers, see RInterface::Book() for more information.
The head node of a RDF computation graph.
This class is the textual representation of the content of a columnar dataset.
This type represents a sample identifier, to be used in conjunction with RDataFrame features such as ...
The REntry is a collection of values in an ntuple corresponding to a complete row in the data set.
The RNTupleModel encapulates the schema of an RNTuple.
static std::unique_ptr< RNTupleModel > Create()
std::shared_ptr< T > MakeField(std::string_view name, std::string_view description="")
Creates a new field given a name or {name, description} pair and a corresponding, default-constructed...
Common user-tunable settings for storing RNTuples.
static std::unique_ptr< RNTupleWriter > Append(std::unique_ptr< ROOT::RNTupleModel > model, std::string_view ntupleName, TDirectory &fileOrDirectory, const ROOT::RNTupleWriteOptions &options=ROOT::RNTupleWriteOptions())
Throws an exception if the model is null.
const_iterator begin() const
const_iterator end() const
A "std::vector"-like collection of values implementing handy operation to analyse them.
A TTree is a list of TBranches.
TClassRef is used to implement a permanent reference to a TClass object.
Collection abstract base class.
TDirectory * mkdir(const char *name, const char *title="", Bool_t returnExistingDirectory=kFALSE) override
Create a sub-directory "a" or a hierarchy of sub-directories "a/b/c/...".
TObject * Get(const char *namecycle) override
Return pointer to object identified by namecycle.
TDirectory::TContext keeps track and restore the current directory.
Describe directory structure in memory.
A ROOT file is an on-disk file, usually with extension .root, that stores objects in a file-system-li...
static TFile * Open(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=ROOT::RCompressionSetting::EDefaults::kUseCompiledDefault, Int_t netopt=0)
Create / open a file.
Int_t Write(const char *name=nullptr, Int_t opt=0, Int_t bufsiz=0) override
Write memory objects to this file.
TGraph with asymmetric error bars.
A TGraph is an object made of two arrays X and Y with npoints each.
1-D histogram with a double per channel (see TH1 documentation)
TH1 is the base class of all histogram classes in ROOT.
A TLeaf describes individual elements of a TBranch See TBranch structure in TTree.
Statistical variable, defined by its mean and variance (RMS).
A simple, robust and fast interface to read values from ROOT columnar datasets such as TTree,...
A TTree represents a columnar dataset.
@ kEntriesReshuffled
If set, signals that this TTree is the output of the processing of another TTree, and the entries are...
RooCmdArg Columns(Int_t ncol)
std::unique_ptr< RMergeableVariations< T > > GetMergeableValue(ROOT::RDF::Experimental::RResultMap< T > &rmap)
Retrieve mergeable values after calling ROOT::RDF::VariationsFor .
std::vector< std::string > ReplaceDotWithUnderscore(const std::vector< std::string > &columnNames)
Replace occurrences of '.
char TypeName2ROOTTypeName(const std::string &b)
Convert type name (e.g.
void EnsureValidSnapshotRNTupleOutput(const RSnapshotOptions &opts, const std::string &ntupleName, const std::string &fileName)
void EnsureValidSnapshotTTreeOutput(const RSnapshotOptions &opts, const std::string &treeName, const std::string &fileName)
constexpr std::size_t FindIdxTrue(const T &arr)
std::function< void(unsigned int, const ROOT::RDF::RSampleInfo &)> SampleCallback_t
The type of a data-block callback, registered with an RDataFrame computation graph via e....
ROOT type_traits extensions.
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
int CompressionSettings(RCompressionSetting::EAlgorithm::EValues algorithm, int compressionLevel)
RooArgSet S(Args_t &&... args)
ROOT::ESTLType STLKind(std::string_view type)
Converts STL container name to number.
ROOT::ESTLType IsSTLCont(std::string_view type)
type : type name: vector<list<classA,allocator>,allocator> result: 0 : not stl container code of cont...
void Initialize(Bool_t useTMVAStyle=kTRUE)
A collection of options to steer the creation of the dataset on file.
int fAutoFlush
AutoFlush value for output tree.
std::string fMode
Mode of creation of output file.
ECAlgo fCompressionAlgorithm
Compression algorithm of output file.
int fSplitLevel
Split level of output tree.
int fBasketSize
Set a custom basket size option.
bool fLazy
Do not start the event loop when Snapshot is called.
int fCompressionLevel
Compression level of output file.
Lightweight storage for a collection of types.
static uint64_t sum(uint64_t i)