1 //--------------------------------------------------------------------------
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.
8 // Copyright Information: See EvtGen/COPYRIGHT
9 // Copyright (C) 1998 Caltech, UCSB
11 // Module: EvtSymTable.cc
13 // Description: Class to hold the symbols that are defined
14 // in the DECAY files.
15 // Modification history:
17 // RYD May 8, 1997 Module created
19 //------------------------------------------------------------------------
21 #include "EvtGenBase/EvtPatches.hh"
26 #include "EvtGenBase/EvtSymTable.hh"
27 #include "EvtGenBase/EvtReport.hh"
32 std::map<std::string,std::string> EvtSymTable::_symMap;
35 EvtSymTable::~EvtSymTable(){}
37 EvtSymTable::EvtSymTable() {
41 void EvtSymTable::define(const std::string& symname,std::string d) {
43 if ( _symMap.find(symname)!=_symMap.end() ) {
44 report(INFO,"EvtGen") << "Symbol:"<<symname.c_str()<<
45 " redefined, old value:"<<_symMap[symname].c_str()<<" new value:"<<d.c_str()<<endl;
54 std::string EvtSymTable::get(const std::string& symname,int& ierr) {
58 if ( _symMap.find(symname)!=_symMap.end() ) return _symMap[symname];
60 // If no matching symbol found just return the string