WireCellToolkit_module.cc
Go to the documentation of this file.
5 
6 using namespace std;
7 
8 namespace wcls {
9 
11  public:
12  explicit WireCellToolkit(fhicl::ParameterSet const& pset, art::ProcessingFrame const&);
13  virtual ~WireCellToolkit();
14 
15  void produce(art::Event& evt, art::ProcessingFrame const&);
16  void reconfigure(fhicl::ParameterSet const& pset);
17 
18  private:
19  std::unique_ptr<wcls::MainTool> m_wcls;
20  };
21 }
22 
24  : SharedProducer(pset)
25 {
26  const std::string s{"WCT"};
28  this->reconfigure(pset);
29 }
31 
32 void
34 {
35  m_wcls->process(evt);
36 }
37 
38 void
40 {
41  auto const& wclsPS = pset.get<fhicl::ParameterSet>("wcls_main");
42  m_wcls = art::make_tool<wcls::MainTool>(wclsPS);
43  if (!m_wcls) {
44  throw cet::exception("WireCellToolkit_module") << "Failed to get Art Tool \"wcls_main\"\n";
45  }
46  m_wcls->produces(producesCollector());
47 }
48 
49 namespace wcls {
51 }
WireCellToolkit(fhicl::ParameterSet const &pset, art::ProcessingFrame const &)
std::string string
Definition: nybbler.cc:12
void reconfigure(fhicl::ParameterSet const &pset)
STL namespace.
void produce(art::Event &evt, art::ProcessingFrame const &)
#define DEFINE_ART_MODULE(klass)
Definition: ModuleMacros.h:67
virtual void reconfigure(fhicl::ParameterSet const &pset)
T get(std::string const &key) const
Definition: ParameterSet.h:271
void serializeExternal(T const &...)
ProducesCollector & producesCollector() noexcept
std::unique_ptr< wcls::MainTool > m_wcls
TCEvent evt
Definition: DataStructs.cxx:7
static QCString * s
Definition: config.cpp:1042
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33