23 #include "CLHEP/Random/RandFlat.h" 33 using namespace fhicl;
36 class RandomNumberSaveTest;
66 std::ostream_iterator<arttest::RandomNumberSaveTest::prod_t::value_type>(
86 <<
"Throwing while processing ordinal event " <<
eventN_ 87 <<
" as requested.\n";
91 static size_t constexpr nums_size{5};
92 static size_t constexpr random_range{1000};
93 nums.reserve(nums_size);
94 generate_n(std::back_inserter(nums), nums_size, [
this] {
95 return dist_.fireInt(random_range);
97 std::cerr <<
"nums: " << nums <<
"\n";
99 std::cerr <<
"(*hp): " << *hp <<
"\n";
104 dist_.fireInt(random_range);
108 e.
put(std::make_unique<prod_t>(nums));
base_engine_t & createEngine(seed_t seed)
size_t const dieOnNthEvent_
RandomNumberSaveTest(Parameters const &p)
std::string const myLabel_
std::vector< size_t > prod_t
bool getByLabel(std::string const &label, std::string const &instance, Handle< PROD > &result) const
#define DEFINE_ART_MODULE(klass)
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
auto copy_all(FwdCont &, FwdIter)
void produce(art::Event &e) override
std::ostream & operator<<(std::ostream &, ParameterSetID const &)
ProductID put(std::unique_ptr< PROD > &&edp, FullSemantic< Level::Run > const semantic)