23int main(
int argc,
char **argv) {
26 cout <<
"Usage: " << argv[0] <<
" <input_hepmc3_file> <output_root_file>" << endl;
33 int events_parsed = 0;
35 while( !text_input.failed() ) {
39 text_input.read_event(evt);
41 if( text_input.failed() )
break;
43 if( events_parsed == 0 ) {
44 cout <<
"First event: " << endl;
48 root_output.write_event(evt);
51 if( events_parsed%100 == 0 ) {
52 cout <<
"Event: " << events_parsed << endl;
59 std::cout <<
"Events parsed and written: " << events_parsed << std::endl;
Definition of class GenEvent.
Definition of static class Print.
Definition of class ReaderAscii.
Definition of class WriterRoot.
Stores event-related information.
GenEvent I/O parsing for structured text files.
GenEvent I/O serialization for root files.
int main(int argc, char **argv)