7 return baseName.empty() ? leafName : (leafName.empty() ? baseName : baseName +
"_" + leafName);
49 "Trying to save an extension table for " +
m_baseName +
50 " before having saved the corresponding main table\n");
53 if (tree.FindBranch((
"n" +
m_baseName).c_str()) !=
nullptr) {
61 for (std::vector<NamedBranchPtr> *branches :
63 for (
auto &pair : *branches) {
66 tree.Branch(branchName.c_str(), (
void *)
nullptr, (branchName + varsize +
"/" + pair.rootTypeCode).c_str());
67 pair.branch->SetTitle(pair.title.c_str());
95 "Mismatch in number of entries between extension and main table for " + tab.
name());
99 fillColumn<float>(pair, tab);
101 fillColumn<int>(pair, tab);
103 fillColumn<uint8_t>(pair, tab);
105 fillColumn<uint32_t>(pair, tab);
107 fillColumn<double>(pair, tab);
std::vector< NamedBranchPtr > m_uint32Branches
ColumnType columnType(unsigned int col) const
void defineBranchesFromFirstEvent(const nanoaod::FlatTable &tab)
const std::string & doc() const
std::vector< NamedBranchPtr > m_intBranches
TBranch * m_counterBranch
std::vector< NamedBranchPtr > m_int8Branches
std::vector< NamedBranchPtr > m_uint8Branches
void fill(const edm::OccurrenceForOutput &iWhatever, TTree &tree, bool extensions)
const std::string & name() const
const std::string & columnName(unsigned int col) const
BasicHandle getByToken(EDGetToken token, TypeID const &typeID) const
unsigned int nColumns() const
unsigned int size() const
std::vector< NamedBranchPtr > m_floatBranches
enum TableOutputBranches::@900 m_extension
const std::string & columnDoc(unsigned int col) const
std::vector< NamedBranchPtr > m_doubleBranches