116 catch (std::bad_alloc
const&) {}
129 catch (std::out_of_range
const&) {}
154 std::vector<int> intData(5, 0);
157 for (
unsigned int i = 0; i < 10; ++i) {
161 intTotal += intData.at(i);
173 using OneMebibyte = std::array<unsigned char, 1048576U>;
175 std::vector<OneMebibyte> manyMebibytes;
178 mf::LogVerbatim(
"Exploder") <<
"Now allocating: " << manyMebibytes.max_size()
179 <<
" x " <<
sizeof(OneMebibyte) <<
" bytes";
180 manyMebibytes.resize(manyMebibytes.max_size());
189 <<
"I hate the world and I am vengeful.\n";
MaybeLogger_< ELseverityLevel::ELsev_info, true > LogVerbatim
Exploder(Parameters const &config)
Constructor.
static unsigned int throwOutOfRange()
Throws a std::length_error exception.
fhicl::Atom< bool > ManageArtException
fhicl::Atom< bool > ManageBadAlloc
virtual void analyze(art::Event const &) override
Executes the iterations.
ChannelGroupService::Name Name
EDAnalyzer(fhicl::ParameterSet const &pset)
#define DEFINE_ART_MODULE(klass)
static void throwBadAlloc()
Throws a std::out_of_range exception.
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
LArSoft-specific namespace.
fhicl::Atom< bool > ManageOutOfRange
static void throwArtException()
Throws a std::out_of_range exception.