hej is hosted by Hepforge, IPPP Durham
HEJ 2.2.2
High energy resummation for hadron colliders
Loading...
Searching...
No Matches
EventReader.hh
Go to the documentation of this file.
1
10#pragma once
11
12#include <cstddef>
13#include <memory>
14#include <optional>
15#include <string>
16
17namespace LHEF {
18 class HEPEUP;
19 class HEPRUP;
20}
21
22namespace HEJ {
23
25 struct EventReader {
27 virtual bool read_event() = 0;
28
30 virtual std::string const & header() const = 0;
31
33 virtual LHEF::HEPRUP const & heprup() const = 0;
34
36 virtual LHEF::HEPEUP const & hepeup() const = 0;
37
39 virtual std::optional<std::size_t> number_events() const = 0;
40
41 virtual double scalefactor() const {
42 return 1.;
43 };
44
45 virtual ~EventReader() = default;
46 };
47
49
54 std::unique_ptr<EventReader> make_reader(std::string const & filename);
55} // namespace HEJ
Main HEJ 2 Namespace.
Definition: mainpage.dox:1
std::unique_ptr< EventReader > make_reader(std::string const &filename)
Factory function for event readers.
Definition: Analysis.hh:14
Abstract base class for reading events from files.
Definition: EventReader.hh:25
virtual LHEF::HEPEUP const & hepeup() const =0
Access last read event.
virtual double scalefactor() const
Definition: EventReader.hh:41
virtual std::string const & header() const =0
Access header text.
virtual ~EventReader()=default
virtual bool read_event()=0
Read an event.
virtual LHEF::HEPRUP const & heprup() const =0
Access run information.
virtual std::optional< std::size_t > number_events() const =0
Guess number of events from header.