11#include "HepMC3TestUtils.h"
18 std::vector<GenEvent> inputA_events;
19 if(inputA.failed())
return 1;
20 while( !inputA.failed() )
23 inputA.read_event(evt);
24 if( inputA.failed() ) {
25 printf(
"End of file reached. Exit.\n");
28 inputA_events.push_back(evt);
32 if(outputA.failed())
return 2;
33 std::sort(inputA_events.begin(), inputA_events.end(), [](
const GenEvent& lhs,
const GenEvent& rhs) {
34 return lhs.event_number() < rhs.event_number();
36 for (
auto& e: inputA_events) outputA.write_event(e);
38 inputA_events.clear();
41 std::vector<GenEvent> inputB_events;
42 if(inputB.failed())
return 3;
43 while( !inputB.failed() )
46 inputB.read_event(evt);
47 if( inputB.failed() ) {
48 printf(
"End of file reached. Exit.\n");
51 inputB_events.push_back(evt);
55 if(outputB.failed())
return 4;
56 std::sort(inputB_events.begin(), inputB_events.end(), [](
const GenEvent& lhs,
const GenEvent& rhs) {
57 return lhs.event_number() < rhs.event_number();
59 for (
auto& e: inputB_events) outputB.write_event(e);
61 inputB_events.clear();
63 return COMPARE_ASCII_FILES(
"fromfrominputIO10.hepmc",
"inputIO10.hepmc");
Definition of class GenEvent.
Definition of class ReaderAsciiHepMC2.
Definition of class ReaderAscii.
Definition of class ReaderMT.
Definition of class WriterAsciiHepMC2.
Definition of class WriterAscii.
Stores event-related information.
Multithreader GenEvent I/O parsing.
GenEvent I/O serialization for structured text files.
GenEvent I/O serialization for structured text files.