Commit 65e45d78 authored by LEFEBVREJP email's avatar LEFEBVREJP email
Browse files

Further cleanup of EmitDB and DecayDb.

parent 2774f95e
Pipeline #152639 passed with stages
in 17 minutes and 42 seconds
......@@ -13488,9 +13488,12 @@ float DecayDb::calculate_activity(int zaid, float lp_abundance,
activity = activity * avogadro * lntwo / curie;
return activity;
}
std::string DecayDb::activation_title() const { return mActivationTitle; }
std::string DecayDb::actinide_title() const { return mActinideTitle; }
std::string DecayDb::fission_product_title() const
const std::string& DecayDb::activation_title() const
{
return mActivationTitle;
}
const std::string& DecayDb::actinide_title() const { return mActinideTitle; }
const std::string& DecayDb::fission_product_title() const
{
return mFissionProductTitle;
}
......@@ -13532,11 +13535,11 @@ const DecayDBEntry& DecayDb::actinide(const int zaid) const
const auto& it = mActinide.find(zaid);
return it->second;
}
std::unordered_map<int, DecayDBEntry>& DecayDb::fissionProducts()
std::unordered_map<int, DecayDBEntry>& DecayDb::fission_products()
{
return mFissionProduct;
}
const std::unordered_map<int, DecayDBEntry>& DecayDb::fissionProducts() const
const std::unordered_map<int, DecayDBEntry>& DecayDb::fission_products() const
{
return mFissionProduct;
}
......
......@@ -132,9 +132,9 @@ class RADIX_PUBLIC DecayDb
DecayDb();
float calculate_activity(int zaid, float lp_abundance, float ap_abundance,
float fp_abundance) const;
std::string activation_title() const;
std::string actinide_title() const;
std::string fission_product_title() const;
const std::string& activation_title() const;
const std::string& actinide_title() const;
const std::string& fission_product_title() const;
void set_activation_title(const std::string& title);
void set_actinide_title(const std::string& title);
void set_fission_product_title(const std::string& title);
......@@ -144,8 +144,8 @@ class RADIX_PUBLIC DecayDb
std::unordered_map<int, DecayDBEntry>& actinides();
const std::unordered_map<int, DecayDBEntry>& actinides() const;
const DecayDBEntry& actinide(const int zaid) const;
std::unordered_map<int, DecayDBEntry>& fissionProducts();
const std::unordered_map<int, DecayDBEntry>& fissionProducts() const;
std::unordered_map<int, DecayDBEntry>& fission_products();
const std::unordered_map<int, DecayDBEntry>& fission_products() const;
const DecayDBEntry& fission_product(const int zaid) const;
const std::unordered_map<int, DecayDBEntry>::iterator find_decayer(
const int zaid);
......@@ -154,18 +154,4 @@ class RADIX_PUBLIC DecayDb
}; // class
} // namespace radix
namespace std
{
template <>
struct hash<radix::DecayDBEntry>
{
std::size_t operator()(const radix::DecayDBEntry& rhs) const
{
using std::hash;
using std::size_t;
using std::string;
return rhs.z * 10000 + rhs.a * 10 + rhs.m + int(rhs.energy);
}
}; // struct hash<radix::DecayDBEntry>
} // namespace std
#endif /** RADIX_RADIXIO_DECAYDB_HH_ */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment