Belle II Software development
EvtGenModelRegister Class Reference

Class to keep a register of all Belle2 EvtDecayBases. More...

#include <EvtGenModelRegister.h>

Classes

class  Factory
 Helper Class to easily register new EvtDecayBases for Belle2. More...
 

Public Types

typedef EvtDecayBase * ModelFactory()
 Callback type to return a new model instance.
 

Static Public Member Functions

static void registerModel (ModelFactory *factory)
 Register a new Model, called by the EvtGenModelRegister::Factory class.
 
static std::list< EvtDecayBase * > getModels ()
 Return a list of models.
 

Private Member Functions

 EvtGenModelRegister ()
 Singleton: private constructor.
 
 EvtGenModelRegister (const EvtGenModelRegister &other)=delete
 Singleton: private copy constructor.
 
EvtGenModelRegisteroperator= (const EvtGenModelRegister &)=delete
 Singleton: private assignment operator.
 

Static Private Member Functions

static EvtGenModelRegistergetInstance ()
 Return reference to the instance.
 

Private Attributes

std::vector< ModelFactory * > m_models
 List of all registered EvtGenModels.
 

Detailed Description

Class to keep a register of all Belle2 EvtDecayBases.

Definition at line 23 of file EvtGenModelRegister.h.

Member Typedef Documentation

◆ ModelFactory

typedef EvtDecayBase * ModelFactory()

Callback type to return a new model instance.

Definition at line 26 of file EvtGenModelRegister.h.

Constructor & Destructor Documentation

◆ EvtGenModelRegister()

EvtGenModelRegister ( )
inlineprivate

Singleton: private constructor.

Definition at line 57 of file EvtGenModelRegister.h.

57{};

Member Function Documentation

◆ registerModel()

static void registerModel ( ModelFactory factory)
inlinestatic

Register a new Model, called by the EvtGenModelRegister::Factory class.

Definition at line 44 of file EvtGenModelRegister.h.

45 {
46 getInstance().m_models.push_back(factory);
47 }
std::vector< ModelFactory * > m_models
List of all registered EvtGenModels.
static EvtGenModelRegister & getInstance()
Return reference to the instance.

Member Data Documentation

◆ m_models

std::vector<ModelFactory*> m_models
private

List of all registered EvtGenModels.

Definition at line 71 of file EvtGenModelRegister.h.


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