1#ifndef PODIO_ROOTFRAMEDATA_H
2#define PODIO_ROOTFRAMEDATA_H
11#include <unordered_map>
16 using CollIDPtr = std::shared_ptr<const podio::CollectionIDTable>;
19 using BufferMap = std::unordered_map<std::string, podio::CollectionReadBuffers>;
29 m_buffers(std::move(buffers)), m_idTable(idTable), m_parameters(std::move(params)) {
33 const auto bufferHandle = m_buffers.extract(name);
34 if (bufferHandle.empty()) {
38 return {bufferHandle.mapped()};
43 return {m_idTable->ids(), m_idTable->names()};
47 return std::make_unique<podio::GenericParameters>(std::move(m_parameters));
51 std::vector<std::string> collections;
52 collections.reserve(m_buffers.size());
53 for (
const auto& [name, _] : m_buffers) {
54 collections.push_back(name);
65 CollIDPtr m_idTable{
nullptr};
ROOTFrameData & operator=(const ROOTFrameData &)=delete
ROOTFrameData & operator=(ROOTFrameData &&)=default
podio::CollectionIDTable getIDTable() const
ROOTFrameData(ROOTFrameData &&)=default
ROOTFrameData(const ROOTFrameData &)=delete
std::unordered_map< std::string, podio::CollectionReadBuffers > BufferMap
ROOTFrameData(BufferMap &&buffers, CollIDPtr &&idTable, podio::GenericParameters &¶ms)
std::vector< std::string > getAvailableCollections() const
std::optional< podio::CollectionReadBuffers > getCollectionBuffers(const std::string &name)
std::unique_ptr< podio::GenericParameters > getParameters()