BOSS
8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtModel.hh
Go to the documentation of this file.
1
//--------------------------------------------------------------------------
2
//
3
// Environment:
4
// This software is part of the EvtGen package developed jointly
5
// for the BaBar and CLEO collaborations. If you use all or part
6
// of it, please give an appropriate acknowledgement.
7
//
8
// Copyright Information: See EvtGen/COPYRIGHT
9
// Copyright (C) 1998 Caltech, UCSB
10
//
11
// Module: EvtGen/EvtModel.hh
12
//
13
// Description:
14
//
15
// Modification history:
16
//
17
// DJL/RYD August 8, 1998 Module created
18
//
19
//------------------------------------------------------------------------
20
21
#ifndef EVTMODEL_HH
22
#define EVTMODEL_HH
23
24
#include "
EvtDecayBase.hh
"
25
#include "
EvtStringHash.hh
"
26
#include <map>
27
// #include <fstream.h>
28
29
// Class to read in and handle the decays available
30
// to EvtGen for each particle, and the model to be
31
// used for each one.
32
33
class
EvtModel {
34
35
public
:
36
static
EvtModel&
instance
();
37
38
void
Register
(
EvtDecayBase
* prototype );
39
40
int
isModel
( std::string name );
41
42
EvtDecayBase
*
getFcn
( std::string model_name );
43
44
int
isCommand
( std::string cmd );
45
void
storeCommand
( std::string cmd, std::string cnfgstr );
46
47
private
:
48
EvtModel();
49
50
static
EvtModel* _instance;
51
52
std::map<std::string, EvtDecayBase*> _modelNameHash;
53
std::map<std::string, EvtDecayBase*> _commandNameHash;
54
};
55
56
inline
EvtModel&
EvtModel::instance
() {
57
if
( _instance == 0 ) _instance =
new
EvtModel;
58
return
*_instance;
59
}
60
61
#endif
EvtDecayBase.hh
EvtStringHash.hh
EvtDecayBase
Definition
EvtDecayBase.hh:39
EvtModel::getFcn
EvtDecayBase * getFcn(std::string model_name)
Definition
EvtModel.cc:44
EvtModel::storeCommand
void storeCommand(std::string cmd, std::string cnfgstr)
Definition
EvtModel.cc:89
EvtModel::Register
void Register(EvtDecayBase *prototype)
Definition
EvtModel.cc:59
EvtModel::isModel
int isModel(std::string name)
Definition
EvtModel.cc:77
EvtModel::instance
static EvtModel & instance()
Definition
EvtModel.hh:56
EvtModel::isCommand
int isCommand(std::string cmd)
Definition
EvtModel.cc:83
8.0.0
BOSS_Gen
BesEvtGen
src
EvtGen
EvtGenBase
EvtModel.hh
Generated by
1.16.1