herwig
is hosted by
Hepforge
,
IPPP Durham
Herwig
7.3.0
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
45
FxFxFileReader
() :
neve
(0),
ieve
(0),
theQNumbers
(false),
theIncludeFxFxTags
(true),
46
theIncludeCentral
(false) {}
47
52
FxFxFileReader
(
const
FxFxFileReader
&);
53
54
public
:
55
62
virtual
void
initialize
(
FxFxEventHandler
& eh);
63
69
virtual
void
open
();
70
74
virtual
void
close
();
75
76
82
virtual
bool
doReadEvent
();
84
88
string
filename
()
const
{
return
theFileName
; }
89
90
/* vector<string> optionalWeightsNames;
91
92
virtual vector<string> optWeightNamesFunc();*/
93
94
95
virtual
vector<string>
optWeightsNamesFunc
();
96
97
102
void
erase_substr
(std::string& subject,
const
std::string& search);
103
104
105
public
:
106
113
void
persistentOutput
(
PersistentOStream
& os)
const
;
114
120
void
persistentInput
(
PersistentIStream
& is,
int
version);
122
126
static
void
Init
();
127
128
protected
:
129
136
virtual
IBPtr
clone
()
const
;
137
142
virtual
IBPtr
fullclone
()
const
;
144
152
virtual
void
doinit
();
153
158
virtual
bool
preInitialize
()
const
;
159
//@
160
161
protected
:
162
166
CFileLineReader
cfile
;
167
168
protected
:
169
173
long
neve
;
174
178
long
ieve
;
179
185
string
LHFVersion
;
186
191
string
outsideBlock
;
192
196
string
headerBlock
;
197
201
string
initComments
;
202
207
map<string,string>
initAttributes
;
208
212
string
eventComments
;
213
218
map<string,string>
eventAttributes
;
219
220
private
:
221
225
string
theFileName
;
226
230
bool
theQNumbers
;
231
235
bool
theIncludeFxFxTags
;
236
240
bool
theIncludeCentral
;
241
245
DecayerPtr
theDecayer
;
246
250
map<string,string>
scalemap
;
251
256
map<string,double>
optionalWeightsTemp
;
257
258
259
private
:
260
264
static
ClassDescription<FxFxFileReader>
initFxFxFileReader
;
265
269
FxFxFileReader
&
operator=
(
const
FxFxFileReader
&) =
delete
;
270
271
public
:
272
276
class
FxFxFileError:
public
Exception
{};
279
};
280
281
}
282
283
284
#include "ThePEG/Utilities/ClassTraits.h"
285
286
namespace
ThePEG
{
287
294
template
<>
295
struct
BaseClassTrait<FxFxFileReader,1>:
public
ClassTraitsType {
297
typedef
FxFxReader
NthBase
;
298
};
299
305
template
<>
306
struct
ClassTraits<FxFxFileReader>
307
:
public
ClassTraitsBase<FxFxFileReader> {
311
static
string
className
() {
return
"Herwig::FxFxFileReader"
; }
317
static
string
library
() {
return
"HwFxFx.so"
; }
318
319
};
320
323
}
324
325
#endif
/* THEPEG_FxFxFileReader_H */
ThePEG::CFileLineReader
ThePEG::ClassDescription
ThePEG::Exception
ThePEG::FxFxEventHandler
The FxFxEventHandler inherits from the general EventHandler class and administers the reading of even...
Definition:
FxFxEventHandler.h:40
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::optWeightsNamesFunc
virtual vector< string > optWeightsNamesFunc()
return the weight names
ThePEG::FxFxFileReader::FxFxFileReader
FxFxFileReader()
Default constructor.
Definition:
FxFxFileReader.h:45
ThePEG::FxFxFileReader::ieve
long ieve
The current event number.
Definition:
FxFxFileReader.h:178
ThePEG::FxFxFileReader::theDecayer
DecayerPtr theDecayer
Decayer for any decay modes read from the file.
Definition:
FxFxFileReader.h:245
ThePEG::FxFxFileReader::cfile
CFileLineReader cfile
The wrapper around the C FILE stream from which to read.
Definition:
FxFxFileReader.h:166
ThePEG::FxFxFileReader::outsideBlock
string outsideBlock
If LHF.
Definition:
FxFxFileReader.h:191
ThePEG::FxFxFileReader::FxFxFileReader
FxFxFileReader(const FxFxFileReader &)
Copy-constructor.
ThePEG::FxFxFileReader::headerBlock
string headerBlock
If LHF.
Definition:
FxFxFileReader.h:196
ThePEG::FxFxFileReader::clone
virtual IBPtr clone() const
Make a simple clone of this object.
ThePEG::FxFxFileReader::persistentInput
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
ThePEG::FxFxFileReader::doinit
virtual void doinit()
Initialize this object after the setup phase before saving an EventGenerator to disk.
ThePEG::FxFxFileReader::eventComments
string eventComments
If LHF.
Definition:
FxFxFileReader.h:212
ThePEG::FxFxFileReader::close
virtual void close()
Close the file from which events have been read.
ThePEG::FxFxFileReader::Init
static void Init()
Standard Init function used to initialize the interfaces.
ThePEG::FxFxFileReader::neve
long neve
The number of events in this file.
Definition:
FxFxFileReader.h:173
ThePEG::FxFxFileReader::filename
string filename() const
Return the name of the file from where to read events.
Definition:
FxFxFileReader.h:88
ThePEG::FxFxFileReader::theIncludeFxFxTags
bool theIncludeFxFxTags
Include/Read FxFx tags.
Definition:
FxFxFileReader.h:235
ThePEG::FxFxFileReader::eventAttributes
map< string, string > eventAttributes
If LHF.
Definition:
FxFxFileReader.h:218
ThePEG::FxFxFileReader::theFileName
string theFileName
The name of the file from where to read events.
Definition:
FxFxFileReader.h:225
ThePEG::FxFxFileReader::operator=
FxFxFileReader & operator=(const FxFxFileReader &)=delete
Private and non-existent assignment operator.
ThePEG::FxFxFileReader::optionalWeightsTemp
map< string, double > optionalWeightsTemp
Temporary holder for optional weights.
Definition:
FxFxFileReader.h:256
ThePEG::FxFxFileReader::open
virtual void open()
Open a file with events.
ThePEG::FxFxFileReader::scalemap
map< string, string > scalemap
Further information on the weights.
Definition:
FxFxFileReader.h:250
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::doReadEvent
virtual bool doReadEvent()
Read the next event from the file or stream into the corresponding protected variables.
ThePEG::FxFxFileReader::fullclone
virtual IBPtr fullclone() const
Make a clone of this object, possibly modifying the cloned object to make it sane.
ThePEG::FxFxFileReader::persistentOutput
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
ThePEG::FxFxFileReader::theQNumbers
bool theQNumbers
Whether or not to search for QNUMBERS stuff.
Definition:
FxFxFileReader.h:230
ThePEG::FxFxFileReader::initialize
virtual void initialize(FxFxEventHandler &eh)
Initialize.
ThePEG::FxFxFileReader::initAttributes
map< string, string > initAttributes
If LHF.
Definition:
FxFxFileReader.h:207
ThePEG::FxFxFileReader::initComments
string initComments
If LHF.
Definition:
FxFxFileReader.h:201
ThePEG::FxFxFileReader::LHFVersion
string LHFVersion
If the file is a standard Les Houches formatted file (LHF) this is its version number.
Definition:
FxFxFileReader.h:185
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::FxFxFileReader::initFxFxFileReader
static ClassDescription< FxFxFileReader > initFxFxFileReader
Describe an abstract base class with persistent data.
Definition:
FxFxFileReader.h:264
ThePEG::FxFxFileReader::theIncludeCentral
bool theIncludeCentral
Include central weight (for backup use)
Definition:
FxFxFileReader.h:240
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::PersistentIStream
ThePEG::PersistentOStream
ThePEG
ThePEG::IBPtr
ThePEG::Ptr< InterfacedBase >::pointer IBPtr
ThePEG::DecayerPtr
ThePEG::Ptr< Decayer >::pointer DecayerPtr
ThePEG::BaseClassTrait::NthBase
int NthBase
ThePEG::ClassTraitsBase::className
static string className()
ThePEG::ClassTraitsBase::library
static string library()
Generated on Thu Jun 20 2024 17:50:52 for Herwig by
1.9.6