Skip to content

Print attributes hepmc3

Advanced print functions for HepMC

GenParticlePtr p;
std::cout<<p<<std::endl;

Would print just the particle. But sometimes it is needed to print the attributes.

So

GenParticlePtr p;
std::cout<<(p<<true)<<std::endl;

Would do the job.

This syntax is quite safe -- the missing brackets would not cause any harm.

Tag @jchapman @pclark

Merge request reports