Page MenuHomeHEPForge

make_writer.cc
No OneTemporary

Size
942 B
Referenced Files
None
Subscribers
None

make_writer.cc

/**
* \authors The HEJ collaboration (see AUTHORS for details)
* \date 2019-2020
* \copyright GPLv2 or later
*/
#include "HEJ/make_writer.hh"
#include "HEJ/exceptions.hh"
#include "HEJ/HepMC2Writer.hh"
#include "HEJ/HepMC3Writer.hh"
#include "HEJ/HDF5Writer.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::make_unique<LesHouchesWriter>(outfile, heprup);
case FileFormat::HepMC2:
return std::make_unique<HepMC2Writer>(outfile, heprup);
case FileFormat::HepMC3:
return std::make_unique<HepMC3Writer>(outfile, heprup);
case FileFormat::HDF5:
return std::make_unique<HDF5Writer>(outfile, heprup);
default:
throw std::logic_error("unhandled file format");
}
}
}

File Metadata

Mime Type
text/x-c
Expires
Tue, Sep 30, 5:49 AM (1 d, 15 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
6516641
Default Alt Text
make_writer.cc (942 B)

Event Timeline