HepMC3 event record library
OutputValidationTool.h
1 // -*- C++ -*-
2 //
3 // This file is part of HepMC
4 // Copyright (C) 2014-2019 The HepMC collaboration (see AUTHORS for details)
5 //
6 #ifndef OUTPUT_VALIDATION_TOOL_H
7 #define OUTPUT_VALIDATION_TOOL_H
8 
9 #ifdef HEPMC2
10 #include "HepMC/GenEvent.h"
11 #include "HepMC/IO_GenEvent.h"
12 #else
13 #include "HepMC3/GenEvent.h"
15 #endif
16 
17 #include "ValidationTool.h"
18 #include "Timer.h"
19 
20 /// @class OutputValidationTool
21 /// @brief Interface for validatio to Pythia
23 public:
24  OutputValidationTool( const std::string &filename ); ///< Constructor
25 
26  const std::string name() { return "OUTPUT"; }
27  const std::string long_name() { return name() + " config file: " + m_filename; }
28 
29  bool tool_modifies_event() { return false; }
30  Timer* timer() { return &m_timer; }
31 
32  void initialize();
33  int process(GenEvent &hepmc);
34  void finalize();
35 
36 private:
37  std::string m_filename; ///< Used file
38  Timer m_timer; ///< Timer
39  HEPMC2CODE( IO_GenEvent * m_file; )
40  HEPMC3CODE( WriterAsciiHepMC2 * m_file; )
41 };
42 
43 #endif
GenEvent I/O serialization for structured text files.
int process(GenEvent &hepmc)
Process event.
const std::string name()
Get name of the tool.
void initialize()
Initialize.
const std::string long_name()
Get long name of the tool.
bool tool_modifies_event()
Get information if this tool modifies the event.
Stores event-related information.
Definition: GenEvent.h:41
Interface for validatio to Pythia.
OutputValidationTool(const std::string &filename)
Constructor.
Virtual Interface to validation tools.
Definition of class WriterAsciiHepMC2.
std::string m_filename
Used file.
Definition of class GenEvent.
Used to benchmark MC generators.
Definition: Timer.h:38
Timer * timer()
Get timer for this tool (if this tool is being timed)