23int main(
int argc, 
char **argv) {
 
   26        std::cout << 
"Usage: " << argv[0] << 
" <input_root_file> <output_hepmc3_file>" << std::endl;
 
   33    int events_parsed = 0;
 
   35    while( !root_input.failed() ) {
 
   39        root_input.read_event(evt);
 
   41        if( root_input.failed() ) 
break;
 
   43        if( events_parsed == 0 ) {
 
   44            std::cout << 
"First event: " << std::endl;
 
   48        text_output.write_event(evt);
 
   51        if( events_parsed%100 == 0 ) {
 
   52            std::cout << 
"Event: " << events_parsed << std::endl;
 
   59    std::cout << 
"Events parsed and written: " << events_parsed << std::endl;
 
Definition of class GenEvent.
Definition of static class Print.
Definition of class ReaderRoot.
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.
GenEvent I/O parsing and serialization for root files.
GenEvent I/O serialization for structured text files.