LHEF
3.0(beta)
|
The Reader class is initialized with a stream from which to read a version 1/2 Les Houches Accord event file. More...
#include <LHEF.h>
Public Member Functions | |
Reader (std::istream &is) | |
Initialize the Reader with a stream from which to read an event file. | |
Reader (std::string filename) | |
Initialize the Reader with a filename from which to read an event file. | |
bool | readEvent () |
Read an event from the file and store it in the hepeup object. | |
Public Attributes | |
int | version |
XML file version. | |
std::string | outsideBlock |
All lines (since the last readEvent()) outside the header, init and event tags. | |
std::string | headerBlock |
All lines from the header block. | |
HEPRUP | heprup |
The standard init information. | |
std::string | initComments |
Additional comments found in the init block. | |
HEPEUP | hepeup |
The standard information about the last read event. | |
std::string | eventComments |
Additional comments found with the last read event. | |
Protected Member Functions | |
bool | getline () |
Used internally to read a single line from the stream. | |
bool | currentFind (std::string str) const |
Protected Attributes | |
std::ifstream | intstream |
A local stream which is unused if a stream is supplied from the outside. | |
std::istream & | file |
The stream we are reading from. | |
std::string | currentLine |
The last line read in from the stream in getline(). | |
Private Member Functions | |
void | init () |
Used internally in the constructors to read header and init blocks. | |
Reader () | |
The default constructor should never be used. | |
Reader (const Reader &) | |
The copy constructor should never be used. | |
Reader & | operator= (const Reader &) |
The Reader cannot be assigned to. | |
The Reader class is initialized with a stream from which to read a version 1/2 Les Houches Accord event file.
In the constructor of the Reader object the optional header information is read and then the mandatory init is read. After this the whole header block including the enclosing lines with tags are available in the public headerBlock member variable. Also the information from the init block is available in the heprup member variable and any additional comment lines are available in initComments. After each successful call to the readEvent() function the standard Les Houches Accord information about the event is available in the hepeup member variable and any additional comments in the eventComments variable. A typical reading sequence would look as follows:
|
inline |
Initialize the Reader with a stream from which to read an event file.
After the constructor is called the whole header block including the enclosing lines with tags are available in the public headerBlock member variable. Also the information from the init block is available in the heprup member variable and any additional comment lines are available in initComments.
is | the stream to read from. |
Definition at line 2451 of file LHEF.h.
References init().
|
inline |
Initialize the Reader with a filename from which to read an event file.
After the constructor is called the whole header block including the enclosing lines with tags are available in the public headerBlock member variable. Also the information from the init block is available in the heprup member variable and any additional comment lines are available in initComments.
filename | the name of the file to read from. |
Definition at line 2466 of file LHEF.h.
References init().
|
inlineprotected |
Definition at line 2611 of file LHEF.h.
References currentLine.
Referenced by init(), and readEvent().
|
inline |
Read an event from the file and store it in the hepeup object.
Optional comment lines are stored i the eventComments member variable.
Definition at line 2553 of file LHEF.h.
References currentFind(), currentLine, LHEF::XMLTag::deleteAll(), LHEF::XMLTag::findXMLTags(), getline(), hepeup, heprup, LHEF::HEPRUP::NPRUP, and outsideBlock.
|
protected |