Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions tree/treeplayer/inc/ROOT/TDataFrame.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -495,10 +495,10 @@ public:
auto bl = GetBranchNames<T>({branchName}, "get the values of the branch");
auto valuesPtr = std::make_shared<COLL>();
auto values = df->MakeActionResultProxy(valuesPtr);
auto getOp = std::make_shared<ROOT::Internal::Operations::TakeOperation<T,COLL>>(valuesPtr, nSlots);
auto getAction = [getOp] (unsigned int slot , const T &v) mutable { getOp->Exec(v, slot); };
using DFA_t = ROOT::Internal::TDataFrameAction<decltype(getAction), Proxied>;
df->Book(std::make_shared<DFA_t>(std::move(getAction), bl, fProxiedPtr));
auto takeOp = std::make_shared<ROOT::Internal::Operations::TakeOperation<T,COLL>>(valuesPtr, nSlots);
auto takeAction = [takeOp] (unsigned int slot , const T &v) mutable { takeOp->Exec(v, slot); };
using DFA_t = ROOT::Internal::TDataFrameAction<decltype(takeAction), Proxied>;
df->Book(std::make_shared<DFA_t>(std::move(takeAction), bl, fProxiedPtr));
return values;
}

Expand Down
8 changes: 4 additions & 4 deletions tree/treeplayer/src/TDataFrame.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ common operations: building blocks to trigger custom calculations are available
<td>
~~~{.cpp}
TTreeReader reader("myTree", file);
TTreeReaderValue&lt;A_t&gt; a(reader, "A");
TTreeReaderValue&lt;B_t&gt; b(reader, "B");
TTreeReaderValue&lt;C_t&gt; c(reader, "C");
TTreeReaderValue<A_t> a(reader, "A");
TTreeReaderValue<B_t> b(reader, "B");
TTreeReaderValue<C_t> c(reader, "C");
while(reader.Next()) {
if(IsGoodEvent(a, b, c))
DoStuff(a, b, c);
Expand All @@ -108,7 +108,7 @@ d.Filter(IsGoodEvent).Foreach(DoStuff);
<tr>
<td>
~~~{.cpp}
TTree *t = static_cast&lt;TTree*&gt;(
TTree *t = static_cast<TTree*>(
file->Get("myTree")
);
t->Draw("var", "var > 2");
Expand Down