HepMC event record
|
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:
Definition at line 2448 of file build/outputs/include/HepMC/LHEF.h.
#include <LHEF.h>
Public Member Functions | |
Reader (std::istream &is) | |
Reader (std::string filename) | |
bool | readEvent () |
Reader (std::istream &is) | |
Reader (std::string filename) | |
bool | readEvent () |
Data Fields | |
int | version |
std::string | outsideBlock |
std::string | headerBlock |
HEPRUP | heprup |
std::string | initComments |
HEPEUP | hepeup |
std::string | eventComments |
Protected Member Functions | |
bool | getline () |
bool | currentFind (std::string str) const |
bool | getline () |
bool | currentFind (std::string str) const |
Protected Attributes | |
std::ifstream | intstream |
std::istream & | file |
std::string | currentLine |
Private Member Functions | |
void | init () |
Reader () | |
Reader (const Reader &) | |
Reader & | operator= (const Reader &) |
void | init () |
Reader () | |
Reader (const Reader &) | |
Reader & | operator= (const Reader &) |
|
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 2462 of file build/outputs/include/HepMC/LHEF.h.
References Reader::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 2477 of file build/outputs/include/HepMC/LHEF.h.
References Reader::init().
|
private |
The default constructor should never be used.
|
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 2462 of file include/HepMC/LHEF.h.
References Reader::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 2477 of file include/HepMC/LHEF.h.
References Reader::init().
|
private |
The default constructor should never be used.
|
inlineprotected |
Definition at line 2622 of file build/outputs/include/HepMC/LHEF.h.
References Reader::currentLine.
|
inlineprotected |
Definition at line 2622 of file include/HepMC/LHEF.h.
References Reader::currentLine.
|
inlineprotected |
Used internally to read a single line from the stream.
Definition at line 2615 of file build/outputs/include/HepMC/LHEF.h.
References Reader::currentLine, and Reader::file.
|
inlineprotected |
Used internally to read a single line from the stream.
Definition at line 2615 of file include/HepMC/LHEF.h.
References Reader::currentLine, and Reader::file.
|
inlineprivate |
Used internally in the constructors to read header and init blocks.
Definition at line 2488 of file build/outputs/include/HepMC/LHEF.h.
References Reader::currentFind(), Reader::currentLine, XMLTag::deleteAll(), XMLTag::findXMLTags(), Reader::getline(), Reader::headerBlock, Reader::heprup, Reader::initComments, Reader::outsideBlock, and Reader::version.
|
inlineprivate |
Used internally in the constructors to read header and init blocks.
Definition at line 2488 of file include/HepMC/LHEF.h.
References Reader::currentFind(), Reader::currentLine, XMLTag::deleteAll(), XMLTag::findXMLTags(), Reader::getline(), Reader::headerBlock, Reader::heprup, Reader::initComments, Reader::outsideBlock, and Reader::version.
|
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 2564 of file include/HepMC/LHEF.h.
References Reader::currentFind(), Reader::currentLine, XMLTag::deleteAll(), XMLTag::findXMLTags(), Reader::getline(), Reader::hepeup, Reader::heprup, HEPRUP::NPRUP, and Reader::outsideBlock.
|
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 2564 of file build/outputs/include/HepMC/LHEF.h.
References Reader::currentFind(), Reader::currentLine, XMLTag::deleteAll(), XMLTag::findXMLTags(), Reader::getline(), Reader::hepeup, Reader::heprup, HEPRUP::NPRUP, and Reader::outsideBlock.
|
protected |
The last line read in from the stream in getline().
Definition at line 2643 of file build/outputs/include/HepMC/LHEF.h.
std::string eventComments |
Additional comments found with the last read event.
Definition at line 2681 of file build/outputs/include/HepMC/LHEF.h.
|
protected |
The stream we are reading from. This may be a reference to an external stream or the internal intstream.
Definition at line 2638 of file build/outputs/include/HepMC/LHEF.h.
std::string headerBlock |
All lines from the header block.
Definition at line 2661 of file build/outputs/include/HepMC/LHEF.h.
HEPEUP hepeup |
The standard information about the last read event.
Definition at line 2676 of file build/outputs/include/HepMC/LHEF.h.
HEPRUP heprup |
The standard init information.
Definition at line 2666 of file build/outputs/include/HepMC/LHEF.h.
std::string initComments |
Additional comments found in the init block.
Definition at line 2671 of file build/outputs/include/HepMC/LHEF.h.
|
protected |
A local stream which is unused if a stream is supplied from the outside.
Definition at line 2632 of file build/outputs/include/HepMC/LHEF.h.
std::string outsideBlock |
All lines (since the last readEvent()) outside the header, init and event tags.
Definition at line 2656 of file build/outputs/include/HepMC/LHEF.h.
int version |
XML file version
Definition at line 2650 of file build/outputs/include/HepMC/LHEF.h.