herwig
is hosted by
Hepforge
,
IPPP Durham
Herwig
7.2.1
MatrixElement
FxFx
FxFxFileReader.h
1
// -*- C++ -*-
2
//
3
// FxFxFileReader.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_FxFxFileReader_H
10
#define THEPEG_FxFxFileReader_H
11
// This is the declaration of the FxFxFileReader class.
12
13
#include "FxFxReader.h"
14
#include "FxFxFileReader.fh"
15
#include "ThePEG/PDT/Decayer.h"
16
#include "ThePEG/Utilities/CFileLineReader.h"
17
#include <stdio.h>
18
19
namespace
ThePEG
{
20
21
38
class
FxFxFileReader
:
public
FxFxReader
{
39
40
public
:
41
47
FxFxFileReader
() :
neve
(0),
ieve
(0),
theQNumbers
(false),
theIncludeFxFxTags
(true),
48
theIncludeCentral
(false) {}
49
54
FxFxFileReader
(
const
FxFxFileReader
&);
55
59
virtual
~FxFxFileReader
();
61
62
public
:
63
70
virtual
void
initialize
(
FxFxEventHandler
& eh);
71
77
virtual
void
open
();
78
82
virtual
void
close
();
83
84
90
virtual
bool
doReadEvent
();
92
96
string
filename
()
const
{
return
theFileName
; }
97
98
/* vector<string> optionalWeightsNames;
99
100
virtual vector<string> optWeightNamesFunc();*/
101
102
103
virtual
vector<string>
optWeightsNamesFunc
();
104
105
110
void
erase_substr
(std::string& subject,
const
std::string& search);
111
112
113
public
:
114
121
void
persistentOutput
(
PersistentOStream
& os)
const
;
122
128
void
persistentInput
(
PersistentIStream
& is,
int
version);
130
134
static
void
Init
();
135
136
protected
:
137
144
virtual
IBPtr
clone
()
const
;
145
150
virtual
IBPtr
fullclone
()
const
;
152
160
virtual
void
doinit
();
161
166
virtual
bool
preInitialize
()
const
;
167
//@
168
169
protected
:
170
174
CFileLineReader
cfile
;
175
176
protected
:
177
181
long
neve
;
182
186
long
ieve
;
187
193
string
LHFVersion
;
194
199
string
outsideBlock
;
200
204
string
headerBlock
;
205
209
string
initComments
;
210
215
map<string,string>
initAttributes
;
216
220
string
eventComments
;
221
226
map<string,string>
eventAttributes
;
227
228
private
:
229
233
string
theFileName
;
234
238
bool
theQNumbers
;
239
243
bool
theIncludeFxFxTags
;
244
248
bool
theIncludeCentral
;
249
253
DecayerPtr
theDecayer
;
254
258
map<string,string>
scalemap
;
259
264
map<string,double>
optionalWeightsTemp
;
265
266
267
private
:
268
272
static
ClassDescription<FxFxFileReader>
initFxFxFileReader
;
273
277
FxFxFileReader
&
operator=
(
const
FxFxFileReader
&) =
delete
;
278
279
public
:
280
284
class
FxFxFileError:
public
Exception
{};
287
};
288
289
}
290
291
292
#include "ThePEG/Utilities/ClassTraits.h"
293
294
namespace
ThePEG
{
295
302
template
<>
303
struct
BaseClassTrait
<FxFxFileReader,1>:
public
ClassTraitsType
{
305
typedef
FxFxReader
NthBase;
306
};
307
313
template
<>
314
struct
ClassTraits
<FxFxFileReader>
315
:
public
ClassTraitsBase
<FxFxFileReader> {
319
static
string
className() {
return
"Herwig::FxFxFileReader"
; }
325
static
string
library() {
return
"HwFxFx.so"
; }
326
327
};
328
331
}
332
333
#endif
/* THEPEG_FxFxFileReader_H */
ThePEG::FxFxFileReader::outsideBlock
string outsideBlock
If LHF.
Definition:
FxFxFileReader.h:199
ThePEG::PersistentIStream
ThePEG::FxFxFileReader::doReadEvent
virtual bool doReadEvent()
Read the next event from the file or stream into the corresponding protected variables.
ThePEG::FxFxFileReader::initAttributes
map< string, string > initAttributes
If LHF.
Definition:
FxFxFileReader.h:215
ThePEG::ClassTraitsType
ThePEG::FxFxEventHandler
The FxFxEventHandler inherits from the general EventHandler class and administers the reading of even...
Definition:
FxFxEventHandler.h:40
ThePEG::FxFxFileReader::optWeightsNamesFunc
virtual vector< string > optWeightsNamesFunc()
return the weight names
ThePEG::ClassDescription
ThePEG::PersistentOStream
ThePEG::IBPtr
ThePEG::Ptr< InterfacedBase >::pointer IBPtr
ThePEG::FxFxFileReader::~FxFxFileReader
virtual ~FxFxFileReader()
Destructor.
ThePEG::FxFxFileReader::eventComments
string eventComments
If LHF.
Definition:
FxFxFileReader.h:220
ThePEG::FxFxFileReader::theDecayer
DecayerPtr theDecayer
Decayer for any decay modes read from the file.
Definition:
FxFxFileReader.h:253
ThePEG::FxFxFileReader::open
virtual void open()
Open a file with events.
ThePEG
ThePEG::FxFxFileReader::operator=
FxFxFileReader & operator=(const FxFxFileReader &)=delete
Private and non-existent assignment operator.
ThePEG::FxFxFileReader::cfile
CFileLineReader cfile
The wrapper around the C FILE stream from which to read.
Definition:
FxFxFileReader.h:174
ThePEG::FxFxFileReader::doinit
virtual void doinit()
Initialize this object after the setup phase before saving an EventGenerator to disk.
ThePEG::FxFxReader
FxFxReader is an abstract base class to be used for objects which reads event files or streams from m...
Definition:
FxFxReader.h:77
ThePEG::FxFxFileReader::eventAttributes
map< string, string > eventAttributes
If LHF.
Definition:
FxFxFileReader.h:226
ThePEG::FxFxFileReader::theFileName
string theFileName
The name of the file from where to read events.
Definition:
FxFxFileReader.h:233
ThePEG::FxFxFileReader::headerBlock
string headerBlock
If LHF.
Definition:
FxFxFileReader.h:204
ThePEG::FxFxFileReader::initComments
string initComments
If LHF.
Definition:
FxFxFileReader.h:209
ThePEG::FxFxFileReader::Init
static void Init()
Standard Init function used to initialize the interfaces.
ThePEG::FxFxFileReader::clone
virtual IBPtr clone() const
Make a simple clone of this object.
ThePEG::FxFxFileReader::initFxFxFileReader
static ClassDescription< FxFxFileReader > initFxFxFileReader
Describe an abstract base class with persistent data.
Definition:
FxFxFileReader.h:272
ThePEG::FxFxFileReader
FxFxFileReader is an base class to be used for objects which reads event files from matrix element ge...
Definition:
FxFxFileReader.h:38
ThePEG::FxFxFileReader::filename
string filename() const
Return the name of the file from where to read events.
Definition:
FxFxFileReader.h:96
ThePEG::FxFxFileReader::theIncludeCentral
bool theIncludeCentral
Include central weight (for backup use)
Definition:
FxFxFileReader.h:248
ThePEG::FxFxFileReader::FxFxFileReader
FxFxFileReader()
Default constructor.
Definition:
FxFxFileReader.h:47
ThePEG::DecayerPtr
ThePEG::Ptr< Decayer >::pointer DecayerPtr
ThePEG::FxFxFileReader::theIncludeFxFxTags
bool theIncludeFxFxTags
Include/Read FxFx tags.
Definition:
FxFxFileReader.h:243
ThePEG::FxFxFileReader::persistentInput
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
ThePEG::FxFxFileReader::scalemap
map< string, string > scalemap
Further information on the weights.
Definition:
FxFxFileReader.h:258
ThePEG::FxFxFileReader::optionalWeightsTemp
map< string, double > optionalWeightsTemp
Temporary holder for optional weights.
Definition:
FxFxFileReader.h:264
ThePEG::Exception
ThePEG::FxFxFileReader::persistentOutput
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
ThePEG::FxFxFileReader::neve
long neve
The number of events in this file.
Definition:
FxFxFileReader.h:181
ThePEG::FxFxFileReader::LHFVersion
string LHFVersion
If the file is a standard Les Houches formatted file (LHF) this is its version number.
Definition:
FxFxFileReader.h:193
ThePEG::ClassTraits
ThePEG::FxFxFileReader::erase_substr
void erase_substr(std::string &subject, const std::string &search)
Erases all occurences of a substring from a string.
ThePEG::FxFxFileReader::preInitialize
virtual bool preInitialize() const
Return true if this object needs to be initialized before all other objects because it needs to extra...
ThePEG::CFileLineReader
ThePEG::FxFxFileReader::theQNumbers
bool theQNumbers
Whether or not to search for QNUMBERS stuff.
Definition:
FxFxFileReader.h:238
ThePEG::FxFxFileReader::ieve
long ieve
The current event number.
Definition:
FxFxFileReader.h:186
ThePEG::BaseClassTrait
ThePEG::FxFxFileReader::fullclone
virtual IBPtr fullclone() const
Make a clone of this object, possibly modifying the cloned object to make it sane.
ThePEG::FxFxFileReader::close
virtual void close()
Close the file from which events have been read.
ThePEG::FxFxFileReader::initialize
virtual void initialize(FxFxEventHandler &eh)
Initialize.
ThePEG::ClassTraitsBase
Generated on Sat Apr 11 2020 14:50:29 for Herwig by
1.8.13