HepMC3 event record library
|
10 #include "HepMC3/ReaderFactory.h"
11 #include "HepMC3TestUtils.h"
15 std::shared_ptr<Reader> inputA =
deduce_reader(
"inputReaderFactory1.hepmc");
16 if(inputA->
failed())
return 1;
17 WriterAscii outputA(
"frominputReaderFactory1.hepmc");
18 if(outputA.failed())
return 2;
24 printf(
"End of file reached. Exit.\n");
27 outputA.write_event(evt);
34 std::shared_ptr<Reader> inputB =
deduce_reader(
"frominputReaderFactory1.hepmc");
35 if(inputB->
failed())
return 3;
37 if(outputB.failed())
return 4;
43 printf(
"End of file reached. Exit.\n");
46 outputB.write_event(evt);
51 return COMPARE_ASCII_FILES(
"fromfrominputReaderFactory1.hepmc",
"inputReaderFactory1.hepmc");
std::shared_ptr< Reader > deduce_reader(std::istream &stream)
This function will deduce the type of input stream based on its content and will return appropriate R...
Definition of class GenEvent.
GenEvent I/O serialization for structured text files.
Stores event-related information.
GenEvent I/O serialization for structured text files.
Definition of class ReaderAsciiHepMC2.
Definition of class WriterAscii.
Definition of class WriterAsciiHepMC2.
virtual bool failed()=0
Get file and/or stream error state.
virtual void close()=0
Close file and/or stream.
int main(int argc, char **argv)
virtual bool read_event(GenEvent &evt)=0
Fill next event from input into evt.