hej is hosted by Hepforge, IPPP Durham
HEJ 2 2.0
High energy resummation for hadron colliders
Loading...
Searching...
No Matches
LesHouchesWriter.hh
Go to the documentation of this file.
1
9#pragma once
10
11#include <fstream>
12#include <memory>
13#include <string>
14
15#include "LHEF/LHEF.h"
16
17#include "HEJ/EventWriter.hh"
18
19namespace HEJ{
20 class Event;
21
24 public:
26
30 LesHouchesWriter(std::string const & file, LHEF::HEPRUP heprup);
31 LesHouchesWriter(LesHouchesWriter const & other) = delete;
32 LesHouchesWriter & operator=(LesHouchesWriter const & other) = delete;
33 // TODO: in principle, this class should be movable
34 // but that somehow(?) breaks the write member function
38
40 void write(Event const & ev) override;
41
42 private:
43 void write_init(){
44 writer_->init();
45 }
46
47 void rewrite_init();
48
49 LHEF::HEPRUP & heprup(){
50 return writer_->heprup;
51 }
52
53 LHEF::HEPEUP & hepeup(){
54 return writer_->hepeup;
55 }
56
57 std::fstream out_;
58 std::unique_ptr<LHEF::Writer> writer_;
59 };
60}
Header file for the EventWriter interface.
Definition: Event.hh:84
Class for writing events to a file in the Les Houches Event File format.
Definition: LesHouchesWriter.hh:23
void write(Event const &ev) override
Write an event to the file specified in the constructor.
LesHouchesWriter(LesHouchesWriter &&other)=delete
LesHouchesWriter(LesHouchesWriter const &other)=delete
LesHouchesWriter(std::string const &file, LHEF::HEPRUP heprup)
Constructor.
LesHouchesWriter & operator=(LesHouchesWriter const &other)=delete
LesHouchesWriter & operator=(LesHouchesWriter &&other)=delete
~LesHouchesWriter() override
Main HEJ 2 Namespace.
Definition: mainpage.dox:1
Pure abstract base class for event writers.
Definition: EventWriter.hh:14