LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
RFFHitFinder_module.cc
Go to the documentation of this file.
1 // Class: RFFHitFinder
3 // Module Type: producer
4 // File: RFFHitFinder_module.cc
5 //
6 // Generated at Fri Jan 30 17:27:31 2015 by Wesley Ketchum using artmod
7 // from cetpkgsupport v1_08_02.
9 
16 #include "fhiclcpp/ParameterSet.h"
17 
20 
21 #include <memory>
22 
24 
25 namespace hit {
26  class RFFHitFinder;
27 }
28 
29 namespace hit {
30 
31  class RFFHitFinder : public art::EDProducer {
32  public:
33  explicit RFFHitFinder(fhicl::ParameterSet const& p);
34 
35  // Plugins should not be copied or assigned.
36  RFFHitFinder(RFFHitFinder const&) = delete;
37  RFFHitFinder(RFFHitFinder&&) = delete;
38  RFFHitFinder& operator=(RFFHitFinder const&) = delete;
39  RFFHitFinder& operator=(RFFHitFinder&&) = delete;
40 
41  private:
42  // Required functions.
43  void produce(art::Event& e) override;
44 
45  // Selected optional functions.
46  void beginJob() override;
47 
50  };
51 
53  : EDProducer{p}
54  , fWireModuleLabel(p.get<std::string>("WireModuleLabel"))
55  , fAlg(p.get<fhicl::ParameterSet>("RFFHitFinderAlgParams"))
56  {
57  //calls the produces stuff for me!
59  }
60 
62  {
64 
66  e.getByLabel(fWireModuleLabel, wireHandle);
67 
68  std::unique_ptr<std::vector<recob::Hit>> hitCollection(new std::vector<recob::Hit>);
69  fAlg.Run(*wireHandle, *hitCollection, *geoHandle);
70 
72  hcol.use_hits(std::move(hitCollection));
73  hcol.put_into(e);
74 
75  //e.put(std::move(hitCollection));
76  }
77 
79  {
81  geo::Geometry const& geo(*geoHandle);
83  }
84 
85 }
86 
art::InputTag fWireModuleLabel
void Run(std::vector< recob::Wire > const &, std::vector< recob::Hit > &, geo::Geometry const &)
EDProducer(fhicl::ParameterSet const &pset)
Definition: EDProducer.cc:6
void use_hits(std::unique_ptr< std::vector< recob::Hit >> &&srchits)
Uses the specified collection as data product.
Definition: HitCreator.cxx:376
static void declare_products(art::ProducesCollector &collector, std::string instance_name="", bool doWireAssns=true, bool doRawDigitAssns=true)
Declares the hit products we are going to fill.
Definition: HitCreator.cxx:248
void SetFitterParamsVectors(geo::Geometry const &)
Helper functions to create a hit.
#define DEFINE_ART_MODULE(klass)
Definition: ModuleMacros.h:65
A class handling a collection of hits and its associations.
Definition: HitCreator.h:650
The geometry of one entire detector, as served by art.
Definition: Geometry.h:181
RFFHitFinder(fhicl::ParameterSet const &p)
Detector simulation of raw signals on wires.
ProducesCollector & producesCollector() noexcept
bool getByLabel(std::string const &label, std::string const &instance, Handle< PROD > &result) const
RFFHitFinder & operator=(RFFHitFinder const &)=delete
void produce(art::Event &e) override
void put_into(art::Event &)
Moves the data into the event.
Definition: HitCreator.h:748
Float_t e
Definition: plot.C:35
Namespace collecting geometry-related classes utilities.
art framework interface to geometry description
RFFHitFinderAlg fAlg
void beginJob() override