Page MenuHomeHEPForge

make_writer.cc
No OneTemporary

Size
917 B
Referenced Files
None
Subscribers
None

make_writer.cc

/**
* \authors The HEJ collaboration (see AUTHORS for details)
* \date 2019
* \copyright GPLv2 or later
*/
#include "HEJ/make_writer.hh"
#include "HEJ/exceptions.hh"
#include "HEJ/HepMC2Writer.hh"
#include "HEJ/HepMC3Writer.hh"
#include "HEJ/LesHouchesWriter.hh"
namespace HEJ{
std::unique_ptr<EventWriter> make_format_writer(
FileFormat format, std::string const & outfile,
LHEF::HEPRUP const & heprup
){
switch(format){
case FileFormat::Les_Houches:
return std::unique_ptr<EventWriter>{
new LesHouchesWriter{outfile, heprup}
};
case FileFormat::HepMC2:
return std::unique_ptr<EventWriter>{
new HepMC2Writer{outfile, heprup}
};
case FileFormat::HepMC3:
return std::unique_ptr<EventWriter>{
new HepMC3Writer{outfile, heprup}
};
default:
throw std::logic_error("unhandled file format");
}
}
}

File Metadata

Mime Type
text/x-c
Expires
Tue, Sep 30, 4:48 AM (13 h, 46 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
6481277
Default Alt Text
make_writer.cc (917 B)

Event Timeline