LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
WireCellToolkit_module.cc
Go to the documentation of this file.
5 
6 // fixme: this should be removed once produces<>() is moved to sink components.
8 
9 #include <iostream>
10 
11 using namespace std;
12 
13 namespace wcls {
14 
16  public:
17  explicit WireCellToolkit(fhicl::ParameterSet const& pset);
18  virtual ~WireCellToolkit();
19 
20  void produce(art::Event & evt);
21  void reconfigure(fhicl::ParameterSet const& pset);
22 
23  private:
24 
25  std::unique_ptr<wcls::MainTool> m_wcls;
26 
27  };
28 }
29 
30 
32  : EDProducer()
33 {
34  this->reconfigure(pset);
35 }
37 {
38 }
39 
41 {
42  m_wcls->process(evt);
43 }
44 
46 {
47  auto const& wclsPS = pset.get<fhicl::ParameterSet>("wcls_main");
48  m_wcls = art::make_tool<wcls::MainTool>(wclsPS);
49  if (! m_wcls) {
50  throw cet::exception("WireCellToolkit_module") << "Failed to get Art Tool \"wcls_main\"\n";
51  }
52  m_wcls->produces(this);
53 }
54 
55 namespace wcls{
57 }
void reconfigure(fhicl::ParameterSet const &pset)
STL namespace.
#define DEFINE_ART_MODULE(klass)
Definition: ModuleMacros.h:42
T get(std::string const &key) const
Definition: ParameterSet.h:231
WireCellToolkit(fhicl::ParameterSet const &pset)
std::unique_ptr< wcls::MainTool > m_wcls
void produce(art::Event &evt)
Declaration of basic channel signal object.
TCEvent evt
Definition: DataStructs.cxx:5
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33