24int main(
int argc, 
char **argv) {
 
   27        std::cout<<
"Usage: " << argv[0] <<
" <input_hepmc2_file> <output_hepmc3_file> [<optional_events_limit>]" << std::endl;
 
   34    int events_parsed = 0;
 
   37    if( argc >= 4 ) events_limit = atoi(argv[3]);
 
   39    while( !adapter.failed() ) {
 
   43        adapter.read_event(evt);
 
   46        if( adapter.failed() ) 
break;
 
   49        output_file.write_event(evt);
 
   51        if(events_parsed==0) {
 
   52            std::cout << 
" First event: " << std::endl;
 
   57        if( events_parsed%100 == 0 ) std::cout<<
"Events parsed: "<<events_parsed<<std::endl;
 
   58        if( events_limit && events_parsed >= events_limit ) 
break;
 
Definition of class GenEvent.
Definition of static class Print.
Definition of class ReaderAsciiHepMC2.
Definition of class WriterAscii.
Stores event-related information.
static void listing(std::ostream &os, const GenEvent &event, unsigned short precision=2)
Print event in listing (HepMC2) format.
Parser for HepMC2 I/O files.
GenEvent I/O serialization for structured text files.