HepMC3 event record library
PrintStreams.h
Go to the documentation of this file.
1// -*- C++ -*-
2//
3// This file is part of HepMC
4// Copyright (C) 2014-2021 The HepMC collaboration (see AUTHORS for details)
5//
6#ifndef HEPMC3_PRINTSTREAMS_H
7#define HEPMC3_PRINTSTREAMS_H
8///
9/// @file PrintStreams.h
10/// @brief Implementation of ostreams for the objects
11///
12
13#include "HepMC3/GenEvent.h"
14#include "HepMC3/GenVertex.h"
15#include "HepMC3/GenParticle.h"
16#include "HepMC3/Print.h"
17
18namespace HepMC3 {
19/// @brief Print content of all GenEvent containers with idiomatic C++ printing.
20/// @note More generic printing methods from HepMC3::Print should be preffered
21inline std::ostream& operator<<(std::ostream& os, const GenEvent &event) { Print::content(os,event); return os; }
22
23/// @brief Print one-line info with idiomatic C++ printing
24/// @note More generic printing methods from HepMC3::Print should be preffered
25inline std::ostream& operator<<(std::ostream& os, ConstGenVertexPtr v) { Print::line(os,v); return os; }
26
27/// @brief Print one-line info with idiomatic C++ printing
28/// @note More generic printing methods from HepMC3::Print should be preffered
29inline std::ostream& operator<<(std::ostream& os, ConstGenParticlePtr p) { Print::line(os,p); return os; }
30
31/// @brief Print one-line info with idiomatic C++ printing
32/// @note More generic printing methods from HepMC3::Print should be preffered
33inline std::ostream& operator<<(std::ostream& os, std::shared_ptr<GenCrossSection> &cs) { Print::line(os,cs); return os; }
34
35/// @brief Print one-line info with idiomatic C++ printing
36/// @note More generic printing methods from HepMC3::Print should be preffered
37inline std::ostream& operator<<(std::ostream& os, std::shared_ptr<GenHeavyIon> &hi) { Print::line(os,hi); return os; }
38
39/// @brief Print one-line info with idiomatic C++ printing
40/// @note More generic printing methods from HepMC3::Print should be preffered
41inline std::ostream& operator<<(std::ostream& os, std::shared_ptr<GenPdfInfo> &pi) { Print::line(os,pi); return os; }
42
43/// @brief Print one-line info with idiomatic C++ printing
44/// @note More generic printing methods from HepMC3::Print should be preffered
45inline std::ostream& operator<<(std::ostream& os, const FourVector& p) { Print::line(os,p); return os; }
46
47/// @brief Print one-line info with idiomatic C++ printing
48/// @note More generic printing methods from HepMC3::Print should be preffered
49inline std::ostream& operator<<(std::ostream& os, const GenRunInfo::ToolInfo& t) { Print::line(os,t); return os; }
50
51/// @brief Print one-line info with idiomatic C++ printing
52/// @note More generic printing methods from HepMC3::Print should be preffered
53inline std::ostream& operator<<(std::ostream& os,const GenRunInfo &ri) { Print::line(os,ri); return os; }
54
55
56
57} // namespace HepMC3
58
59#endif
Definition of class GenEvent.
Definition of class GenParticle.
Definition of class GenVertex.
Definition of static class Print.
Generic 4-vector.
Definition: FourVector.h:36
Stores event-related information.
Definition: GenEvent.h:41
Stores run-related information.
Definition: GenRunInfo.h:33
static void content(std::ostream &os, const GenEvent &event)
Print content of all GenEvent containers.
Definition: Print.cc:17
static void line(std::ostream &os, const GenEvent &event, bool attributes=false)
Print one-line info.
Definition: Print.cc:202
HepMC3 main namespace.
std::ostream & operator<<(std::ostream &os, const GenEvent &event)
Print content of all GenEvent containers with idiomatic C++ printing.
Definition: PrintStreams.h:21
Interrnal struct for keeping track of tools.
Definition: GenRunInfo.h:38