ATLAS Offline Software
Classes | Static Public Member Functions | Private Member Functions | Static Private Member Functions | List of all members
Pythia8_UserResonance::UserResonanceFactory Class Reference

#include <UserResonanceFactory.h>

Collaboration diagram for Pythia8_UserResonance::UserResonanceFactory:

Classes

class  Creator
 
class  ICreator
 

Static Public Member Functions

static std::shared_ptr< ResonanceWidths > create (const std::string &name, int pdgid)
 Call this with the name of the ResonanceWidth and PDG ID to which it will be applied e.g. More...
 

Private Member Functions

 UserResonanceFactory ()
 

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 More...
 

Detailed Description

Definition at line 18 of file UserResonanceFactory.h.

Constructor & Destructor Documentation

◆ UserResonanceFactory()

Pythia8_UserResonance::UserResonanceFactory::UserResonanceFactory ( )
inlineprivate

Definition at line 31 of file UserResonanceFactory.h.

31 {};

Member Function Documentation

◆ create()

std::shared_ptr< ResonanceWidths > Pythia8_UserResonance::UserResonanceFactory::create ( const std::string &  name,
int  pdgid 
)
static

Call this with the name of the ResonanceWidth and PDG ID to which it will be applied e.g.

create("MyResonance", 23) will return a MyResonance instance that will be applied to the Z

Definition at line 13 of file UserResonanceFactory.cxx.

13  {
14 
15  std::map<std::string, const ICreator*>::const_iterator it = s_creators().find(name);
16  if(it == s_creators().end()){
17  //eek!
18  throw std::runtime_error("Pythia 8 UserResonanceFactory: cannot create user resonance " + name);
19  }
20  return it->second->create(pdgid);
21  }

◆ s_creators()

std::map< std::string, const UserResonanceFactory::ICreator * > & Pythia8_UserResonance::UserResonanceFactory::s_creators ( )
staticprivate

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

Definition at line 24 of file UserResonanceFactory.cxx.

24  {
25  static std::map<std::string, const UserResonanceFactory::ICreator*> creators;
26  return creators;
27  }

The documentation for this class was generated from the following files:
skel.it
it
Definition: skel.GENtoEVGEN.py:396
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
Pythia8_UserResonance::UserResonanceFactory::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: UserResonanceFactory.cxx:24