HepMC event record
|
The Writer class is initialized with a stream to which to write a version 1.0 Les Houches Accord event file. In the constructor of the Writer object the main XML tag is written out, with the corresponding end tag is written in the destructor. After a Writer object has been created, it is possible to assign standard init information in the heprup member variable. In addition any XML formatted information can be added to the headerBlock member variable (directly or via the addHeader() function). Further comment line (beginning with a #
character) can be added to the initComments variable (directly or with the addInitComment() function). After this information is set, it should be written out to the file with the init() function.
Before each event is written out with the writeEvent() function, the standard event information can then be assigned to the hepeup variable and optional comment lines (beginning with a #
character) may be given to the eventComments variable (directly or with the addEventComment() function).
Definition at line 2723 of file build/outputs/include/HepMC/LHEF.h.
#include <LHEF.h>
Public Member Functions | |
Writer (std::ostream &os) | |
Writer (std::string filename) | |
~Writer () | |
std::ostream & | headerBlock () |
std::ostream & | initComments () |
std::ostream & | eventComments () |
void | init () |
void | writeEvent () |
Writer (std::ostream &os) | |
Writer (std::string filename) | |
~Writer () | |
std::ostream & | headerBlock () |
std::ostream & | initComments () |
std::ostream & | eventComments () |
void | init () |
void | writeEvent () |
Data Fields | |
std::ostringstream | headerStream |
HEPRUP | heprup |
std::ostringstream | initStream |
HEPEUP | hepeup |
std::ostringstream | eventStream |
Protected Attributes | |
std::ofstream | intstream |
std::ostream & | file |
Private Member Functions | |
Writer () | |
Writer (const Writer &) | |
Writer & | operator= (const Writer &) |
Writer () | |
Writer (const Writer &) | |
Writer & | operator= (const Writer &) |
|
inline |
Create a Writer object giving a stream to write to.
os | the stream where the event file is written. |
Definition at line 2731 of file build/outputs/include/HepMC/LHEF.h.
|
inline |
Create a Writer object giving a filename to write to.
filename | the name of the event file to be written. |
Definition at line 2738 of file build/outputs/include/HepMC/LHEF.h.
|
inline |
The destructor writes out the final XML end-tag.
Definition at line 2744 of file build/outputs/include/HepMC/LHEF.h.
References Writer::file.
|
private |
The default constructor should never be used.
|
inline |
Create a Writer object giving a stream to write to.
os | the stream where the event file is written. |
Definition at line 2731 of file include/HepMC/LHEF.h.
|
inline |
Create a Writer object giving a filename to write to.
filename | the name of the event file to be written. |
Definition at line 2738 of file include/HepMC/LHEF.h.
|
inline |
The destructor writes out the final XML end-tag.
Definition at line 2744 of file include/HepMC/LHEF.h.
References Writer::file.
|
private |
The default constructor should never be used.
|
inline |
Add comment lines to the next event to be written out with this stream.
Definition at line 2765 of file build/outputs/include/HepMC/LHEF.h.
References Writer::eventStream.
|
inline |
Add comment lines to the next event to be written out with this stream.
Definition at line 2765 of file include/HepMC/LHEF.h.
References Writer::eventStream.
|
inline |
Add header lines consisting of XML code with this stream.
Definition at line 2751 of file build/outputs/include/HepMC/LHEF.h.
References Writer::headerStream.
|
inline |
Add header lines consisting of XML code with this stream.
Definition at line 2751 of file include/HepMC/LHEF.h.
References Writer::headerStream.
|
inline |
Write out an optional header block followed by the standard init block information together with any comment lines.
Definition at line 2773 of file build/outputs/include/HepMC/LHEF.h.
References Writer::file, Writer::headerStream, Writer::heprup, HEPRUP::print(), and HEPRUP::version.
|
inline |
Write out an optional header block followed by the standard init block information together with any comment lines.
Definition at line 2773 of file include/HepMC/LHEF.h.
References Writer::file, Writer::headerStream, Writer::heprup, HEPRUP::print(), and HEPRUP::version.
|
inline |
Add comment lines to the init block with this stream.
Definition at line 2758 of file include/HepMC/LHEF.h.
References Writer::initStream.
|
inline |
Add comment lines to the init block with this stream.
Definition at line 2758 of file build/outputs/include/HepMC/LHEF.h.
References Writer::initStream.
|
inline |
Write the current HEPEUP object to the stream;
Definition at line 2806 of file build/outputs/include/HepMC/LHEF.h.
References Writer::file, Writer::hepeup, and HEPEUP::print().
|
inline |
Write the current HEPEUP object to the stream;
Definition at line 2806 of file include/HepMC/LHEF.h.
References Writer::file, Writer::hepeup, and HEPEUP::print().
std::ostringstream eventStream |
Stream to add additional comments to be written together the next event.
Definition at line 2849 of file build/outputs/include/HepMC/LHEF.h.
|
protected |
The stream we are writing to. This may be a reference to an external stream or the internal intstream.
Definition at line 2822 of file build/outputs/include/HepMC/LHEF.h.
std::ostringstream headerStream |
Stream to add all lines in the header block.
Definition at line 2829 of file build/outputs/include/HepMC/LHEF.h.
HEPEUP hepeup |
The standard information about the event we will write next.
Definition at line 2844 of file build/outputs/include/HepMC/LHEF.h.
HEPRUP heprup |
The standard init information.
Definition at line 2834 of file build/outputs/include/HepMC/LHEF.h.
std::ostringstream initStream |
Stream to add additional comments to be put in the init block.
Definition at line 2839 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 2816 of file build/outputs/include/HepMC/LHEF.h.