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())) {
35 if (nBranches !=
data_.size()) {
37 <<
"Could not read expected number of branches from TTree's list.\n";
46 std::ostringstream pat_s;
55 std::regex
const r{pat_s.str()};
57 for (
auto const& datum :
data_) {
58 if (std::regex_match(datum.branchName(), r)) {
std::string friendlyClassName() const
bool findBranchInfo(InputTag const &tag, RootBranchInfo &rbInfo) const
std::vector< RootBranchInfo > data_
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception