77 produces<std::vector<MCEventWeight> >();
84 std::unique_ptr<std::vector<MCEventWeight> > mcwghvec(
new std::vector<MCEventWeight>);
89 std::vector<art::Ptr<simb::MCTruth> > mclist;
102 for (
unsigned int inu = 0; inu < mclist.size(); inu++)
107 (*mcwghvec).push_back(mcwgh);
111 e.
put(std::move(mcwghvec));
120 std::stringstream job_summary;
121 job_summary << std::setprecision(2);
122 for (
int i=1; i <= 110 ;i++) job_summary <<
"=";
123 job_summary << std::endl;
124 job_summary << std::setw(20) <<
"WeightCalc" 125 << std::setw(15) <<
"Type" 126 << std::setw(15) <<
"#RW neutrinos" 127 << std::setw(15) <<
"#Multisims" 128 << std::setw(15) <<
"Min" 129 << std::setw(15) <<
"Max" 130 << std::setw(15) <<
"Avg" 132 for (
int i=1; i <= 110; i++) job_summary <<
"=";
133 job_summary << std::endl;
134 for (
auto it = weightCalcMap.begin(); it!=weightCalcMap.end(); it++) {
135 job_summary << std::setw(20) << it->first
136 << std::setw(15) << (it->second->fWeightCalcType)
137 << std::setw(15) << (it->second->fNcalls)
138 << std::setw(15) << (it->second->fNmultisims)
139 << std::setw(15) << (it->second->fMinWeight)
140 << std::setw(15) << (it->second->fMaxWeight)
141 << std::setw(15) << (it->second->fAvgWeight)
144 for (
int i=1; i<=110; i++) job_summary <<
"=";
145 job_summary << std::endl;
void produce(art::Event &e) override
size_t Configure(fhicl::ParameterSet const &cfg, art::EngineCreator &ec)
Configuration function.
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo
std::string fGenieModuleLabel
Allows to interface to EventWeight calculators.
EventWeight & operator=(EventWeight const &)=delete
ProductID put(std::unique_ptr< PROD > &&product)
#define DEFINE_ART_MODULE(klass)
std::map< std::string, Weight_t * > GetWeightCalcMap()
Returns the map between calculator name and Weight_t product.
T get(std::string const &key) const
WeightManager _wgt_manager
EventWeight(fhicl::ParameterSet const &p)
An art service to assist in the distribution of guaranteed unique seeds to all engines within an art ...
bool getByLabel(std::string const &label, std::string const &productInstanceName, Handle< PROD > &result) const
void fill_ptr_vector(std::vector< Ptr< T >> &ptrs, H const &h)
MCEventWeight Run(art::Event &e, const int inu)
Core function (previous call to Configure is needed)
Tools and modules for checking out the basics of the Monte Carlo.
cet::coded_exception< error, detail::translate > exception