thepeg
is hosted by
Hepforge
,
IPPP Durham
ThePEG
2.3.0
LesHouches
LesHouchesFileReader.h
1
// -*- C++ -*-
2
//
3
// LesHouchesFileReader.h is a part of ThePEG - Toolkit for HEP Event Generation
4
// Copyright (C) 1999-2019 Leif Lonnblad
5
//
6
// ThePEG is licenced under version 3 of the GPL, see COPYING for details.
7
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
8
//
9
#ifndef THEPEG_LesHouchesFileReader_H
10
#define THEPEG_LesHouchesFileReader_H
11
// This is the declaration of the LesHouchesFileReader class.
12
13
#include "LesHouchesReader.h"
14
#include "LesHouchesFileReader.fh"
15
#include "ThePEG/PDT/Decayer.h"
16
#include "ThePEG/Utilities/CFileLineReader.h"
17
#include <string>
18
#include <stdio.h>
19
20
namespace
ThePEG
{
21
22
39
class
LesHouchesFileReader
:
public
LesHouchesReader
{
40
41
public
:
42
48
LesHouchesFileReader
() :
neve
(0),
ieve
(0),
theQNumbers
(false),
49
theIncludeFxFxTags
(false),
50
theIncludeCentral
(false) {}
51
56
LesHouchesFileReader
(
const
LesHouchesFileReader
&);
57
61
virtual
~LesHouchesFileReader
();
63
64
public
:
65
72
virtual
void
initialize
(
LesHouchesEventHandler
& eh);
73
79
virtual
void
open
();
80
84
virtual
void
close
();
85
86
92
virtual
bool
doReadEvent
();
94
98
string
filename
()
const
{
return
theFileName
; }
99
104
virtual
vector<string>
optWeightsNamesFunc
();
105
106
107
public
:
108
115
void
persistentOutput
(
PersistentOStream
& os)
const
;
116
122
void
persistentInput
(
PersistentIStream
& is,
int
version);
124
128
static
void
Init
();
129
130
135
void
erase_substr
(std::string& subject,
const
std::string& search);
136
137
138
protected
:
139
146
virtual
IBPtr
clone
()
const
;
147
152
virtual
IBPtr
fullclone
()
const
;
154
162
virtual
void
doinit
();
163
168
virtual
bool
preInitialize
()
const
;
169
//@
170
171
protected
:
172
176
CFileLineReader
cfile
;
177
178
protected
:
179
183
long
neve
;
184
188
long
ieve
;
189
195
string
LHFVersion
;
196
201
string
outsideBlock
;
202
206
string
headerBlock
;
207
211
string
initComments
;
212
217
map<string,string>
initAttributes
;
218
222
string
eventComments
;
223
228
map<string,string>
eventAttributes
;
229
230
private
:
231
235
string
theFileName
;
236
240
bool
theQNumbers
;
241
245
bool
theIncludeFxFxTags
;
246
250
bool
theIncludeCentral
;
251
255
DecayerPtr
theDecayer
;
256
260
map<string,string>
scalemap
;
261
266
map<string,double>
optionalWeightsTemp
;
267
268
269
private
:
270
274
static
ClassDescription<LesHouchesFileReader>
initLesHouchesFileReader
;
275
279
LesHouchesFileReader
&
operator=
(
const
LesHouchesFileReader
&) =
delete
;
280
281
public
:
282
286
class
LesHouchesFileError:
public
Exception
{};
289
};
290
291
}
292
293
294
#include "ThePEG/Utilities/ClassTraits.h"
295
296
namespace
ThePEG
{
297
304
template
<>
305
struct
BaseClassTrait<LesHouchesFileReader,1>:
public
ClassTraitsType {
307
typedef
LesHouchesReader
NthBase
;
308
};
309
315
template
<>
316
struct
ClassTraits<LesHouchesFileReader>
317
:
public
ClassTraitsBase<LesHouchesFileReader> {
321
static
string
className
() {
return
"ThePEG::LesHouchesFileReader"
; }
327
static
string
library
() {
return
"LesHouches.so"
; }
328
329
};
330
333
}
334
335
#endif
/* THEPEG_LesHouchesFileReader_H */
ThePEG::CFileLineReader
CFileLineReader is a wrapper around a standard C FILE stream.
Definition:
CFileLineReader.h:42
ThePEG::ClassDescription
A concreate implementation of ClassDescriptionBase describing a concrete class with persistent data.
Definition:
ClassDescription.h:333
ThePEG::Exception
Exception is the base class for all exceptions to be used in ThePEG.
Definition:
Exception.h:44
ThePEG::LesHouchesEventHandler
The LesHouchesEventHandler inherits from the general EventHandler class and administers the reading o...
Definition:
LesHouchesEventHandler.h:41
ThePEG::LesHouchesFileReader
LesHouchesFileReader is an base class to be used for objects which reads event files from matrix elem...
Definition:
LesHouchesFileReader.h:39
ThePEG::LesHouchesFileReader::close
virtual void close()
Close the file from which events have been read.
ThePEG::LesHouchesFileReader::initialize
virtual void initialize(LesHouchesEventHandler &eh)
Initialize.
ThePEG::LesHouchesFileReader::theFileName
string theFileName
The name of the file from where to read events.
Definition:
LesHouchesFileReader.h:235
ThePEG::LesHouchesFileReader::LesHouchesFileReader
LesHouchesFileReader(const LesHouchesFileReader &)
Copy-constructor.
ThePEG::LesHouchesFileReader::optionalWeightsTemp
map< string, double > optionalWeightsTemp
Temporary holder for optional weights.
Definition:
LesHouchesFileReader.h:266
ThePEG::LesHouchesFileReader::cfile
CFileLineReader cfile
The wrapper around the C FILE stream from which to read.
Definition:
LesHouchesFileReader.h:176
ThePEG::LesHouchesFileReader::neve
long neve
The number of events in this file.
Definition:
LesHouchesFileReader.h:183
ThePEG::LesHouchesFileReader::doinit
virtual void doinit()
Initialize this object after the setup phase before saving an EventGenerator to disk.
ThePEG::LesHouchesFileReader::theQNumbers
bool theQNumbers
Whether or not to search for QNUMBERS stuff.
Definition:
LesHouchesFileReader.h:240
ThePEG::LesHouchesFileReader::open
virtual void open()
Open a file with events.
ThePEG::LesHouchesFileReader::eventAttributes
map< string, string > eventAttributes
If LHF.
Definition:
LesHouchesFileReader.h:228
ThePEG::LesHouchesFileReader::Init
static void Init()
Standard Init function used to initialize the interfaces.
ThePEG::LesHouchesFileReader::initAttributes
map< string, string > initAttributes
If LHF.
Definition:
LesHouchesFileReader.h:217
ThePEG::LesHouchesFileReader::clone
virtual IBPtr clone() const
Make a simple clone of this object.
ThePEG::LesHouchesFileReader::theDecayer
DecayerPtr theDecayer
Decayer for any decay modes read from the file.
Definition:
LesHouchesFileReader.h:255
ThePEG::LesHouchesFileReader::persistentInput
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
ThePEG::LesHouchesFileReader::fullclone
virtual IBPtr fullclone() const
Make a clone of this object, possibly modifying the cloned object to make it sane.
ThePEG::LesHouchesFileReader::LesHouchesFileReader
LesHouchesFileReader()
Default constructor.
Definition:
LesHouchesFileReader.h:48
ThePEG::LesHouchesFileReader::erase_substr
void erase_substr(std::string &subject, const std::string &search)
Erases all occurences of a substring from a string.
ThePEG::LesHouchesFileReader::preInitialize
virtual bool preInitialize() const
Return true if this object needs to be initialized before all other objects because it needs to extra...
ThePEG::LesHouchesFileReader::doReadEvent
virtual bool doReadEvent()
Read the next event from the file or stream into the corresponding protected variables.
ThePEG::LesHouchesFileReader::outsideBlock
string outsideBlock
If LHF.
Definition:
LesHouchesFileReader.h:201
ThePEG::LesHouchesFileReader::eventComments
string eventComments
If LHF.
Definition:
LesHouchesFileReader.h:222
ThePEG::LesHouchesFileReader::theIncludeCentral
bool theIncludeCentral
Include central weight (for backup use)
Definition:
LesHouchesFileReader.h:250
ThePEG::LesHouchesFileReader::optWeightsNamesFunc
virtual vector< string > optWeightsNamesFunc()
Return the optional weights information string ("Names")
ThePEG::LesHouchesFileReader::filename
string filename() const
Return the name of the file from where to read events.
Definition:
LesHouchesFileReader.h:98
ThePEG::LesHouchesFileReader::initLesHouchesFileReader
static ClassDescription< LesHouchesFileReader > initLesHouchesFileReader
Describe an abstract base class with persistent data.
Definition:
LesHouchesFileReader.h:274
ThePEG::LesHouchesFileReader::theIncludeFxFxTags
bool theIncludeFxFxTags
Include/Read FxFx tags.
Definition:
LesHouchesFileReader.h:245
ThePEG::LesHouchesFileReader::LHFVersion
string LHFVersion
If the file is a standard Les Houches formatted file (LHF) this is its version number.
Definition:
LesHouchesFileReader.h:195
ThePEG::LesHouchesFileReader::persistentOutput
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
ThePEG::LesHouchesFileReader::~LesHouchesFileReader
virtual ~LesHouchesFileReader()
Destructor.
ThePEG::LesHouchesFileReader::operator=
LesHouchesFileReader & operator=(const LesHouchesFileReader &)=delete
Private and non-existent assignment operator.
ThePEG::LesHouchesFileReader::ieve
long ieve
The current event number.
Definition:
LesHouchesFileReader.h:188
ThePEG::LesHouchesFileReader::scalemap
map< string, string > scalemap
Further information on the weights.
Definition:
LesHouchesFileReader.h:260
ThePEG::LesHouchesFileReader::headerBlock
string headerBlock
If LHF.
Definition:
LesHouchesFileReader.h:206
ThePEG::LesHouchesFileReader::initComments
string initComments
If LHF.
Definition:
LesHouchesFileReader.h:211
ThePEG::LesHouchesReader
LesHouchesReader is an abstract base class to be used for objects which reads event files or streams ...
Definition:
LesHouchesReader.h:77
ThePEG::PersistentIStream
PersistentIStream is used to read persistent objects from a stream where they were previously written...
Definition:
PersistentIStream.h:48
ThePEG::PersistentOStream
PersistentOStream is used to write objects persistently to a stream from which they can be read in ag...
Definition:
PersistentOStream.h:51
ThePEG::Pointer::RCPtr
RCPtr is a reference counted (smart) pointer.
Definition:
RCPtr.h:60
ThePEG
This is the main namespace within which all identifiers in ThePEG are declared.
Definition:
FactoryBase.h:28
ThePEG::BaseClassTrait::NthBase
int NthBase
The type of the BaseN'th base class (int means there are no further base classes).
Definition:
ClassTraits.h:161
ThePEG::ClassTraitsBase::className
static string className()
Return the name of class T.
Definition:
ClassTraits.h:66
ThePEG::ClassTraitsBase::library
static string library()
The name of a file containing the dynamic library where the class T is implemented.
Definition:
ClassTraits.h:85
Generated on Thu Jun 20 2024 14:47:00 for ThePEG by
1.9.6