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-2020 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
Definition of class GenParticle.
Stores run-related information.
Definition: GenRunInfo.h:33
Definition of class GenVertex.
Stores event-related information.
Definition: GenEvent.h:41
Generic 4-vector.
Definition: FourVector.h:35
Interrnal struct for keeping track of tools.
Definition: GenRunInfo.h:38
std::ostream & operator<<(std::ostream &os, const GenEvent &event)
Print content of all GenEvent containers with idiomatic C++ printing.
Definition: PrintStreams.h:21
static void line(std::ostream &os, const GenEvent &event, bool attributes=false)
Print one-line info.
Definition: Print.cc:202
Definition of class GenEvent.
static void content(std::ostream &os, const GenEvent &event)
Print content of all GenEvent containers.
Definition: Print.cc:17