ATLAS Offline Software
Loading...
Searching...
No Matches
Pythia8_UserHooks::UserHooksFactory Class Reference

#include <UserHooksFactory.h>

Collaboration diagram for Pythia8_UserHooks::UserHooksFactory:

Classes

class  Creator
class  ICreator

Public Member Functions

template<>
std::map< std::string, double > & userSettings ()
template<>
std::map< std::string, int > & userSettings ()
template<>
std::map< std::string, bool > & userSettings ()
template<>
std::map< std::string, std::string > & userSettings ()

Static Public Member Functions

static UserHooks * create (const std::string &hookName)
template<typename T>
static std::map< std::string, T > & userSettings ()
static std::map< std::string, double > & userParams ()
static std::map< std::string, int > & userModes ()
static std::map< std::string, std::string > & userWords ()

Private Member Functions

 UserHooksFactory ()

Static Private Member Functions

static std::map< std::string, const ICreator * > & s_creators ()
 static function to instantiate map of string name Vs. creator object on first use

Detailed Description

Definition at line 35 of file UserHooksFactory.h.

Constructor & Destructor Documentation

◆ UserHooksFactory()

Pythia8_UserHooks::UserHooksFactory::UserHooksFactory ( )
inlineprivate

Definition at line 43 of file UserHooksFactory.h.

43{};

Member Function Documentation

◆ create()

UserHooks * Pythia8_UserHooks::UserHooksFactory::create ( const std::string & hookName)
static

Definition at line 10 of file UserHooksFactory.cxx.

10 {
11 std::map<std::string, const ICreator*>::const_iterator it = s_creators().find(name);
12 if(it == s_creators().end()){
13 throw std::runtime_error("Pythia 8 UserHooksFactory: cannot create user hook " + name);
14 }
15 return it->second->create();
16 }
static std::map< std::string, const ICreator * > & s_creators()
static function to instantiate map of string name Vs. creator object on first use

◆ s_creators()

std::map< std::string, const UserHooksFactory::ICreator * > & Pythia8_UserHooks::UserHooksFactory::s_creators ( )
staticprivate

static function to instantiate map of string name Vs. creator object on first use

Definition at line 19 of file UserHooksFactory.cxx.

19 {
20 static std::map<std::string, const UserHooksFactory::ICreator*> creators;
21 return creators;
22 }

◆ userModes()

std::map< std::string, int > & Pythia8_UserHooks::UserHooksFactory::userModes ( )
static

◆ userParams()

std::map< std::string, double > & Pythia8_UserHooks::UserHooksFactory::userParams ( )
static

◆ userSettings() [1/5]

template<typename T>
std::map< std::string, T > & Pythia8_UserHooks::UserHooksFactory::userSettings ( )
static

◆ userSettings() [2/5]

template<>
std::map< std::string, double > & Pythia8_UserHooks::UserHooksFactory::userSettings ( )

Definition at line 25 of file UserHooksFactory.cxx.

25 {
26 static std::map<std::string, double> settings;
27 return settings;
28 }

◆ userSettings() [3/5]

template<>
std::map< std::string, int > & Pythia8_UserHooks::UserHooksFactory::userSettings ( )

Definition at line 31 of file UserHooksFactory.cxx.

31 {
32 static std::map<std::string, int> settings;
33 return settings;
34 }

◆ userSettings() [4/5]

template<>
std::map< std::string, bool > & Pythia8_UserHooks::UserHooksFactory::userSettings ( )

Definition at line 37 of file UserHooksFactory.cxx.

37 {
38 static std::map<std::string, bool> settings;
39 return settings;
40 }

◆ userSettings() [5/5]

template<>
std::map< std::string, std::string > & Pythia8_UserHooks::UserHooksFactory::userSettings ( )

Definition at line 44 of file UserHooksFactory.cxx.

44 {
45 static std::map<std::string, std::string> settings;
46 return settings;
47 }

◆ userWords()

std::map< std::string, std::string > & Pythia8_UserHooks::UserHooksFactory::userWords ( )
static

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