00001
00002
00003
00004
00005
00006
00007
00008 #ifndef DEFTABLE_HH
00009 #define DEFTABLE_HH
00010
00011 #include "CLHEP/config/CLHEP.h"
00012 #include <string>
00013 #include <map>
00014
00015 namespace HepPDT {
00016
00021 class DefTable {
00022 typedef std::map<std::string,double> TempDefMap;
00023
00024 public:
00025 typedef TempDefMap::const_iterator const_iterator;
00026 typedef TempDefMap::iterator iterator;
00027
00028 DefTable( );
00029 ~DefTable() { ; }
00030
00031
00032
00033 void addDefinition( std::string const & def, double val ) { tempDefines[def] = val; }
00034
00035
00036
00037 bool hasDefinition( std::string const & def ) const;
00038
00039
00040
00041 int size() const { return tempDefines.size(); }
00042 double definition( std::string const & def );
00043 void writeDefinitions() const;
00044
00045 iterator begin() { return tempDefines.begin(); }
00046 const_iterator begin() const { return tempDefines.begin(); }
00047
00048 iterator end() { return tempDefines.end(); }
00049 const_iterator end() const { return tempDefines.end(); }
00050
00051 private:
00052 TempDefMap tempDefines;
00053
00054
00055 DefTable & operator = ( DefTable const & );
00056 DefTable( DefTable const & );
00057
00058 };
00059
00060 }
00061
00062 #endif // DEFTABLE_HH