HepMC3 event record library
protobufUtils.h
Go to the documentation of this file.
1/**
2 * @file protobufUtils.h
3 * @brief Definition of utility functions for protobufIO
4 *
5 */
6#include "HepMC3/GenEvent.h"
7#include "HepMC3/GenRunInfo.h"
8
9// protobuf header files
10#include "HepMC3/HepMC3.pb.h"
11
12#include <memory>
13#include <string>
14
15namespace HepMC3 {
16
17namespace Serialize {
18
19std::string GenRunInfo(GenRunInfo const &run_info);
20std::string GenEvent(GenEvent const &evt);
21
22} // namespace Serialize
23
24namespace Deserialize {
25
26bool GenRunInfo(std::string const &,
27 std::shared_ptr<HepMC3::GenRunInfo> run_info);
28
29// Partial deserialization where the caller has already parsed the pb message
30void FillGenRunInfo(HepMC3_pb::GenRunInfoData const &gri_pb,
31 std::shared_ptr<HepMC3::GenRunInfo> run_info);
32
33bool GenEvent(std::string const &, HepMC3::GenEvent &evt);
34
35// Partial deserialization where the caller has already parsed the pb message
36void FillGenEvent(HepMC3_pb::GenEventData const &ged_pb, HepMC3::GenEvent &evt);
37
38} // namespace Deserialize
39
40} // namespace HepMC3
Definition of class GenEvent.
Definition of class GenRunInfo.
HepMC3 main namespace.