PYTHIA  8.312
Public Member Functions | Public Attributes | List of all members
PythiaParallel Class Reference

Class for doing Pythia runs in parallel. More...

#include <PythiaParallel.h>

Public Member Functions

 PythiaParallel (string xmlDir="../share/Pythia8/xmldoc", bool printBanner=true)
 Constructor. More...
 
bool readString (string setting, bool warn=true)
 Read in one update for a setting or particle data from a single line.
 
bool readFile (string fileName, bool warn=true, int subrun=SUBRUNDEFAULT)
 Read in updates for settings or particle data from user-defined file. More...
 
bool readFile (string fileName, int subrun)
 
bool readFile (istream &is=cin, bool warn=true, int subrun=SUBRUNDEFAULT)
 
bool readFile (istream &is, int subrun)
 
bool init ()
 Initialize all Pythia objects.
 
bool init (function< bool(Pythia *)> additionalSetup)
 
void foreach (function< void(Pythia *)> action)
 Perform the specified action for each Pythia instance. More...
 
void foreachAsync (function< void(Pythia *)> action)
 Perform the specified action for each instance in parallel. More...
 
void stat ()
 Write final statistics, combining errors from each Pythia instance.
 
vector< long > run (long nEvents, function< void(Pythia *)> callback)
 Generate events in parallel.
 
vector< long > run (function< void(Pythia *)> callback)
 
double sigmaGen () const
 Weighted average of the generated cross section for each Pythia instance.
 
double weightSum () const
 Sum of weights from all Pythia instances.
 

Public Attributes

Pythia pythiaHelper
 Pythia object used for loading data.
 
Settingssettings
 The settings that will be used to initialize Pythia instances.
 
ParticleDataparticleData
 The particle database that will be used to initialize Pythia instances.
 

Detailed Description

Class for doing Pythia runs in parallel.

Constructor & Destructor Documentation

PythiaParallel ( string  xmlDir = "../share/Pythia8/xmldoc",
bool  printBanner = true 
)

Constructor.

The PythiaParallel class.

Contructor.

Member Function Documentation

void foreach ( function< void(Pythia *)>  action)

Perform the specified action for each Pythia instance.

Perform action in serial.

void foreachAsync ( function< void(Pythia *)>  action)

Perform the specified action for each instance in parallel.

Perform action in parallel.

bool init ( function< bool(Pythia *)>  additionalSetup)

Initialize error printing.

Read settings.

Set seeds.

Create instances in parallel.

Wait for all initialization threads to finish.

Set initialization.

Print warning message and return.

bool readFile ( string  fileName,
bool  warn = true,
int  subrun = SUBRUNDEFAULT 
)

Read in updates for settings or particle data from user-defined file.

Hand over real work to next method.


The documentation for this class was generated from the following files: