![]() |
ATLAS Offline Software
|
powhegLesHouchesFileReader is an base class to be used for objects which reads event files from matrix element generators. More...
#include <PowhegLesHouchesFileReader.h>
Public Member Functions | |
Standard constructors and destructors. | |
| powhegLesHouchesFileReader () | |
| Default constructor. | |
| powhegLesHouchesFileReader (const powhegLesHouchesFileReader &) | |
| Copy-constructor. | |
| virtual | ~powhegLesHouchesFileReader () |
| 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. | |
| string | filename () const |
| Return the name of the file from where to read events. | |
| virtual vector< string > | optWeightsNamesFunc () |
| Return the optional weights information string ("Names") | |
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. | |
Standard (and non-standard) Interfaced functions. | |
| CFileLineReader | m_cfile |
| The wrapper around the C FILE stream from which to read. | |
| long | m_neve |
| The number of events in this file. | |
| long | m_ieve |
| The current event number. | |
| string | m_LHFVersion |
| If the file is a standard Les Houches formatted file (LHF) this is its version number. | |
| string | m_outsideBlock |
| If LHF. | |
| string | m_headerBlock |
| If LHF. | |
| string | m_initComments |
| If LHF. | |
| map< string, string > | m_initAttributes |
| If LHF. | |
| string | m_eventComments |
| If LHF. | |
| map< string, string > | m_eventAttributes |
| If LHF. | |
| string | m_theFileName |
| The name of the file from where to read events. | |
| bool | m_theQNumbers |
| Whether or not to search for QNUMBERS stuff. | |
| bool | m_theIncludeFxFxTags |
| Include/Read FxFx tags. | |
| bool | m_theIncludeCentral |
| Include central weight (for backup use) | |
| DecayerPtr | m_theDecayer |
| Decayer for any decay modes read from the file. | |
| map< string, string > | m_scalemap |
| Further information on the weights. | |
| map< string, double > | m_optionalWeightsTemp |
| Temporary holder for optional weights. | |
| map< string, string > | m_optionalWeightsLabel |
| static const ClassDescription< powhegLesHouchesFileReader > | m_initpowhegLesHouchesFileReader |
| Describe an abstract base class with persistent data. | |
| virtual void | doinit () |
| Initialize this object after the setup phase before saving an EventGenerator to disk. | |
| virtual bool | preInitialize () const |
| Return true if this object needs to be initialized before all other objects because it needs to extract PDFs from the event file. | |
| powhegLesHouchesFileReader & | operator= (const powhegLesHouchesFileReader &) |
| Private and non-existent assignment operator. | |
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. | |
| void | erase_substr (std::string &subject, const std::string &search) |
| Erases all occurences of a substring from a string. | |
| static void Init | ATLAS_NOT_THREAD_SAFE () |
| Standard Init function used to initialize the interfaces. | |
powhegLesHouchesFileReader 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.
Definition at line 43 of file PowhegLesHouchesFileReader.h.
|
inline |
Default constructor.
Definition at line 52 of file PowhegLesHouchesFileReader.h.
| powhegLesHouchesFileReader::powhegLesHouchesFileReader | ( | const powhegLesHouchesFileReader & | x | ) |
Copy-constructor.
Note that a file which is opened in the object copied from will have to be reopened in this.
Definition at line 42 of file PowhegLesHouchesFileReader.cxx.
|
virtual |
|
static |
Standard Init function used to initialize the interfaces.
|
protectedvirtual |
Make a simple clone of this object.
Definition at line 56 of file PowhegLesHouchesFileReader.cxx.
|
virtual |
Close the file from which events have been read.
Definition at line 816 of file PowhegLesHouchesFileReader.cxx.
|
protectedvirtual |
Initialize this object after the setup phase before saving an EventGenerator to disk.
| InitException | if object could not be initialized properly. |
Definition at line 68 of file PowhegLesHouchesFileReader.cxx.
|
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.
Definition at line 624 of file PowhegLesHouchesFileReader.cxx.
| void powhegLesHouchesFileReader::erase_substr | ( | std::string & | subject, |
| const std::string & | search ) |
Erases all occurences of a substring from a string.
Definition at line 913 of file PowhegLesHouchesFileReader.cxx.
|
inline |
Return the name of the file from where to read events.
Definition at line 102 of file PowhegLesHouchesFileReader.h.
|
protectedvirtual |
Make a clone of this object, possibly modifying the cloned object to make it sane.
Definition at line 60 of file PowhegLesHouchesFileReader.cxx.
|
virtual |
Initialize.
This function is called by the LesHouchesEventHandler to which this object is assigned.
Definition at line 469 of file PowhegLesHouchesFileReader.cxx.
|
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.
Definition at line 480 of file PowhegLesHouchesFileReader.cxx.
|
private |
Private and non-existent assignment operator.
Return the optional weights information string ("Names")
Definition at line 478 of file PowhegLesHouchesFileReader.cxx.
| void powhegLesHouchesFileReader::persistentInput | ( | PersistentIStream & | is, |
| int | version ) |
Function used to read in object persistently.
| is | the persistent input stream read from. |
| version | the version number of the object when written. |
Definition at line 826 of file PowhegLesHouchesFileReader.cxx.
| void powhegLesHouchesFileReader::persistentOutput | ( | PersistentOStream & | os | ) | const |
Function used to write out object persistently.
| os | the persistent output stream written to. |
Definition at line 820 of file PowhegLesHouchesFileReader.cxx.
|
protectedvirtual |
Return true if this object needs to be initialized before all other objects because it needs to extract PDFs from the event file.
Definition at line 64 of file PowhegLesHouchesFileReader.cxx.
|
protected |
The wrapper around the C FILE stream from which to read.
Definition at line 180 of file PowhegLesHouchesFileReader.h.
If LHF.
Map of attributes (name-value pairs) found in the last event tag.
Definition at line 232 of file PowhegLesHouchesFileReader.h.
|
protected |
If LHF.
Additional comments found with the last read event.
Definition at line 226 of file PowhegLesHouchesFileReader.h.
|
protected |
If LHF.
All lines from the header block.
Definition at line 210 of file PowhegLesHouchesFileReader.h.
|
protected |
The current event number.
Definition at line 192 of file PowhegLesHouchesFileReader.h.
If LHF.
Map of attributes (name-value pairs) found in the init tag.
Definition at line 221 of file PowhegLesHouchesFileReader.h.
|
protected |
If LHF.
Additional comments found in the init block.
Definition at line 215 of file PowhegLesHouchesFileReader.h.
|
staticprivate |
Describe an abstract base class with persistent data.
Definition at line 280 of file PowhegLesHouchesFileReader.h.
|
protected |
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 199 of file PowhegLesHouchesFileReader.h.
|
protected |
The number of events in this file.
Definition at line 187 of file PowhegLesHouchesFileReader.h.
Definition at line 272 of file PowhegLesHouchesFileReader.h.
Temporary holder for optional weights.
Definition at line 270 of file PowhegLesHouchesFileReader.h.
|
protected |
If LHF.
All lines (since the last open() or readEvent()) outside the header, init and event tags.
Definition at line 205 of file PowhegLesHouchesFileReader.h.
Further information on the weights.
Definition at line 264 of file PowhegLesHouchesFileReader.h.
|
private |
Decayer for any decay modes read from the file.
Definition at line 259 of file PowhegLesHouchesFileReader.h.
|
private |
The name of the file from where to read events.
Definition at line 239 of file PowhegLesHouchesFileReader.h.
|
private |
Include central weight (for backup use)
Definition at line 254 of file PowhegLesHouchesFileReader.h.
|
private |
Include/Read FxFx tags.
Definition at line 249 of file PowhegLesHouchesFileReader.h.
|
private |
Whether or not to search for QNUMBERS stuff.
Definition at line 244 of file PowhegLesHouchesFileReader.h.