hej is hosted by Hepforge, IPPP Durham
HEJ  2.1.4
High energy resummation for hadron colliders
EventWriter.hh
Go to the documentation of this file.
1 
8 #pragma once
9 
10 #include <string>
11 
12 namespace HEJ {
13  class Event;
14 
16  class EventWriter {
17  public:
19  virtual void write(Event const &) = 0;
22  virtual void finish(){finished_=true;};
23 
24  virtual ~EventWriter() = default;
25  protected:
34  EventWriter* writer, std::string const & name
35  ) const noexcept;
36  bool finished() const {return finished_;};
37  private:
38  bool finished_ = false;
39  };
40 
41 } // namespace HEJ
Pure abstract base class for event writers.
Definition: EventWriter.hh:16
bool finished() const
Definition: EventWriter.hh:36
void finish_or_abort(EventWriter *writer, std::string const &name) const noexcept
If writer is not finished run finish() and abort on error.
virtual void write(Event const &)=0
Write an event.
virtual void finish()
Definition: EventWriter.hh:22
virtual ~EventWriter()=default
An event with clustered jets.
Definition: Event.hh:47
std::string name(EventType type)
Event type names.
Definition: event_types.hh:43
Main HEJ 2 Namespace.
Definition: mainpage.dox:1