6 #ifndef ATLASHEPMC_IOGENEVENT_H
7 #define ATLASHEPMC_IOGENEVENT_H
9 #include "HepMC3/Version.h"
10 #include "HepMC3/Reader.h"
11 #include "HepMC3/Writer.h"
12 #include "HepMC3/ReaderAsciiHepMC2.h"
13 #include "HepMC3/WriterAsciiHepMC2.h"
15 typedef HepMC3::WriterAsciiHepMC2 WriterAsciiHepMC2;
16 typedef HepMC3::ReaderAsciiHepMC2 ReaderAsciiHepMC2;
19 IO_GenEvent(
const std::string&
filename=
"IO_GenEvent.dat",
21 if (
mode!=
std::ios::out) printf(
"In AtlasHepMC/IO_GenEvent.h in IO_GenEvent(filename,mode) mode should be std::ios::out\n");
22 m_writer=
new HepMC3::WriterAsciiHepMC2(
filename);
24 IO_GenEvent( std::ostream &
os ) {
25 m_writer=
new HepMC3::WriterAsciiHepMC2(
os);
33 void write_event(
const HepMC3::GenEvent*
evt ) {
34 m_writer->write_event(*
evt);
37 HepMC3::WriterAsciiHepMC2 *m_writer;