elegent is hosted by Hepforge, IPPP Durham
Elegent
ModelFactory.h
1 /********************************************************************************
2 
3  Copyright 2013 Jan Kašpar
4 
5  This file is part of Elegent (http://elegent.hepforge.org/).
6 
7  Elegent is free software: you can redistribute it and/or modify
8  it under the terms of the GNU General Public License as published by
9  the Free Software Foundation, either version 3 of the License, or
10  (at your option) any later version.
11 
12  Elegent is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with Elegent. If not, see <http://www.gnu.org/licenses/>.
19 
20 ********************************************************************************/
21 
22 #ifndef _elegent_modelfactory_
23 #define _elegent_modelfactory_
24 
25 #include "BHModel.h"
26 #include "BSWModel.h"
27 #include "DLModel.h"
28 #include "ExpModel.h"
29 #include "FerreiraModel.h"
30 #include "GodizovModel.h"
31 #include "IslamModel.h"
32 #include "PPPModel.h"
33 #include "JenkovszkyModel.h"
34 
35 #include <string>
36 #include <map>
37 
38 namespace Elegent
39 {
40 
45 {
46  protected:
48  std::map<std::string, Model*> model_map;
49 
50  public:
51  ModelFactory();
52 
53  void PrintList() const;
54 
55  Model* MakeInstance(const std::string &tag, bool callInit = true) const;
56 };
57 
58 
59 } // namespace
60 
61 #endif
Definition: BHModel.h:28
The base class for hadronic models of (anti)proton-proton elastic scattering.
Definition: Model.h:35
A class to give list of available models and to create an instance of a model specified by tag...
Definition: ModelFactory.h:44
std::map< std::string, Model * > model_map
map: tag –> model instance
Definition: ModelFactory.h:48