All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
WireCellToolkit_module.cc
Go to the documentation of this file.
1 #include "art/Framework/Core/ModuleMacros.h"
2 #include "art/Framework/Core/SharedProducer.h"
3 #include "art/Utilities/make_tool.h"
5 
6 using namespace std;
7 
8 namespace wcls {
9 
10  class WireCellToolkit : public art::SharedProducer {
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 
23 wcls::WireCellToolkit::WireCellToolkit(fhicl::ParameterSet const& pset, art::ProcessingFrame const&)
24  : SharedProducer(pset)
25 {
26  const std::string s{"WCT"};
27  serializeExternal(s);
28  this->reconfigure(pset);
29 }
31 
32 void
33 wcls::WireCellToolkit::produce(art::Event& evt, art::ProcessingFrame const&)
34 {
35  m_wcls->process(evt);
36 }
37 
38 void
39 wcls::WireCellToolkit::reconfigure(fhicl::ParameterSet const& pset)
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 {
50  DEFINE_ART_MODULE(WireCellToolkit)
51 }
double std(const std::vector< short > &wf, const double ped_mean, size_t start, size_t nsample)
Definition: UtilFunc.cxx:42
WireCellToolkit(fhicl::ParameterSet const &pset, art::ProcessingFrame const &)
void reconfigure(fhicl::ParameterSet const &pset)
void produce(art::Event &evt, art::ProcessingFrame const &)
for pfile in ack l reconfigure(.*) override"` do echo "checking $
std::unique_ptr< wcls::MainTool > m_wcls
then echo File list $list not found else cat $list while read file do echo $file sed s
Definition: file_to_url.sh:60
TCEvent evt
Definition: DataStructs.cxx:8