Class podio::ArrowReader
-
class ArrowReader : public podio::ReaderCommon
Arrow backend reader for PODIO.
Reads data from a directory structure containing one Parquet file per category and a metadata.json file containing metadata for reading.
Public Functions
-
ArrowReader()
Create an ArrowReader.
-
void openFile(const std::string &directory)
Open the passed directory for reading.
- Parameters:
directory – The path to the directory to read from
-
~ArrowReader() = default
-
ArrowReader(const ArrowReader&) = delete
-
ArrowReader &operator=(const ArrowReader&) = delete
-
ArrowReader(ArrowReader&&) = delete
-
ArrowReader &operator=(ArrowReader&&) = delete
-
std::unique_ptr<podio::ArrowFrameData> readNextEntry(std::string_view name, const std::vector<std::string> &collsToRead = {})
Read the next entry for the given category.
-
std::unique_ptr<podio::ArrowFrameData> readEntry(std::string_view name, size_t index, const std::vector<std::string> &collsToRead = {})
Read the specific entry for the given category.
-
size_t getEntries(std::string_view name) const
Get the number of entries for a category.
-
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
-
ArrowReader()