6 #ifndef ATLASHEPMC_GENVERTEX_H
7 #define ATLASHEPMC_GENVERTEX_H
9 #include "HepMC3/GenVertex.h"
10 #include "HepMC3/PrintStreams.h"
13 inline std::vector<HepMC3::ConstGenParticlePtr>::const_iterator
begin(
const HepMC3::GenVertex&
v) {
return v.particles_out().begin(); }
14 inline std::vector<HepMC3::ConstGenParticlePtr>::const_iterator
end(
const HepMC3::GenVertex&
v) {
return v.particles_out().end(); }
15 inline std::vector<HepMC3::GenParticlePtr>::const_iterator
begin(HepMC3::GenVertex&
v) {
return v.particles_out().begin(); }
16 inline std::vector<HepMC3::GenParticlePtr>::const_iterator
end(HepMC3::GenVertex&
v) {
return v.particles_out().end(); }
33 auto e =
p->parent_event();
35 std::shared_ptr<HepMC3::IntAttribute>
barcode=
e->attribute<HepMC3::IntAttribute>(
"barcode",
p->id());
41 auto e =
p->parent_event();
43 std::shared_ptr<HepMC3::IntAttribute>
barcode=
e->attribute<HepMC3::IntAttribute>(
"barcode",
p->id());
46 inline int barcode(
const HepMC3::GenVertex&
p) {
47 auto e =
p.parent_event();
49 std::shared_ptr<HepMC3::IntAttribute>
barcode=
e->attribute<HepMC3::IntAttribute>(
"barcode",
p.id());
53 using HepMC3::GenVertex;
61 inline GenVertex::particles_out_const_iterator
begin(
const HepMC::GenVertex&
v) {
return v.particles_out_const_begin(); }
62 inline GenVertex::particles_out_const_iterator
end(
const HepMC::GenVertex&
v) {
return v.particles_out_const_end(); }
65 return new HepMC::GenVertex(
pos,
i);
68 inline void line(std::ostream&
os,
const GenVertex&
v) {
v.print(
os);}
69 inline void line(std::ostream&
os,
const GenVertex*
v) {
v->print(
os);}
72 inline std::ostream&
operator<<( std::ostream&
os,
const GenVertex*
v ) {
if (
v)
return os<<(*v);
else return os;}