Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:28:50

0001 #include <HepMC/GenParticle.h>
0002 #include <HepMC/GenVertex.h>
0003 #include <iostream>
0004 
0005 //HACK We need to change the internals of GenVertex when reading
0006 // back via ROOT. We use the private access of GenEvent to 
0007 // accomplish it.
0008 namespace HepMC {
0009   class GenEvent {
0010   public:
0011     static void clear_particles_in(HepMC::GenVertex* iVertex) {
0012       iVertex->m_particles_in.clear();
0013     }
0014     static void add_to_particles_in(HepMC::GenVertex* iVertex, HepMC::GenParticle* iPart) {
0015       iVertex->m_particles_in.push_back(iPart);
0016     }
0017   };
0018 }
0019 
0020 
0021 namespace hepmc_rootio {                                                                                                                
0022   void add_to_particles_in(HepMC::GenVertex* iVertex, HepMC::GenParticle* iPart) {
0023     HepMC::GenEvent::add_to_particles_in(iVertex, iPart);
0024   }
0025 
0026   void clear_particles_in(HepMC::GenVertex* iVertex) {
0027     HepMC::GenEvent::clear_particles_in(iVertex);
0028   }
0029 }