|
| static void | content (const GenEvent &event) |
| | Print content of all GenEvent containers to std::cout.
|
| |
| static void | content (std::ostream &os, const GenEvent &event) |
| | Print content of all GenEvent containers.
|
| |
| static void | line (const FourVector &p) |
| | Print one-line info to std::cout.
|
| |
| static void | line (const GenEvent &event, bool attributes=false) |
| | Print one-line info to std::cout.
|
| |
| static void | line (const GenRunInfo &RunInfo, bool attributes=false) |
| | Print one-line info to std::cout.
|
| |
| static void | line (const GenRunInfo::ToolInfo &t) |
| | Print one-line info to std::cout.
|
| |
| static void | line (ConstGenParticlePtr p, bool attributes=false) |
| | Print one-line info to std::cout.
|
| |
| static void | line (ConstGenVertexPtr v, bool attributes=false) |
| | Print one-line info to std::cout.
|
| |
| static void | line (GenParticlePtr p, bool attributes=false) |
| | Print one-line info to std::cout.
|
| |
| static void | line (GenVertexPtr v, bool attributes=false) |
| | Print one-line info to std::cout.
|
| |
| static void | line (std::ostream &os, const FourVector &p) |
| | Print one-line info.
|
| |
| static void | line (std::ostream &os, const GenEvent &event, bool attributes=false) |
| | Print one-line info.
|
| |
| static void | line (std::ostream &os, const GenRunInfo &RunInfo, bool attributes=false) |
| | Print one-line info.
|
| |
| static void | line (std::ostream &os, const GenRunInfo::ToolInfo &t) |
| | Print one-line info.
|
| |
| static void | line (std::ostream &os, ConstGenParticlePtr p, bool attributes=false) |
| | Print one-line info.
|
| |
| static void | line (std::ostream &os, ConstGenVertexPtr v, bool attributes=false) |
| | Print one-line info.
|
| |
| static void | line (std::ostream &os, GenParticlePtr p, bool attributes=false) |
| | Print one-line info.
|
| |
| static void | line (std::ostream &os, GenVertexPtr v, bool attributes=false) |
| | Print one-line info.
|
| |
| static void | line (std::ostream &os, std::shared_ptr< GenCrossSection > &cs) |
| | Print one-line info.
|
| |
| static void | line (std::ostream &os, std::shared_ptr< GenHeavyIon > &hi) |
| | Print one-line info.
|
| |
| static void | line (std::ostream &os, std::shared_ptr< GenPdfInfo > &pi) |
| | Print one-line info.
|
| |
| static void | line (std::shared_ptr< GenCrossSection > &cs) |
| | Print one-line info to std::cout.
|
| |
| static void | line (std::shared_ptr< GenHeavyIon > &hi) |
| | Print one-line info to std::cout.
|
| |
| static void | line (std::shared_ptr< GenPdfInfo > &pi) |
| | Print one-line info to std::cout.
|
| |
| static void | listing (const GenEvent &event, unsigned short precision=2) |
| | Print event in listing (HepMC2) format to std::cout.
|
| |
| static void | listing (const GenRunInfo &ri, unsigned short precision=2) |
| | Print runinfo in listing to std::cout.
|
| |
| static void | listing (std::ostream &os, const GenEvent &event, unsigned short precision=2) |
| | Print event in listing (HepMC2) format.
|
| |
| static void | listing (std::ostream &os, const GenRunInfo &ri, unsigned short precision=2) |
| | Print runinfo in listing.
|
| |
Provides different printing formats.
Definition at line 27 of file Print.h.
| void HepMC3::Print::listing |
( |
std::ostream & | os, |
|
|
const GenEvent & | event, |
|
|
unsigned short | precision = 2 ) |
|
static |
Print event in listing (HepMC2) format.
Definition at line 1419 of file marley_hepmc3.cc.
1419 {
1420
1421 std::ios_base::fmtflags orig = os.flags();
1422 std::streamsize prec = os.precision();
1423
1424
1425 os.precision(precision);
1426
1427 os << "________________________________________________________________________" << std::endl;
1428 os << "GenEvent: #" << event.event_number() << std::endl;
1429 os <<
" Momentum units: " <<
Units::name(event.momentum_unit())
1430 <<
" Position units: " <<
Units::name(event.length_unit()) << std::endl;
1431 os << " Entries in this event: " << event.vertices().size() << " vertices, "
1432 << event.particles().size() << " particles, "
1433 << event.weights().size() << " weights." << std::endl;
1434
1435 const FourVector &pos = event.event_pos();
1436 os << " Position offset: " << pos.x() << ", " << pos.y() << ", " << pos.z() << ", " << pos.t() << std::endl;
1437
1438
1439 os << " GenParticle Legend" << std::endl;
1440 os << " ID PDG ID "
1441 << "( px, py, pz, E )"
1442 << " Stat ProdVtx" << std::endl;
1443 os << "________________________________________________________________________" << std::endl;
1444
1445
1446 for (const ConstGenVertexPtr& v: event.vertices()) {
1448 }
1449
1450
1451 os.flags(orig);
1452 os.precision(prec);
1453 os << "________________________________________________________________________" << std::endl;
1454}
static std::string name(MomentumUnit u)
Get name of momentum unit.
References HepMC3::GenEvent::length_unit(), listing(), HepMC3::GenEvent::momentum_unit(), HepMC3::Units::name(), HepMC3::FourVector::t(), HepMC3::GenEvent::vertices(), HepMC3::FourVector::x(), HepMC3::FourVector::y(), and HepMC3::FourVector::z().
Referenced by listing(), listing(), and listing().