22 throw cet::exception(__PRETTY_FUNCTION__) <<
"Have not configured yet!" << std::endl;
30 auto const& weights = it->second->GetWeight(e);
32 if (weights.size() == 0) {
33 std::vector<double>
empty;
34 std::pair<std::string, std::vector<double>> p(
"empty", empty);
38 std::pair<std::string, std::vector<double>> p(it->first +
"_" + it->second->fWeightCalcType,
Allows to interface to EventWeight calculators.
std::map< std::string, std::vector< double > > fWeight
bool _configured
Readiness flag.
WeightManager(const std::string name="WeightManager")
std::map< std::string, Weight_t * > fWeightCalcMap
A set of custom weight calculators.
MCEventWeight Run(art::Event &e, const int inu)
Core function (previous call to Configure is needed)
const std::string & Name() const
Name getter.
cet::coded_exception< error, detail::translate > exception
decltype(auto) constexpr empty(T &&obj)
ADL-aware version of std::empty.