6 #include "HepMC3/ReaderFactory.h"
7 #include "HepMC3TestUtils.h"
8 using namespace HepMC3;
11 std::shared_ptr<Reader> inputA = deduce_reader(
"inputReaderFactory1.hepmc");
12 if(inputA->failed())
return 1;
13 WriterAscii outputA(
"frominputReaderFactory1.hepmc");
14 if(outputA.failed())
return 2;
15 while( !inputA->failed() )
18 inputA->read_event(evt);
19 if( inputA->failed() ) {printf(
"End of file reached. Exit.\n");
break;}
20 outputA.write_event(evt);
27 std::shared_ptr<Reader> inputB = deduce_reader(
"frominputReaderFactory1.hepmc");
28 if(inputB->failed())
return 3;
30 if(outputB.failed())
return 4;
31 while( !inputB->failed() )
34 inputB->read_event(evt);
35 if( inputB->failed() ) {printf(
"End of file reached. Exit.\n");
break;}
36 outputB.write_event(evt);
41 return COMPARE_ASCII_FILES(
"fromfrominputReaderFactory1.hepmc",
"inputReaderFactory1.hepmc");
GenEvent I/O serialization for structured text files.
Definition of class WriterAscii.
Definition of class ReaderAsciiHepMC2.
Stores event-related information.
Definition of class WriterAsciiHepMC2.
int main(int argc, char **argv)
Definition of class GenEvent.
GenEvent I/O serialization for structured text files.