HepMC3 event record library
PythiaValidationTool.cc
1 // -*- C++ -*-
2 //
3 // This file is part of HepMC
4 // Copyright (C) 2014-2019 The HepMC collaboration (see AUTHORS for details)
5 //
6 #include "PythiaValidationTool.h"
7 
8 PythiaValidationTool::PythiaValidationTool( const std::string &filename ):m_filename(filename),m_timer("pythia8 conversion time") {
9  m_pythia.readFile(m_filename);
10 }
11 
13  m_pythia.init();
14 }
15 
17  if( !m_pythia.next() ) return 1;
18 
19  // Exclude generation time
20  m_timer.start();
21 
22  m_tohepmc.fill_next_event(m_pythia.event, &hepmc, -1, &m_pythia.info);
23 
24  return 0;
25 }
26 
28 #ifdef PYTHIA_VERSION_INTEGER
29  if (PYTHIA_VERSION_INTEGER>8200) m_pythia.stat();
30 #else
31  m_pythia.statistics();
32 #endif
33 
34 }
void initialize()
Initialize.
Stores event-related information.
Definition: GenEvent.h:42
int process(GenEvent &hepmc)
Process event.