hepmc - Blame information for rev 43

Subversion Repositories:
Rev:
Rev Author Line No. Line
24 garren 1 //
2 // Thanks to Bob McElrath and Frank Siegert for this test
3 //
4  
5 #include <fstream>
6  
7 #include "HepMC/GenEvent.h"
43 garren 8 #include "HepMC/SimpleVector.h"
24 garren 9  
10 int main(int argc,char* argv[])
11 {
12   HepMC::GenEvent* p_event;
13  
14   p_event = new HepMC::GenEvent();
15  
16   // define an output stream
17   std::ofstream os( "testPrintBug.out" );
18  
19   for(int i=0; i<10; i++) {
43 garren 20     HepMC::FourVector vector(1.0,1.0,1.0,1.0);
24 garren 21     HepMC::GenVertex* vertex = new HepMC::GenVertex(vector,i);
22     for(int j=0; j<3; j++) {
23       HepMC::GenParticle* particle = new HepMC::GenParticle(vector,1,2);
24       vertex->add_particle_in(particle);
25     }
26     for(int j=0; j<3; j++) {
27       HepMC::GenParticle* particle = new HepMC::GenParticle(vector,1,2);
28       vertex->add_particle_out(particle);
29     }
30     p_event->add_vertex(vertex);
31   }
32   p_event->print(os);
33 }