HepMC event record
include/HepMC/Print.h
1 // -*- C++ -*-
2 //
3 // This file is part of HepMC
4 // Copyright (C) 2014-2015 The HepMC collaboration (see AUTHORS for details)
5 //
6 #ifndef HEPMC_PRINT_H
7 #define HEPMC_PRINT_H
8 ///
9 /// @file Print.h
10 /// @brief Definition of static \b class Print
11 ///
12 
13 #include "HepMC/GenEvent.h"
14 #include "HepMC/GenVertex.h"
15 #include "HepMC/GenParticle.h"
16 
17 namespace HepMC {
18 
19 
20 class GenPdfInfo;
21 class GenHeavyIon;
22 class GenCrossSection;
23 
24 
25 /// @brief Provides different printing formats
26 /// @todo This class has no state -- why isn't it just a namespace with free functions?
27 class Print {
28 public:
29  /// @brief Print content of all GenEvent containers
30  static void content(const GenEvent &event);
31 
32  /// @brief Print event in listing (HepMC2) format
33  static void listing(const GenEvent &event, unsigned short precision = 2);
34 
35  /// @brief Print one-line info
36  static void line(const GenEvent &event);
37 
38  /// @brief Print one-line info
39  static void line(const GenVertexPtr &v);
40 
41  /// @brief Print one-line info
42  static void line(const GenParticlePtr &p);
43 
44  /// @brief Print one-line info
45  static void line(shared_ptr<GenCrossSection> &cs);
46 
47  /// @brief Print one-line info
48  static void line(shared_ptr<GenHeavyIon> &hi);
49 
50  /// @brief Print one-line info
51  static void line(shared_ptr<GenPdfInfo> &pi);
52 
53 private:
54  /// @brief Helper function for printing a vertex in listing format
55  static void listing(const GenVertexPtr &v);
56 
57  /// @brief Helper function for printing a particle in listing format
58  static void listing(const GenParticlePtr &p);
59 
60  virtual ~Print() {}
61 };
62 
63 
64 } // namespace HepMC
65 
66 #endif
static void listing(const GenEvent &event, unsigned short precision=2)
Print event in listing (HepMC2) format.
Definition: Print.cc:57
SmartPointer< class GenParticle > GenParticlePtr
Smart pointer to GenParticle.
static void line(const GenEvent &event)
Print one-line info.
static void content(const GenEvent &event)
Print content of all GenEvent containers.
Definition: Print.cc:20
Definition of template class SmartPointer.
SmartPointer< class GenVertex > GenVertexPtr
Smart pointer to GenVertex.