1#ifndef PODIO_ROOTLEGACYREADER_H
2#define PODIO_ROOTLEGACYREADER_H
6#include "podio/podioVersion.h"
28 using CollectionInfo = std::tuple<const TClass*, const TClass*, size_t>;
34class CollectionIDTable;
35class GenericParameters;
36struct CollectionReadBuffers;
58 void openFile(
const std::string& filename);
60 void openFiles(
const std::vector<std::string>& filenames);
69 std::unique_ptr<podio::ROOTFrameData>
readNextEntry(
const std::string&);
78 std::unique_ptr<podio::ROOTFrameData>
readEntry(
const std::string&,
const unsigned entry);
92 std::pair<TTree*, unsigned> getLocalTreeAndEntry(
const std::string& treename);
94 void createCollectionBranches(
const std::vector<std::tuple<int, std::string, bool>>& collInfo);
100 std::unique_ptr<podio::ROOTFrameData> readEntry();
104 std::vector<std::pair<std::string, detail::CollectionInfo>> m_storedClasses{};
106 std::shared_ptr<CollectionIDTable> m_table{
nullptr};
107 std::unique_ptr<TChain> m_chain{
nullptr};
108 unsigned m_eventNumber{0};
115 std::vector<root_utils::CollectionBranches> m_collectionBranches{};
120 constexpr static auto m_categoryName =
"events";
ROOTLegacyReader & operator=(const ROOTLegacyReader &)=delete
ROOTLegacyReader(const ROOTLegacyReader &)=delete
std::unique_ptr< podio::ROOTFrameData > readEntry(const std::string &, const unsigned entry)
void openFile(const std::string &filename)
void openFiles(const std::vector< std::string > &filenames)
std::unique_ptr< podio::ROOTFrameData > readNextEntry(const std::string &)
std::vector< std::string_view > getAvailableCategories() const
Get the names of all the availalable Frame categories in the current file(s)
unsigned getEntries(const std::string &) const
Returns number of entries for a given category.
ROOTLegacyReader()=default
~ROOTLegacyReader()=default
podio::version::Version currentFileVersion() const
Get the build version of podio that has been used to write the current file.
std::tuple< const TClass *, const TClass *, size_t > CollectionInfo