HepMC3 event record library
ReaderLHEF.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 // -*- C++ -*-
3 //
4 // This file is part of HepMC
5 // Copyright (C) 2014-2019 The HepMC collaboration (see AUTHORS for details)
6 //
7 #ifndef HEPMC3_READERLHEF_H
8 #define HEPMC3_READERLHEF_H
9 /**
10  * @file ReaderLHEF.h
11  * @brief Definition of \b class ReaderLHEF
12  *
13  * @class HepMC3::ReaderLHEF
14  * @brief GenEvent I/O parsing and serialization for LHEF files
15  *
16  *
17  * @ingroup IO
18  *
19  */
20 #include "HepMC3/Reader.h"
21 #include "HepMC3/GenEvent.h"
22 #include <string>
23 #include <fstream>
24 #include <istream>
25 #include "HepMC3/LHEFAttributes.h"
26 #include "HepMC3/GenEvent.h"
27 #include "HepMC3/GenParticle.h"
28 #include "HepMC3/GenVertex.h"
29 #include <iomanip>
30 
31 
32 namespace HepMC3
33 {
34 class ReaderLHEF : public Reader
35 {
36 public:
37  ReaderLHEF(const std::string& filename);
38  bool read_event(GenEvent& ev);
39  void close();
40  bool failed();
41  ~ReaderLHEF() ;
42 private:
43  LHEF::Reader* m_reader;
44  shared_ptr<HEPRUPAttribute> m_hepr;
45  int m_neve;
46  bool m_failed;
47 };
48 }
49 #endif
Definition of class HEPRUPAttribute and class HEPEUAttribute.
GenEvent I/O parsing and serialization for LHEF files.
Definition: ReaderLHEF.h:34
Definition of interface Reader.
Definition of class GenParticle.
~ReaderLHEF()
Destructor.
Definition: ReaderLHEF.cc:60
Definition of class GenVertex.
void close()
Close file stream.
Definition: ReaderLHEF.cc:116
Stores event-related information.
Definition: GenEvent.h:42
bool read_event(GenEvent &ev)
Fill next event from input into evt.
Definition: ReaderLHEF.cc:62
Definition of class GenEvent.
Base class for all I/O readers.
Definition: Reader.h:25
bool failed()
Return status of the stream.
Definition: ReaderLHEF.cc:113