CMS 3D CMS Logo

hepmc_rootio.cc
Go to the documentation of this file.
1 #include <HepMC/GenParticle.h>
2 #include <HepMC/GenVertex.h>
3 #include <iostream>
4 
5 //HACK We need to change the internals of GenVertex when reading
6 // back via ROOT. We use the private access of GenEvent to
7 // accomplish it.
8 namespace HepMC {
9  class GenEvent {
10  public:
11  static void clear_particles_in(HepMC::GenVertex* iVertex) { iVertex->m_particles_in.clear(); }
12  static void add_to_particles_in(HepMC::GenVertex* iVertex, HepMC::GenParticle* iPart) {
13  iVertex->m_particles_in.push_back(iPart);
14  }
15  };
16 } // namespace HepMC
17 
18 namespace hepmc_rootio {
19  void add_to_particles_in(HepMC::GenVertex* iVertex, HepMC::GenParticle* iPart) {
21  }
22 
23  void clear_particles_in(HepMC::GenVertex* iVertex) { HepMC::GenEvent::clear_particles_in(iVertex); }
24 } // namespace hepmc_rootio
static void clear_particles_in(HepMC::GenVertex *iVertex)
Definition: hepmc_rootio.cc:11
void add_to_particles_in(HepMC::GenVertex *, HepMC::GenParticle *)
Definition: hepmc_rootio.cc:19
void clear_particles_in(HepMC::GenVertex *)
Definition: hepmc_rootio.cc:23
static void add_to_particles_in(HepMC::GenVertex *iVertex, HepMC::GenParticle *iPart)
Definition: hepmc_rootio.cc:12