#include <RootBranchInfoList.h>
Definition at line 16 of file RootBranchInfoList.h.
art::RootBranchInfoList::RootBranchInfoList |
( |
| ) |
|
art::RootBranchInfoList::RootBranchInfoList |
( |
TTree * |
tree | ) |
|
|
explicit |
Definition at line 35 of file RootBranchInfoList.h.
bool findBranchInfo(InputTag const &tag, RootBranchInfo &rbInfo) const
Definition at line 42 of file RootBranchInfoList.cc.
46 std::ostringstream pat_s;
47 pat_s <<
'^' <<
type.friendlyClassName() <<
'_' <<
tag.label() <<
'_' 48 <<
tag.instance() <<
'_';
49 if (
tag.process().empty()) {
52 pat_s <<
tag.process();
55 std::regex
const r{pat_s.str()};
57 for (
auto const& datum :
data_) {
58 if (std::regex_match(datum.branchName(),
r)) {
std::vector< RootBranchInfo > data_
void art::RootBranchInfoList::reset |
( |
TTree * |
tree | ) |
|
Definition at line 19 of file RootBranchInfoList.cc.
23 <<
"RootInfoBranchList given null TTree pointer.\n";
25 TObjArray* branches =
tree->GetListOfBranches();
26 size_t nBranches = branches->GetEntriesFast();
28 data_.reserve(nBranches);
29 TIter it(branches, kIterBackward);
32 while (TBranch*
b = dynamic_cast<TBranch*>(it.Next())) {
33 data_.push_back(RootBranchInfo(
b));
35 if (nBranches !=
data_.size()) {
37 <<
"Could not read expected number of branches from TTree's list.\n";
std::vector< RootBranchInfo > data_
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
The documentation for this class was generated from the following files: