1 #ifndef PhysicsTools_NanoAOD_TableOutputFields_h 2 #define PhysicsTools_NanoAOD_TableOutputFields_h 12 #include <ROOT/RNTuple.hxx> 13 #include <ROOT/RNTupleModel.hxx> 14 using ROOT::Experimental::RCollectionNTupleWriter;
15 using ROOT::Experimental::RNTupleModel;
16 using ROOT::Experimental::RNTupleWriter;
25 if (!
table.columnName(
i).empty()) {
30 if (
table.name().empty()) {
31 throw cms::Exception(
"LogicError",
"Empty FlatTable name and field name");
50 std::vector<typename T::value_type>
buf(
table.size());
51 for (std::size_t
i = 0;
i <
table.size();
i++) {
RNTupleFieldPtr< T > m_field
TableOutputVectorFields()=default
void fillEntry(const nanoaod::FlatTable &table, std::size_t i)
const edm::EDGetToken & getToken() const
std::shared_ptr< RCollectionNTupleWriter > m_collection
TableOutputFields(const edm::EDGetToken &token)
TableOutputVectorFields(const edm::EDGetToken &token)
std::vector< TableOutputFields > m_singletonFields
TableCollection()=default
std::vector< FlatTableField< std::vector< float > > > m_vfloatFields
void createFields(const edm::EventForOutput &event, RNTupleModel &eventModel)
std::vector< FlatTableField< bool > > m_boolFields
std::string m_collectionName
Container::value_type value_type
std::vector< FlatTableField< std::vector< bool > > > m_vboolFields
const std::string & getCollectionName() const
std::vector< FlatTableField< std::uint8_t > > m_uint8Fields
void fill(const edm::EventForOutput &event)
std::vector< TableOutputVectorFields > m_vectorFields
std::vector< TableOutputFields > m_extensions
std::vector< FlatTableField< int > > m_intFields
const std::string & getFlatTableName() const
std::vector< FlatTableField< std::vector< int > > > m_vintFields
std::string m_flatTableName
void createFields(const edm::EventForOutput &event, RNTupleModel &model)
std::vector< FlatTableField< float > > m_floatFields
void fill(const edm::EventForOutput &event)
void add(const edm::EDGetToken &table_token, const nanoaod::FlatTable &table)
FlatTableField(const nanoaod::FlatTable &table, std::size_t i, RNTupleModel &model)
static bool hasAnonymousColumn(const nanoaod::FlatTable &table)
void add(const edm::EDGetToken &table_token, const nanoaod::FlatTable &table)
std::vector< FlatTableField< std::vector< std::uint8_t > > > m_vuint8Fields
void fill(const edm::EventForOutput &event)
std::vector< TableCollection > m_collections
void createFields(const edm::EventForOutput &event, RNTupleModel &model)
void fill(const nanoaod::FlatTable &table, std::size_t i)
void createFields(const edm::EventForOutput &event, RNTupleModel &eventModel)
void fillVectored(const nanoaod::FlatTable &table)
TableOutputFields()=default