Class podio::ROOTFrameReader

class ROOTFrameReader

This class has the function to read available data from disk and to prepare collections and buffers.

Public Functions

ROOTFrameReader() = default
~ROOTFrameReader() = default
ROOTFrameReader(const ROOTFrameReader&) = delete
ROOTFrameReader &operator=(const ROOTFrameReader&) = delete
void openFile(const std::string &filename)

Open a single file for reading.

Parameters:

filename – The name of the input file

void openFiles(const std::vector<std::string> &filenames)

Open multiple files for reading and then treat them as if they are one file.

NOTE: All of the files are assumed to have the same structure. Specifically this means:

  • The same categories are available from all files

  • The collections that are contained in the individual categories are the same across all files

This usually boils down to “the files have been written with the same

settings”, e.g. they are outputs of a batched process.

Parameters:

filenames – The filenames of all input files that should be read

std::unique_ptr<podio::ROOTFrameData> readNextEntry(const std::string &name)

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

In case there are no more entries left for this name or in case there is no data for this name, this returns a nullptr.

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

Read the specified data entry from which a Frame can be constructed for the given name.

In case the entry does not exist for this name or in case there is no data for this name, this returns a nullptr.

unsigned getEntries(const std::string &name) const

Returns number of entries for the given name.

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)

inline const std::string_view getDatamodelDefinition(const std::string &name) const

Get the datamodel definition for the given name.

inline std::vector<std::string> getAvailableDatamodels() const

Get all names of the datamodels that ara available from this reader.