ATLAS Offline Software
Loading...
Searching...
No Matches
Generators
Pythia8_i
src
UserProcessFactory.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
Pythia8_i/UserProcessFactory.h
"
6
7
#include <stdexcept>
8
9
namespace
Pythia8_UserProcess
{
10
11
std::shared_ptr<Sigma2Process>
UserProcessFactory::create
(
const
std::string &name){
12
std::map<std::string, const ICreator*>::const_iterator it =
s_creators
().find(name);
13
if
(it ==
s_creators
().end()){
14
//eek!
15
throw
std::runtime_error(
"Pythia 8 UserProcessFactory: cannot create user process "
+ name);
16
}
17
18
return
it->second->create();
19
}
20
22
std::map<std::string, const UserProcessFactory::ICreator*> &
UserProcessFactory::s_creators
(){
23
static
std::map<std::string, const UserProcessFactory::ICreator*> creators;
24
return
creators;
25
}
26
27
}
28
UserProcessFactory.h
Pythia8_UserProcess::UserProcessFactory::s_creators
static std::map< std::string, const ICreator * > & s_creators()
static function to instantiate map of string name Vs. creator object on first use
Definition
UserProcessFactory.cxx:22
Pythia8_UserProcess::UserProcessFactory::create
static std::shared_ptr< Sigma2Process > create(const std::string &procName)
Definition
UserProcessFactory.cxx:11
Pythia8_UserProcess
Definition
UserProcessFactory.h:14
Generated on
for ATLAS Offline Software by
1.14.0