hepmc - Diff between revs 2 and 63

Subversion Repositories:
Rev:
Show entire file - Ignore whitespace
Rev 2 Rev 63
Line 58... Line 58...
58     //........................................HepMC INITIALIZATIONS 58     //........................................HepMC INITIALIZATIONS
59     // 59     //
60     // Instantiate an IO strategy for reading from HEPEVT. 60     // Instantiate an IO strategy for reading from HEPEVT.
61     HepMC::IO_HEPEVT hepevtio; 61     HepMC::IO_HEPEVT hepevtio;
62     // 62     //
63     // Instantial an IO strategy to write the data to file - it uses the -  
64     //  same ParticleDataTable -  
65     HepMC::IO_Ascii ascii_io("example_MyPythia.dat",std::ios::out); -  
66     // -  
67     //........................................EVENT LOOP -  
68     for ( int i = 1; i <= 100; i++ ) { -  
69         if ( i%50==1 ) std::cout << "Processing Event Number " -  
70                                  << i << std::endl; -  
71         call_pyevnt();      // generate one event with Pythia -  
72         // pythia pyhepc routine converts common PYJETS in common HEPEVT -  
73         call_pyhepc( 1 ); -  
74         HepMC::GenEvent* evt = hepevtio.read_next_event(); -  
75         // add some information to the event -  
76         evt->set_event_number(i); -  
77         evt->set_signal_process_id(20); -  
78         // write the event out to the ascii file -  
79         ascii_io << evt; -  
80         // we also need to delete the created event from memory -  
81         delete evt; -  
82     } -  
83     //........................................TERMINATION -  
84     // write out some information from Pythia to the screen -  
85     call_pystat( 1 );     -  
-   63     { // begin scope of ascii_io
-   64         // Instantiate an IO strategy to write the data to file
-   65         HepMC::IO_Ascii ascii_io("example_MyPythia.dat",std::ios::out);
-   66         //
-   67         //........................................EVENT LOOP
-   68         for ( int i = 1; i <= 100; i++ ) {
-   69             if ( i%50==1 ) std::cout << "Processing Event Number "
-   70                                      << i << std::endl;
-   71             call_pyevnt();      // generate one event with Pythia
-   72             // pythia pyhepc routine converts common PYJETS in common HEPEVT
-   73             call_pyhepc( 1 );
-   74             HepMC::GenEvent* evt = hepevtio.read_next_event();
-   75             // add some information to the event
-   76             evt->set_event_number(i);
-   77             evt->set_signal_process_id(20);
-   78             // write the event out to the ascii file
-   79             ascii_io << evt;
-   80             // we also need to delete the created event from memory
-   81             delete evt;
-   82         }
-   83         //........................................TERMINATION
-   84         // write out some information from Pythia to the screen
-   85         call_pystat( 1 );    
-   86     } // end scope of ascii_io
86 87
87     return 0; 88     return 0;
88 } 89 }
89 90
90 91