Throwing_service.cc
Go to the documentation of this file.
1 // ======================================================================
2 // Throwing is a service that throws an exception when the
3 // postProcessEvent signal is emitted.
4 // ======================================================================
5 
11 
12 using namespace art;
13 
14 namespace arttest {
15  class Throwing {
16  public:
17  struct Config {
18  };
21 
22  private:
23  void throwError(art::Event const& e, ScheduleContext);
24  };
25 }
26 
28 {
29  r.sPostProcessEvent.watch(this, &Throwing::throwError);
30  mf::LogInfo("testing") << "Throwing service created";
31 }
32 
33 void
35 {
36  mf::LogInfo("testing") << "Throwing service about to throw";
38  << "Intentional exception from Throwing service";
39 }
40 
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo
#define DEFINE_ART_SERVICE(svc)
Definition: ServiceMacros.h:88
#define DECLARE_ART_SERVICE(svc, scope)
Definition: ServiceMacros.h:86
cfg
Definition: dbjson.py:29
Throwing(Parameters const &cfg, ActivityRegistry &ar)
void throwError(art::Event const &e, ScheduleContext)
const double e
GlobalSignal< detail::SignalResponseType::LIFO, void(Event const &, ScheduleContext)> sPostProcessEvent
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66