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
23public:
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
36private:
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
Definition of class GenEvent.
Definition of class WriterAsciiHepMC2.
Stores event-related information.
Definition: GenEvent.h:41
GenEvent I/O serialization for structured text files.
Interface for validatio to Pythia.
void initialize()
Initialize.
bool tool_modifies_event()
Get information if this tool modifies the event.
Timer * timer()
Get timer for this tool (if this tool is being timed)
std::string m_filename
Used file.
int process(GenEvent &hepmc)
Process event.
const std::string name()
Get name of the tool.
const std::string long_name()
Get long name of the tool.
Used to benchmark MC generators.
Definition: Timer.h:38
Virtual Interface to validation tools.