LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
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 
33 {
34  m_wcls->process(evt);
35 }
36 
38 {
39  auto const& wclsPS = pset.get<fhicl::ParameterSet>("wcls_main");
40  m_wcls = art::make_tool<wcls::MainTool>(wclsPS);
41  if (!m_wcls) {
42  throw cet::exception("WireCellToolkit_module") << "Failed to get Art Tool \"wcls_main\"\n";
43  }
44  m_wcls->produces(producesCollector());
45 }
46 
47 namespace wcls {
49 }
WireCellToolkit(fhicl::ParameterSet const &pset, art::ProcessingFrame const &)
void reconfigure(fhicl::ParameterSet const &pset)
STL namespace.
void produce(art::Event &evt, art::ProcessingFrame const &)
#define DEFINE_ART_MODULE(klass)
Definition: ModuleMacros.h:65
T get(std::string const &key) const
Definition: ParameterSet.h:314
void serializeExternal(T const &...)
ProducesCollector & producesCollector() noexcept
std::unique_ptr< wcls::MainTool > m_wcls
TCEvent evt
Definition: DataStructs.cxx:8
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33