Class podio::ArrowWriter

class ArrowWriter

Arrow backend writer for PODIO.

Writes data to a directory structure containing one Parquet file per category and a metadata.json file containing metadata for reading.

Public Functions

ArrowWriter(const std::string &directory, const Options &options)

Create a ArrowWriter to write to a directory.

Note

Will create the directory if it doesn’t exist. Will throw if it exists and is not empty.

Parameters:
  • directory – The path to the output directory.

  • options – Configuration options for buffering and compression.

explicit ArrowWriter(const std::string &directory)
~ArrowWriter()

Destructor writes metadata and closes files.

ArrowWriter(const ArrowWriter&) = delete
ArrowWriter &operator=(const ArrowWriter&) = delete
ArrowWriter(ArrowWriter&&) = delete
ArrowWriter &operator=(ArrowWriter&&) = delete
void writeFrame(const podio::Frame &frame, std::string_view category)

Store the given frame with the given category.

Note

All frames of the same category must have the same collection names and schemas. Trying to write a frame with different collections to an existing category will result in an exception.

void writeFrame(const podio::Frame &frame, std::string_view category, const std::vector<std::string> &collsToWrite)

Store the given Frame with the given category, specifying collections.

Note

All frames of the same category must have the same collection names and schemas. Trying to write a frame with different collections to an existing category will result in an exception.

void finish()

Write the current directory including metadata.json and close files.

struct Options

Configure the ArrowWriter.

Public Members

size_t maxBufferedRows = 1000
std::string compression = ""