7 return baseName.empty() ? leafName :
8 ( leafName.empty() ? baseName :
9 baseName +
"_" + leafName);
44 "Trying to save an extension table for " +
m_baseName +
" before having saved the corresponding main table\n");
47 if (tree.FindBranch((
"n"+
m_baseName).c_str()) !=
nullptr) {
56 for (
auto & pair : *branches) {
58 pair.branch = tree.Branch(branchName.c_str(), (
void*)
nullptr, (branchName + varsize +
"/" + pair.rootTypeCode).c_str());
59 pair.branch->SetTitle(pair.title.c_str());
85 throw cms::Exception(
"LogicError",
"Mismatch in number of entries between extension and main table for " + tab.
name());
ColumnType columnType(unsigned int col) const
void defineBranchesFromFirstEvent(const nanoaod::FlatTable &tab)
const std::string & doc() const
void fill(const edm::EventForOutput &iEvent, TTree &tree, bool extensions)
std::vector< NamedBranchPtr > m_intBranches
TBranch * m_counterBranch
bool getByToken(EDGetToken token, TypeID const &typeID, BasicHandle &result) const
std::vector< NamedBranchPtr > m_uint8Branches
const std::string & name() const
const std::string & columnName(unsigned int col) const
unsigned int nColumns() const
unsigned int size() const
std::vector< NamedBranchPtr > m_floatBranches
const std::string & columnDoc(unsigned int col) const
enum TableOutputBranches::@821 m_extension