Class podio::ROOTLegacyReader

class ROOTLegacyReader

A root reader for reading legacy podio root files that have been written using the legacy, non Frame based I/O model.

This reader grants Frame based access to those files, by mimicking the Frame I/O functionality and the interfaces of those readers.

NOTE: Since there was only one category (“events”) for those legacy podio files this reader will really only work if you try to read that category, and will simply return no data if you try to read anything else.

Public Functions

ROOTLegacyReader() = default
~ROOTLegacyReader() = default
ROOTLegacyReader(const ROOTLegacyReader&) = delete
ROOTLegacyReader &operator=(const ROOTLegacyReader&) = delete
void openFile(const std::string &filename)
void openFiles(const std::vector<std::string> &filenames)
std::unique_ptr<podio::ROOTFrameData> readNextEntry(const std::string&)

Read the next data entry from which a Frame can be constructed.

In case there are no more entries left, this returns a nullptr.

NOTE: the category name has to be “events” in this case, as only that category is available for legacy files.

std::unique_ptr<podio::ROOTFrameData> readEntry(const std::string&, const unsigned entry)

Read the specified data entry from which a Frame can be constructed In case the entry does not exist, this returns a nullptr.

NOTE: the category name has to be “events” in this case, as only that category is available for legacy files.

unsigned getEntries(const std::string&) const

Returns number of entries for a given category.

inline podio::version::Version currentFileVersion() const

Get the build version of podio that has been used to write the current file.

std::vector<std::string_view> getAvailableCategories() const

Get the names of all the available Frame categories in the current file(s)