Belle II Software  release-08-01-10
EvtGenModelRegister.cc
1 /**************************************************************************
2  * basf2 (Belle II Analysis Software Framework) *
3  * Author: The Belle II Collaboration *
4  * *
5  * See git log for contributors and copyright holders. *
6  * This file is licensed under LGPL-3.0, see LICENSE.md. *
7  **************************************************************************/
8 
9 #include <generators/evtgen/EvtGenModelRegister.h>
10 
11 #include <memory>
12 
13 using namespace std;
14 
15 namespace Belle2 {
21  EvtGenModelRegister& EvtGenModelRegister::getInstance()
22  {
23  static unique_ptr<EvtGenModelRegister> instance(new EvtGenModelRegister());
24  return *instance;
25  }
26 
27  list<EvtDecayBase*> EvtGenModelRegister::getModels()
28  {
29  list<EvtDecayBase*> modelList;
30  for (auto factory : getInstance().m_models) {
31  modelList.push_back(factory());
32  }
33  return modelList;
34  }
36 }
Class to keep a register of all Belle2 EvtDecayBases.
Abstract base class for different kinds of events.