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. More... | |
powhegLesHouchesFileReader (const powhegLesHouchesFileReader &) | |
Copy-constructor. More... | |
virtual | ~powhegLesHouchesFileReader () |
Destructor. More... | |
Virtual functions specified by the LesHouchesReader base class. | |
virtual void | initialize (LesHouchesEventHandler &eh) |
Initialize. More... | |
virtual void | open () |
Open a file with events. More... | |
virtual void | close () |
Close the file from which events have been read. More... | |
virtual bool | doReadEvent () |
Read the next event from the file or stream into the corresponding protected variables. More... | |
string | filename () const |
Return the name of the file from where to read events. More... | |
virtual vector< string > | optWeightsNamesFunc () |
Return the optional weights information string ("Names") More... | |
Protected Member Functions | |
Clone Methods. | |
virtual IBPtr | clone () const |
Make a simple clone of this object. More... | |
virtual IBPtr | fullclone () const |
Make a clone of this object, possibly modifying the cloned object to make it sane. More... | |
Functions used by the persistent I/O system. | |
void | persistentOutput (PersistentOStream &os) const |
Function used to write out object persistently. More... | |
void | persistentInput (PersistentIStream &is, int version) |
Function used to read in object persistently. More... | |
void | erase_substr (std::string &subject, const std::string &search) |
Erases all occurences of a substring from a string. More... | |
static void Init | ATLAS_NOT_THREAD_SAFE () |
Standard Init function used to initialize the interfaces. More... | |
Standard (and non-standard) Interfaced functions. | |
CFileLineReader | m_cfile |
The wrapper around the C FILE stream from which to read. More... | |
long | m_neve |
The number of events in this file. More... | |
long | m_ieve |
The current event number. More... | |
string | m_LHFVersion |
If the file is a standard Les Houches formatted file (LHF) this is its version number. More... | |
string | m_outsideBlock |
If LHF. More... | |
string | m_headerBlock |
If LHF. More... | |
string | m_initComments |
If LHF. More... | |
map< string, string > | m_initAttributes |
If LHF. More... | |
string | m_eventComments |
If LHF. More... | |
map< string, string > | m_eventAttributes |
If LHF. More... | |
string | m_theFileName |
The name of the file from where to read events. More... | |
bool | m_theQNumbers |
Whether or not to search for QNUMBERS stuff. More... | |
bool | m_theIncludeFxFxTags |
Include/Read FxFx tags. More... | |
bool | m_theIncludeCentral |
Include central weight (for backup use) More... | |
DecayerPtr | m_theDecayer |
Decayer for any decay modes read from the file. More... | |
map< string, string > | m_scalemap |
Further information on the weights. More... | |
map< string, double > | m_optionalWeightsTemp |
Temporary holder for optional weights. More... | |
map< string, string > | m_optionalWeightsLabel |
static const ClassDescription< powhegLesHouchesFileReader > | m_initpowhegLesHouchesFileReader |
Describe an abstract base class with persistent data. More... | |
virtual void | doinit () |
Initialize this object after the setup phase before saving an EventGenerator to disk. More... | |
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. More... | |
powhegLesHouchesFileReader & | operator= (const powhegLesHouchesFileReader &) |
Private and non-existent assignment operator. More... | |
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 |
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 | ||
) |
|
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.
|
virtual |
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.
|
protected |
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.
|
protected |
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.
|
private |
Definition at line 272 of file PowhegLesHouchesFileReader.h.
|
private |
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.
|
private |
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.