ATLAS Offline Software
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 
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 
skel.it
it
Definition: skel.GENtoEVGEN.py:396
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
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
Pythia8_UserProcess::UserProcessFactory::create
static std::shared_ptr< Sigma2Process > create(const std::string &procName)
Definition: UserProcessFactory.cxx:11
UserProcessFactory.h
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
Pythia8_UserProcess
Definition: UserProcessFactory.h:14