Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
art
art
test
Integration
FailingAnalyzer_module.cc
Go to the documentation of this file.
1
#include "
art/Framework/Core/EDAnalyzer.h
"
2
#include "
art/Framework/Core/ModuleMacros.h
"
3
#include "
art/test/TestObjects/ToyProducts.h
"
4
5
namespace
arttest
{
6
class
FailingAnalyzer;
7
}
8
9
//--------------------------------------------------------------------
10
//
11
// throws an exception.
12
// Every call to FailingAnalyzer::produce throws an art::Exception
13
//
14
class
arttest::FailingAnalyzer
:
public
art::EDAnalyzer
{
15
public
:
16
explicit
FailingAnalyzer
(
fhicl::ParameterSet
const
&);
17
void
analyze
(
art::Event
const
&
e
)
override
;
18
void
makeTrouble
(
art::Event
const
& e);
19
};
20
21
arttest::FailingAnalyzer::FailingAnalyzer
(
fhicl::ParameterSet
const
& pset)
22
:
art
::
EDAnalyzer
(pset)
23
{}
24
25
void
26
arttest::FailingAnalyzer::analyze
(
art::Event
const
&)
27
{
28
// Nothing to do.
29
}
30
31
void
32
arttest::FailingAnalyzer::makeTrouble
(
art::Event
const
&)
33
{
34
throw
art::Exception
(
art::errors::ProductNotFound
)
35
<<
"Intentional exception for testing purposes\n"
;
36
}
37
38
DEFINE_ART_MODULE
(
arttest::FailingAnalyzer
)
art::EDAnalyzer::EDAnalyzer
EDAnalyzer(fhicl::ParameterSet const &pset)
Definition:
EDAnalyzer.h:27
arttest::FailingAnalyzer
Definition:
FailingAnalyzer_module.cc:14
e
const double e
Definition:
gUpMuFluxGen.cxx:165
DEFINE_ART_MODULE
#define DEFINE_ART_MODULE(klass)
Definition:
ModuleMacros.h:68
ToyProducts.h
art::errors::ProductNotFound
Definition:
Exception.h:29
arttest
Definition:
GroupSelector_t.h:4
EDAnalyzer.h
ModuleMacros.h
art::Exception
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition:
Exception.h:66
arttest::FailingAnalyzer::makeTrouble
void makeTrouble(art::Event const &e)
Definition:
FailingAnalyzer_module.cc:32
art::Event
Definition:
Event.h:40
art::EDAnalyzer
Definition:
EDAnalyzer.h:22
art
Definition:
BasicOptionsHandler.h:11
arttest::FailingAnalyzer::analyze
void analyze(art::Event const &e) override
Definition:
FailingAnalyzer_module.cc:26
arttest::FailingAnalyzer::FailingAnalyzer
FailingAnalyzer(fhicl::ParameterSet const &)
Definition:
FailingAnalyzer_module.cc:21
fhicl::ParameterSet
Definition:
ParameterSet.h:34
Generated by
1.8.11