Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-12-03 10:58:21

0001 #ifndef PODIO_ROOTFRAMEDATA_H
0002 #define PODIO_ROOTFRAMEDATA_H
0003 
0004 #include "podio/CollectionBuffers.h"
0005 #include "podio/CollectionIDTable.h"
0006 #include "podio/GenericParameters.h"
0007 
0008 #include <memory>
0009 #include <optional>
0010 #include <string>
0011 #include <unordered_map>
0012 #include <vector>
0013 
0014 namespace podio {
0015 
0016 class ROOTFrameData {
0017   using CollIDPtr = std::shared_ptr<const podio::CollectionIDTable>;
0018 
0019 public:
0020   using BufferMap = std::unordered_map<std::string, podio::CollectionReadBuffers>;
0021 
0022   ROOTFrameData() = delete;
0023   ~ROOTFrameData() = default;
0024   ROOTFrameData(ROOTFrameData&&) = default;
0025   ROOTFrameData& operator=(ROOTFrameData&&) = default;
0026   ROOTFrameData(const ROOTFrameData&) = delete;
0027   ROOTFrameData& operator=(const ROOTFrameData&) = delete;
0028 
0029   ROOTFrameData(BufferMap&& buffers, CollIDPtr&& idTable, podio::GenericParameters&& params);
0030 
0031   std::optional<podio::CollectionReadBuffers> getCollectionBuffers(const std::string& name);
0032 
0033   podio::CollectionIDTable getIDTable() const;
0034 
0035   std::unique_ptr<podio::GenericParameters> getParameters();
0036 
0037   std::vector<std::string> getAvailableCollections() const;
0038 
0039 private:
0040   // TODO: switch to something more elegant once the basic functionality and
0041   // interface is better defined
0042   BufferMap m_buffers{};
0043   // This is co-owned by each FrameData and the original reader. (for now at least)
0044   CollIDPtr m_idTable{nullptr};
0045   podio::GenericParameters m_parameters{};
0046 };
0047 
0048 } // namespace podio
0049 
0050 #endif // PODIO_ROOTFRAMEDATA_H