RFFHitFinder_module.cc
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 // 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.
8 ////////////////////////////////////////////////////////////////////////
9 
16 #include "fhiclcpp/ParameterSet.h"
17 
20 
21 #include <memory>
22 
23 #include "RFFHitFinderAlg.h"
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 
52 
54  :
55  EDProducer{p},
56  fWireModuleLabel(p.get<std::string>("WireModuleLabel")),
57  fAlg(p.get<fhicl::ParameterSet>("RFFHitFinderAlgParams"))
58  {
59  //calls the produces stuff for me!
61  }
62 
64  {
66 
68  e.getByLabel(fWireModuleLabel,wireHandle);
69 
70  std::unique_ptr< std::vector<recob::Hit> > hitCollection(new std::vector<recob::Hit>);
71  fAlg.Run(*wireHandle,*hitCollection,*geoHandle);
72 
74  hcol.use_hits(std::move(hitCollection));
75  hcol.put_into(e);
76 
77  //e.put(std::move(hitCollection));
78  }
79 
81  {
83  geo::Geometry const& geo(*geoHandle);
85  }
86 
87 }
88 
art::InputTag fWireModuleLabel
std::string string
Definition: nybbler.cc:12
void Run(std::vector< recob::Wire > const &, std::vector< recob::Hit > &, geo::Geometry const &)
EDProducer(fhicl::ParameterSet const &pset)
Definition: EDProducer.h:20
void use_hits(std::unique_ptr< std::vector< recob::Hit >> &&srchits)
Uses the specified collection as data product.
Definition: HitCreator.cxx:390
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
art framework interface to geometry description
void SetFitterParamsVectors(geo::Geometry const &)
Helper functions to create a hit.
bool getByLabel(std::string const &label, std::string const &instance, Handle< PROD > &result) const
Definition: DataViewImpl.h:633
const double e
#define DEFINE_ART_MODULE(klass)
Definition: ModuleMacros.h:67
def move(depos, offset)
Definition: depos.py:107
A class handling a collection of hits and its associations.
Definition: HitCreator.h:692
p
Definition: test.py:223
The geometry of one entire detector, as served by art.
Definition: Geometry.h:196
RFFHitFinder(fhicl::ParameterSet const &p)
Detector simulation of raw signals on wires.
ProducesCollector & producesCollector() noexcept
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:801
LArSoft geometry interface.
Definition: ChannelGeo.h:16
RFFHitFinderAlg fAlg
void beginJob() override