Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
[TDF] Make TInterface's member variables private.
Also add accessor with protected visibility for the one that needs it.
  • Loading branch information
eguiraud committed Aug 17, 2017
commit 023127ba3cfdfeadebb81b097cc68db6b5fad4f9
5 changes: 3 additions & 2 deletions tree/treeplayer/inc/ROOT/TDFInterface.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,8 @@ class TInterface {
template <typename T>
friend class TInterface;

const std::shared_ptr<Proxied> fProxiedPtr; ///< Smart pointer to the graph node encapsulated by this TInterface.
const std::weak_ptr<TLoopManager> fImplWeakPtr; ///< Weak pointer to the TLoopManager at the root of the graph.
public:
////////////////////////////////////////////////////////////////////////////
/// \brief Append a filter to the call graph.
Expand Down Expand Up @@ -1201,8 +1203,7 @@ protected:
{
}

const std::shared_ptr<Proxied> fProxiedPtr;
std::weak_ptr<TLoopManager> fImplWeakPtr;
const std::shared_ptr<Proxied>& GetProxiedPtr() const { return fProxiedPtr; }
};

template <>
Expand Down
2 changes: 1 addition & 1 deletion tree/treeplayer/inc/ROOT/TDataFrame.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ TDataFrame::TDataFrame(std::string_view treeName, const FILENAMESCOLL &filenames
std::string treeNameInt(treeName);
auto chain = std::make_shared<TChain>(treeNameInt.c_str());
for (auto &fileName : filenamescoll) chain->Add(TDFInternal::ToConstCharPtr(fileName));
fProxiedPtr->SetTree(chain);
GetProxiedPtr()->SetTree(chain);
}

} // end NS Experimental
Expand Down
4 changes: 2 additions & 2 deletions tree/treeplayer/src/TDataFrame.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ TDataFrame::TDataFrame(std::string_view treeName, TDirectory *dirPtr, const Colu
auto msg = "Tree \"" + treeNameInt + "\" cannot be found!";
throw std::runtime_error(msg);
}
fProxiedPtr->SetTree(std::shared_ptr<TTree>(tree, [](TTree *) {}));
GetProxiedPtr()->SetTree(std::shared_ptr<TTree>(tree, [](TTree *) {}));
}

////////////////////////////////////////////////////////////////////////////
Expand All @@ -604,7 +604,7 @@ TDataFrame::TDataFrame(std::string_view treeName, std::string_view filenameglob,
const std::string filenameglobInt(filenameglob);
auto chain = std::make_shared<TChain>(treeNameInt.c_str());
chain->Add(filenameglobInt.c_str());
fProxiedPtr->SetTree(chain);
GetProxiedPtr()->SetTree(chain);
}

////////////////////////////////////////////////////////////////////////////
Expand Down