Class podio::ReaderCommon

class ReaderCommon

Common base class for podio reader classes providing the shared members and functionality related to the file version and the datamodel definitions.

The population of the members is left to the derived reader classes.

Subclassed by podio::ArrowReader, podio::RNTupleReader, podio::ROOTReader, podio::SIOReader

Public Functions

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

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

Returns:

The podio build version

inline std::optional<podio::version::Version> currentFileVersion(std::string_view name) const

Get the (build) version of a datamodel that has been used to write the current file.

Parameters:

name – The name of the datamodel

Returns:

The (build) version of the datamodel if available or an empty optional

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

Get the datamodel definition for the given name.

Parameters:

name – The name of the datamodel

Returns:

The high level definition of the datamodel in JSON format

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

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

Returns:

The names of the datamodels

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

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

Returns:

The names of the available categories from the file