HepMC3 event record library: Print Class Reference

HepMC3 event record library

Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions
Print Class Reference

## Detailed Description

Provides different printing formats.

Definition at line 27 of file Print.h.

`#include <Print.h>`

## Public Member Functions
Print & | operator= (const Print &)=delete
| deleted copy assignment operator

## Static Public Member Functions
static void | content (std::ostream &os, const GenEvent &event)
| Print content of all GenEvent containers.
static void | content (const GenEvent &event)
| Print content of all GenEvent containers 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 (const GenEvent &event, unsigned short precision=2)
| Print event in listing (HepMC2) format to std::cout.
static void | listing (std::ostream &os, const GenRunInfo &ri, unsigned short precision=2)
| Print runinfo in listing.
static void | listing (const GenRunInfo &ri, unsigned short precision=2)
| Print runinfo in listing to std::cout.
static void | line (std::ostream &os, const GenEvent &event, bool attributes=false)
| Print one-line info.
static void | line (const GenEvent &event, bool attributes=false)
| Print one-line info to std::cout.
static void | line (std::ostream &os, const GenRunInfo &RunInfo, bool attributes=false)
| Print one-line info.
static void | line (const GenRunInfo &RunInfo, bool attributes=false)
| Print one-line info to std::cout.
static void | line (std::ostream &os, const GenRunInfo::ToolInfo &t)
| Print one-line info.
static void | line (const GenRunInfo::ToolInfo &t)
| Print one-line info to std::cout.
static void | line (std::ostream &os, ConstGenVertexPtr v, bool attributes=false)
| Print one-line info.
static void | line (ConstGenVertexPtr v, bool attributes=false)
| Print one-line info to std::cout.
static void | line (std::ostream &os, GenVertexPtr v, bool attributes=false)
| Print one-line info.
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 (const FourVector &p)
| Print one-line info to std::cout.
static void | line (std::ostream &os, ConstGenParticlePtr p, bool attributes=false)
| Print one-line info.
static void | line (ConstGenParticlePtr p, bool attributes=false)
| Print one-line info to std::cout.
static void | line (std::ostream &os, GenParticlePtr p, bool attributes=false)
| Print one-line info.
static void | line (GenParticlePtr p, bool attributes=false)
| Print one-line info to std::cout.
static void | line (std::ostream &os, std::shared_ptr< GenCrossSection > &cs)
| Print one-line info.
static void | line (std::shared_ptr< GenCrossSection > &cs)
| Print one-line info to std::cout.
static void | line (std::ostream &os, std::shared_ptr< GenHeavyIon > &hi)
| Print one-line info.
static void | line (std::shared_ptr< GenHeavyIon > &hi)
| Print one-line info to std::cout.
static void | line (std::ostream &os, std::shared_ptr< GenPdfInfo > &pi)
| Print one-line info.
static void | line (std::shared_ptr< GenPdfInfo > &pi)
| Print one-line info to std::cout.

## Private Member Functions
virtual | ~Print ()
| Destructor.

## Static Private Member Functions
static void | listing (std::ostream &os, ConstGenVertexPtr v)
| Helper function for printing a vertex in listing format.
static void | listing (std::ostream &os, ConstGenParticlePtr p)
| Helper function for printing a particle in listing format.

## Constructor & Destructor Documentation

## ◆ ~Print()

virtual ~Print | ( |  | ) |
| inlineprivatevirtual

Destructor.

Definition at line 150 of file Print.h.

## Member Function Documentation

## ◆ content() [1/2]

void content | ( | const GenEvent & | event | ) |
| inlinestatic

Print content of all GenEvent containers to std::cout.

Definition at line 32 of file Print.h.

References content().

## ◆ content() [2/2]

void content | ( | std::ostream & | os,
|  | const GenEvent & | event )
| static

Print content of all GenEvent containers.

Examples
  HepMC3_fileIO_example.cc, basic_tree.cc, and convert_example.cc.

Definition at line 17 of file Print.cc.

References GenEvent::attributes(), line(), GenEvent::particles(), GenEvent::vertices(), and GenEvent::weights().

## ◆ line() [1/22]

void line | ( | const FourVector & | p | ) |
| inlinestatic

Print one-line info to std::cout.

Definition at line 93 of file Print.h.

References line().

## ◆ line() [2/22]

void line | ( | const GenEvent & | event,
|  | bool | attributes = false )
| inlinestatic

Print one-line info to std::cout.

Definition at line 51 of file Print.h.

References line().

## ◆ line() [3/22]

void line | ( | const GenRunInfo & | RunInfo,
|  | bool | attributes = false )
| inlinestatic

Print one-line info to std::cout.

Definition at line 59 of file Print.h.

References line().

## ◆ line() [4/22]

void line | ( | const GenRunInfo::ToolInfo & | t | ) |
| inlinestatic

Print one-line info to std::cout.

Definition at line 67 of file Print.h.

References line().

## ◆ line() [5/22]

void line | ( | ConstGenParticlePtr | p,
|  | bool | attributes = false )
| inlinestatic

Print one-line info to std::cout.

Definition at line 101 of file Print.h.

References line().

## ◆ line() [6/22]

void line | ( | ConstGenVertexPtr | v,
|  | bool | attributes = false )
| inlinestatic

Print one-line info to std::cout.

Definition at line 77 of file Print.h.

References line().

## ◆ line() [7/22]

void line | ( | GenParticlePtr | p,
|  | bool | attributes = false )
| inlinestatic

Print one-line info to std::cout.

Definition at line 109 of file Print.h.

References line().

## ◆ line() [8/22]

void line | ( | GenVertexPtr | v,
|  | bool | attributes = false )
| inlinestatic

Print one-line info to std::cout.

Definition at line 85 of file Print.h.

References line().

## ◆ line() [9/22]

void line | ( | std::ostream & | os,
|  | const FourVector & | p )
| static

Print one-line info.

Definition at line 256 of file Print.cc.

References FourVector::e(), FourVector::x(), FourVector::y(), and FourVector::z().

## ◆ line() [10/22]

void line | ( | std::ostream & | os,
|  | const GenEvent & | event,
|  | bool | attributes = false )
| static

Print one-line info.

Examples
  HepMC3_fileIO_example.cc, and basic_tree.cc.

Definition at line 204 of file Print.cc.

References GenEvent::attribute_names().

## ◆ line() [11/22]

void line | ( | std::ostream & | os,
|  | const GenRunInfo & | RunInfo,
|  | bool | attributes = false )
| static

Print one-line info.

Definition at line 213 of file Print.cc.

References GenRunInfo::attribute_as_string(), GenRunInfo::attribute_names(), and GenRunInfo::tools().

## ◆ line() [12/22]

void line | ( | std::ostream & | os,
|  | const GenRunInfo::ToolInfo & | t )
| static

Print one-line info.

Definition at line 223 of file Print.cc.

References GenRunInfo::ToolInfo::description, GenRunInfo::ToolInfo::name, and GenRunInfo::ToolInfo::version.

## ◆ line() [13/22]

void line | ( | std::ostream & | os,
|  | ConstGenParticlePtr | p,
|  | bool | attributes = false )
| static

Print one-line info.

Definition at line 324 of file Print.cc.

## ◆ line() [14/22]

void line | ( | std::ostream & | os,
|  | ConstGenVertexPtr | v,
|  | bool | attributes = false )
| static

Print one-line info.

Definition at line 251 of file Print.cc.

## ◆ line() [15/22]

void line | ( | std::ostream & | os,
|  | GenParticlePtr | p,
|  | bool | attributes = false )
| static

Print one-line info.

Definition at line 325 of file Print.cc.

## ◆ line() [16/22]

void line | ( | std::ostream & | os,
|  | GenVertexPtr | v,
|  | bool | attributes = false )
| static

Print one-line info.

Definition at line 252 of file Print.cc.

## ◆ line() [17/22]

void line | ( | std::ostream & | os,
|  | std::shared_ptr< GenCrossSection > & | cs )
| static

Print one-line info.

Definition at line 327 of file Print.cc.

## ◆ line() [18/22]

void line | ( | std::ostream & | os,
|  | std::shared_ptr< GenHeavyIon > & | hi )
| static

Print one-line info.

Definition at line 335 of file Print.cc.

## ◆ line() [19/22]

void line | ( | std::ostream & | os,
|  | std::shared_ptr< GenPdfInfo > & | pi )
| static

Print one-line info.

Definition at line 352 of file Print.cc.

## ◆ line() [20/22]

void line | ( | std::shared_ptr< GenCrossSection > & | cs | ) |
| inlinestatic

Print one-line info to std::cout.

Definition at line 118 of file Print.h.

References line().

## ◆ line() [21/22]

void line | ( | std::shared_ptr< GenHeavyIon > & | hi | ) |
| inlinestatic

Print one-line info to std::cout.

Definition at line 126 of file Print.h.

References line().

## ◆ line() [22/22]

void line | ( | std::shared_ptr< GenPdfInfo > & | pi | ) |
| inlinestatic

Print one-line info to std::cout.

Definition at line 134 of file Print.h.

References line().

## ◆ listing() [1/6]

void listing | ( | const GenEvent & | event,
|  | unsigned short | precision = 2 )
| inlinestatic

Print event in listing (HepMC2) format to std::cout.

Definition at line 37 of file Print.h.

References listing().

## ◆ listing() [2/6]

void listing | ( | const GenRunInfo & | ri,
|  | unsigned short | precision = 2 )
| inlinestatic

Print runinfo in listing to std::cout.

Definition at line 44 of file Print.h.

References listing().

## ◆ listing() [3/6]

void listing | ( | std::ostream & | os,
|  | const GenEvent & | event,
|  | unsigned short | precision = 2 )
| static

Print event in listing (HepMC2) format.

Examples
  HepMC2_reader_example.cc, HepMC3_fileIO_example.cc, basic_tree.cc, class_example_read.cc, class_example_write.cc, pythia8_example.cc, rootIO_example_read.cc, and rootIO_example_write.cc.

Definition at line 52 of file Print.cc.

References GenEvent::length_unit(), listing(), GenEvent::momentum_unit(), Units::name(), FourVector::t(), GenEvent::vertices(), FourVector::x(), FourVector::y(), and FourVector::z().

## ◆ listing() [4/6]

void listing | ( | std::ostream & | os,
|  | const GenRunInfo & | ri,
|  | unsigned short | precision = 2 )
| static

Print runinfo in listing.

Definition at line 89 of file Print.cc.

References GenRunInfo::attributes(), HEPMC3_WARNING_LEVEL, line(), GenRunInfo::tools(), and GenRunInfo::weight_names().

## ◆ listing() [5/6]

void listing | ( | std::ostream & | os,
|  | ConstGenParticlePtr | p )
| staticprivate

Helper function for printing a particle in listing format.

Definition at line 169 of file Print.cc.

References FourVector::e(), FourVector::px(), FourVector::py(), and FourVector::pz().

## ◆ listing() [6/6]

void listing | ( | std::ostream & | os,
|  | ConstGenVertexPtr | v )
| staticprivate

Helper function for printing a vertex in listing format.

Definition at line 126 of file Print.cc.

References FourVector::is_zero(), listing(), FourVector::t(), FourVector::x(), FourVector::y(), and FourVector::z().

## ◆ operator=()

Print & operator= | ( | const Print & |  | ) |
| delete

deleted copy assignment operator

The documentation for this class was generated from the following files:

- Print.h
- Print.cc