LArSoft  v07_13_02
Liquid Argon Software toolkit - http://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 
17 #include "fhiclcpp/ParameterSet.h"
19 
21 
22 #include <memory>
23 
24 #include "RFFHitFinderAlg.h"
25 
26 namespace hit{
27  class RFFHitFinder;
28 }
29 
30 namespace hit{
31 
32  class RFFHitFinder : public art::EDProducer {
33  public:
34  explicit RFFHitFinder(fhicl::ParameterSet const & p);
35  // The destructor generated by the compiler is fine for classes
36  // without bare pointers or other resource use.
37 
38  // Plugins should not be copied or assigned.
39  RFFHitFinder(RFFHitFinder const &) = delete;
40  RFFHitFinder(RFFHitFinder &&) = delete;
41  RFFHitFinder & operator = (RFFHitFinder const &) = delete;
42  RFFHitFinder & operator = (RFFHitFinder &&) = delete;
43 
44  // Required functions.
45  void produce(art::Event & e) override;
46 
47  // Selected optional functions.
48  void beginJob() override;
49 
50  private:
51 
54  };
55 
56 
58  :
59  fWireModuleLabel(p.get<std::string>("WireModuleLabel")),
60  fAlg(p.get<fhicl::ParameterSet>("RFFHitFinderAlgParams"))
61  {
62  //calls the produces stuff for me!
64  }
65 
67  {
69 
71  e.getByLabel(fWireModuleLabel,wireHandle);
72 
73  std::unique_ptr< std::vector<recob::Hit> > hitCollection(new std::vector<recob::Hit>);
74  fAlg.Run(*wireHandle,*hitCollection,*geoHandle);
75 
77  hcol.use_hits(std::move(hitCollection));
78  hcol.put_into(e);
79 
80  //e.put(std::move(hitCollection));
81  }
82 
84  {
86  geo::Geometry const& geo(*geoHandle);
88  }
89 
90 }
91 
art::InputTag fWireModuleLabel
void Run(std::vector< recob::Wire > const &, std::vector< recob::Hit > &, geo::Geometry const &)
STL namespace.
void use_hits(std::unique_ptr< std::vector< recob::Hit >> &&srchits)
Uses the specified collection as data product.
Definition: HitCreator.cxx:306
static void declare_products(ModuleType &producer, std::string instance_name="", bool doWireAssns=true, bool doRawDigitAssns=true)
Declares the hit products we are going to fill.
Definition: HitCreator.h:1117
void SetFitterParamsVectors(geo::Geometry const &)
Helper functions to create a hit.
#define DEFINE_ART_MODULE(klass)
Definition: ModuleMacros.h:42
parameter set interface
A class handling a collection of hits and its associations.
Definition: HitCreator.h:703
The geometry of one entire detector, as served by art.
Definition: Geometry.h:110
RFFHitFinder(fhicl::ParameterSet const &p)
Detector simulation of raw signals on wires.
RFFHitFinder & operator=(RFFHitFinder const &)=delete
bool getByLabel(std::string const &label, std::string const &productInstanceName, Handle< PROD > &result) const
Definition: DataViewImpl.h:344
void produce(art::Event &e) override
void put_into(art::Event &)
Moves the data into the event.
Definition: HitCreator.h:824
Float_t e
Definition: plot.C:34
Namespace collecting geometry-related classes utilities.
RFFHitFinderAlg fAlg
void beginJob() override