HepMC3 event record library
include
HepMC3
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
18
namespace
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
21
inline
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
25
inline
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
29
inline
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
33
inline
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
37
inline
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
41
inline
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
45
inline
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
49
inline
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
53
inline
std::ostream&
operator<<
(std::ostream& os,
const
GenRunInfo
&ri) {
Print::line
(os,ri);
return
os; }
54
55
56
57
}
// namespace HepMC3
58
59
#endif
GenEvent.h
Definition of class GenEvent.
GenParticle.h
Definition of class GenParticle.
GenVertex.h
Definition of class GenVertex.
Print.h
Definition of static class Print.
HepMC3::FourVector
Generic 4-vector.
Definition:
FourVector.h:36
HepMC3::GenEvent
Stores event-related information.
Definition:
GenEvent.h:41
HepMC3::GenRunInfo
Stores run-related information.
Definition:
GenRunInfo.h:33
HepMC3::Print::content
static void content(std::ostream &os, const GenEvent &event)
Print content of all GenEvent containers.
Definition:
Print.cc:17
HepMC3::Print::line
static void line(std::ostream &os, const GenEvent &event, bool attributes=false)
Print one-line info.
Definition:
Print.cc:202
HepMC3
HepMC3 main namespace.
Definition:
AnalysisExample.h:19
HepMC3::operator<<
std::ostream & operator<<(std::ostream &os, const GenEvent &event)
Print content of all GenEvent containers with idiomatic C++ printing.
Definition:
PrintStreams.h:21
HepMC3::GenRunInfo::ToolInfo
Interrnal struct for keeping track of tools.
Definition:
GenRunInfo.h:38
Generated on Wed Jan 18 2023 00:00:00 for HepMC3 event record library by
1.9.6