ThePEG::LesHouchesFileReader Class Reference

LesHouchesFileReader is an base class to be used for objects which reads event files from matrix element generators. More...

#include <LesHouchesFileReader.h>

Inheritance diagram for ThePEG::LesHouchesFileReader:

ThePEG::LesHouchesReader ThePEG::HandlerBase ThePEG::LastXCombInfo< XC > ThePEG::HandlerBaseT< T > ThePEG::Interfaced ThePEG::InterfacedBase ThePEG::Base ThePEG::Named ThePEG::Pointer::ReferenceCounted ThePEG::MadGraphReader

List of all members.

Public Member Functions

string filename () const
 Return the name of the file from where to read events.
FILE * file ()
 The file handle to read from.
Standard constructors and destructors.
 LesHouchesFileReader ()
 Default constructor.
 LesHouchesFileReader (const LesHouchesFileReader &)
 Copy-constructor.
virtual ~LesHouchesFileReader ()
 Destructor.
Virtual functions specified by the LesHouchesReader base class.
virtual void initialize (LesHouchesEventHandler &eh)
 Initialize.
virtual void open ()
 Open a file with events.
virtual void close ()
 Close the file from which events have been read.
virtual bool doReadEvent ()
 Read the next event from the file or stream into the corresponding protected variables.
Functions used by the persistent I/O system.
void persistentOutput (PersistentOStream &os) const
 Function used to write out object persistently.
void persistentInput (PersistentIStream &is, int version)
 Function used to read in object persistently.

Static Public Member Functions

static void Init ()
 Standard Init function used to initialize the interfaces.

Protected Member Functions

Clone Methods.
virtual IBPtr clone () const
 Make a simple clone of this object.
virtual IBPtr fullclone () const
 Make a clone of this object, possibly modifying the cloned object to make it sane.

Protected Attributes

CFileLineReader cfile
 The wrapper around the C FILE stream from which to read.
long neve
 The number of events in this file.
long ieve
 The current event number.
string LHFVersion
 If the file is a standard Les Houches formatted file (LHF) this is its version number.
string outsideBlock
 If LHF.
string headerBlock
 If LHF.
string initComments
 If LHF.
map< string, string > initAttributes
 If LHF.
string eventComments
 If LHF.
map< string, string > eventAttributes
 If LHF.

Private Member Functions

LesHouchesFileReaderoperator= (const LesHouchesFileReader &)
 Private and non-existent assignment operator.

Private Attributes

FILE * theFile
 The file handle from which derived classes should read.
string theFileName
 The name of the file from where to read events.

Static Private Attributes

static ClassDescription
< LesHouchesFileReader
initLesHouchesFileReader
 Describe an abstract base class with persistent data.


Detailed Description

LesHouchesFileReader is an base class to be used for objects which reads event files from matrix element generators.

It inherits from LesHouchesReader and extends it by defining a file handle to be read from, which is opened and closed by the open() and close() functions. Note that the file handle is a standard C filehandle and not a C++ stream. This is because there is no standard way in C++ to connect a pipe to a stream for reading eg. gzipped files. This class is able to read plain event files conforming to the Les Houches Event File accord.

See also:
The interfaces defined for LesHouchesFileReader.

Event

LesHouchesReader

Definition at line 36 of file LesHouchesFileReader.h.


Constructor & Destructor Documentation

ThePEG::LesHouchesFileReader::LesHouchesFileReader ( const LesHouchesFileReader  ) 

Copy-constructor.

Note that a file which is opened in the object copied from will have to be reopened in this.


Member Function Documentation

virtual void ThePEG::LesHouchesFileReader::initialize ( LesHouchesEventHandler eh  )  [virtual]

Initialize.

This function is called by the LesHouchesEventHandler to which this object is assigned.

Reimplemented from ThePEG::LesHouchesReader.

virtual void ThePEG::LesHouchesFileReader::open (  )  [virtual]

Open a file with events.

Derived classes should overwrite it and first calling it before reading in the run information into the corresponding protected variables.

Implements ThePEG::LesHouchesReader.

Reimplemented in ThePEG::MadGraphReader.

virtual bool ThePEG::LesHouchesFileReader::doReadEvent (  )  [virtual]

Read the next event from the file or stream into the corresponding protected variables.

Return false if there is no more events or if this was not a LHF event file.

Implements ThePEG::LesHouchesReader.

Reimplemented in ThePEG::MadGraphReader.

void ThePEG::LesHouchesFileReader::persistentOutput ( PersistentOStream os  )  const

Function used to write out object persistently.

Parameters:
os the persistent output stream written to.

Reimplemented from ThePEG::LesHouchesReader.

Reimplemented in ThePEG::MadGraphReader.

void ThePEG::LesHouchesFileReader::persistentInput ( PersistentIStream is,
int  version 
)

Function used to read in object persistently.

Parameters:
is the persistent input stream read from.
version the version number of the object when written.

Reimplemented from ThePEG::LesHouchesReader.

Reimplemented in ThePEG::MadGraphReader.

virtual IBPtr ThePEG::LesHouchesFileReader::clone (  )  const [protected, virtual]

Make a simple clone of this object.

Returns:
a pointer to the new object.

Implements ThePEG::InterfacedBase.

Reimplemented in ThePEG::MadGraphReader.

virtual IBPtr ThePEG::LesHouchesFileReader::fullclone (  )  const [protected, virtual]

Make a clone of this object, possibly modifying the cloned object to make it sane.

Returns:
a pointer to the new object.

Reimplemented from ThePEG::InterfacedBase.

Reimplemented in ThePEG::MadGraphReader.


Member Data Documentation

If the file is a standard Les Houches formatted file (LHF) this is its version number.

If empty, this is not a Les Houches formatted file

Definition at line 163 of file LesHouchesFileReader.h.

If LHF.

All lines (since the last open() or readEvent()) outside the header, init and event tags.

Definition at line 169 of file LesHouchesFileReader.h.

If LHF.

All lines from the header block.

Definition at line 174 of file LesHouchesFileReader.h.

If LHF.

Additional comments found in the init block.

Definition at line 179 of file LesHouchesFileReader.h.

map<string,string> ThePEG::LesHouchesFileReader::initAttributes [protected]

If LHF.

Map of attributes (name-value pairs) found in the init tag.

Definition at line 185 of file LesHouchesFileReader.h.

If LHF.

Additional comments found with the last read event.

Definition at line 190 of file LesHouchesFileReader.h.

map<string,string> ThePEG::LesHouchesFileReader::eventAttributes [protected]

If LHF.

Map of attributes (name-value pairs) found in the last event tag.

Definition at line 196 of file LesHouchesFileReader.h.


The documentation for this class was generated from the following file:

Generated on Thu Apr 29 12:43:09 2010 for ThePEG by  doxygen 1.5.5