1 #ifndef PhysicsTools_NanoAOD_TableOutputBranches_h 2 #define PhysicsTools_NanoAOD_TableOutputBranches_h 16 if (desc->
className() !=
"nanoaod::FlatTable")
17 throw cms::Exception(
"Configuration",
"NanoAODOutputModule can only write out nanoaod::FlatTable objects");
40 TBranch *branchptr =
nullptr)
41 : name(aname), title(atitle), rootTypeCode(rootType), branch(branchptr) {}
53 throw cms::Exception(
"LogicError",
"Missing column in input for " + m_baseName +
"_" + pair.
name);
boost::sub_range< const std::vector< T > > columnData(unsigned int column) const
get a column by index (const)
enum TableOutputBranches::@849 m_extension
int columnIndex(const std::string &name) const
void defineBranchesFromFirstEvent(const nanoaod::FlatTable &tab)
void fill(const edm::EventForOutput &iEvent, TTree &tree, bool extensions)
NamedBranchPtr(const std::string &aname, const std::string &atitle, const std::string &rootType, TBranch *branchptr=0)
std::vector< NamedBranchPtr > m_intBranches
TBranch * m_counterBranch
std::string const & className() const
std::vector< NamedBranchPtr > m_uint8Branches
TableOutputBranches(const edm::BranchDescription *desc, const edm::EDGetToken &token)
std::vector< NamedBranchPtr > m_floatBranches
void fillColumn(NamedBranchPtr &pair, const nanoaod::FlatTable &tab)