Skip to content

protobufIO optional module

Luke Pickering requested to merge lpickeri/HepMC3:feature/protobufIO into master

High-level

The high-level aim of this MR is to implement a industry-standard binary serialiser in/out HepMC3 stream format that could produce an event stream which could be consumed as it was being written, much like the use of the ASCII format along with named unix pipes. It is additionally desirable to have a platform-independent binary format that does not require the entirety of ROOT to be linked.

Changes

  • Adds protobufIO subdirectory which contains a google protobuf-based binary event stream HepMC3::Reader and HepMC3::Writer implementation along with a very simple test application.
  • The proto message definitions are defined in both proto2 and proto3 syntax, which are interoperable, the right file is chosen based on the version of libprotoc found at runtime. These are compiled to a c++ (de)-serialiser by the protoc compiler.
  • Adds the HepMC3::Readerprotobuf to the ReaderFactory system via HepMC3::deduce_reader, taking a leaf out of ROOT's tree, files written by the HepMC3::{Reader,Writer}protobuf demarcate themselves with a magic ASCII calling card as the first 16 bytes of the file. All other bytes are written as protobuf messages.

CI

  • Sources protobuf from the LCG release to test the build

TODO

  • Ensure that the Protobuf_[INCLUDES,LIBRARY] CMake variables are correctly propagated to HepMC3Config.cmake
Edited by Andrii Verbytskyi

Merge request reports