Commit 388dc0f7 authored by LEFEBVREJP email's avatar LEFEBVREJP email
Browse files

Added decaydb updates from @1ji

parent 6af0ddb0
Pipeline #134611 passed with stages
in 18 minutes and 34 seconds
......@@ -13545,14 +13545,15 @@ const DecayDBEntry& DecayDb::fission_product(const int zaid) const
const auto& it = mFissionProduct.find(zaid);
return it->second;
}
const std::unordered_map<int, DecayDBEntry>::iterator DecayDb::find_decayer(
const int zaid)
{
std::unordered_map<int, DecayDBEntry>::iterator decayer;
const auto& leI = mActivation.find(zaid);
if (leI != mActivation.end())
const auto& fpI = mFissionProduct.find(zaid);
if (fpI != mFissionProduct.end())
{
decayer = leI;
decayer = fpI;
return decayer;
}
const auto& acI = mActinide.find(zaid);
......@@ -13561,9 +13562,32 @@ const std::unordered_map<int, DecayDBEntry>::iterator DecayDb::find_decayer(
decayer = acI;
return decayer;
}
const auto& fpI = mFissionProduct.find(zaid);
decayer = fpI;
const auto& leI = mActivation.find(zaid);
if (leI != mActivation.end())
{
decayer = leI;
return decayer;
}
decayer = mFissionProduct.end();
return decayer;
}
const DecayDBEntry& DecayDb::find_entry(const int zaid) const
{
if (mFissionProduct.find(zaid) != mFissionProduct.end())
{
return mFissionProduct.at(zaid);
}
if (mActinide.find(zaid) != mActinide.end())
{
return mActinide.at(zaid);
}
if (mActivation.find(zaid) != mActivation.end())
{
return mActivation.at(zaid);
}
return mFissionProduct.at(
10030); // getting this decayer back should raise some warning signs
}
} // namespace radix
......@@ -149,6 +149,7 @@ class RADIX_PUBLIC DecayDb
const DecayDBEntry& fission_product(const int zaid) const;
const std::unordered_map<int, DecayDBEntry>::iterator find_decayer(
const int zaid);
const DecayDBEntry& find_entry(const int zaid) const;
}; // class
} // namespace radix
......
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