Public Member Functions | Private Member Functions | Private Attributes | List of all members
hit::HitFinder Class Reference
Inheritance diagram for hit::HitFinder:
art::EDProducer art::detail::Producer art::detail::LegacyModule art::Modifier art::ModuleBase art::ProductRegistryHelper

Public Member Functions

 HitFinder (fhicl::ParameterSet const &pset)
 
- Public Member Functions inherited from art::EDProducer
 EDProducer (fhicl::ParameterSet const &pset)
 
template<typename Config >
 EDProducer (Table< Config > const &config)
 
std::string workerType () const
 
- Public Member Functions inherited from art::detail::Producer
virtual ~Producer () noexcept
 
 Producer (fhicl::ParameterSet const &)
 
 Producer (Producer const &)=delete
 
 Producer (Producer &&)=delete
 
Produceroperator= (Producer const &)=delete
 
Produceroperator= (Producer &&)=delete
 
void doBeginJob (SharedResources const &resources)
 
void doEndJob ()
 
void doRespondToOpenInputFile (FileBlock const &fb)
 
void doRespondToCloseInputFile (FileBlock const &fb)
 
void doRespondToOpenOutputFiles (FileBlock const &fb)
 
void doRespondToCloseOutputFiles (FileBlock const &fb)
 
bool doBeginRun (RunPrincipal &rp, ModuleContext const &mc)
 
bool doEndRun (RunPrincipal &rp, ModuleContext const &mc)
 
bool doBeginSubRun (SubRunPrincipal &srp, ModuleContext const &mc)
 
bool doEndSubRun (SubRunPrincipal &srp, ModuleContext const &mc)
 
bool doEvent (EventPrincipal &ep, ModuleContext const &mc, std::atomic< std::size_t > &counts_run, std::atomic< std::size_t > &counts_passed, std::atomic< std::size_t > &counts_failed)
 
- Public Member Functions inherited from art::Modifier
 ~Modifier () noexcept
 
 Modifier ()
 
 Modifier (Modifier const &)=delete
 
 Modifier (Modifier &&)=delete
 
Modifieroperator= (Modifier const &)=delete
 
Modifieroperator= (Modifier &&)=delete
 
- Public Member Functions inherited from art::ModuleBase
virtual ~ModuleBase () noexcept
 
 ModuleBase ()
 
ModuleDescription const & moduleDescription () const
 
void setModuleDescription (ModuleDescription const &)
 
std::array< std::vector< ProductInfo >, NumBranchTypes > const & getConsumables () const
 
void sortConsumables (std::string const &current_process_name)
 
template<typename T , BranchType BT>
ViewToken< T > consumesView (InputTag const &tag)
 
template<typename T , BranchType BT>
ViewToken< T > mayConsumeView (InputTag const &tag)
 

Private Member Functions

void produce (art::Event &evt) override
 
void endJob () override
 

Private Attributes

art::InputTag fCalDataModuleLabel
 label of module producing input wires More...
 
CCHitFinderAlg fCCHFAlg
 

Additional Inherited Members

- Public Types inherited from art::EDProducer
using ModuleType = EDProducer
 
using WorkerType = WorkerT< EDProducer >
 
- Public Types inherited from art::detail::Producer
template<typename UserConfig , typename KeysToIgnore = void>
using Table = Modifier::Table< UserConfig, KeysToIgnore >
 
- Public Types inherited from art::Modifier
template<typename UserConfig , typename UserKeysToIgnore = void>
using Table = ProducerTable< UserConfig, detail::ModuleConfig, UserKeysToIgnore >
 
- Static Public Member Functions inherited from art::EDProducer
static void commitEvent (EventPrincipal &ep, Event &e)
 
- Protected Member Functions inherited from art::ModuleBase
ConsumesCollectorconsumesCollector ()
 
template<typename T , BranchType = InEvent>
ProductToken< T > consumes (InputTag const &)
 
template<typename Element , BranchType = InEvent>
ViewToken< Element > consumesView (InputTag const &)
 
template<typename T , BranchType = InEvent>
void consumesMany ()
 
template<typename T , BranchType = InEvent>
ProductToken< T > mayConsume (InputTag const &)
 
template<typename Element , BranchType = InEvent>
ViewToken< Element > mayConsumeView (InputTag const &)
 
template<typename T , BranchType = InEvent>
void mayConsumeMany ()
 

Detailed Description

Definition at line 30 of file HitFinder_module.cc.

Constructor & Destructor Documentation

hit::HitFinder::HitFinder ( fhicl::ParameterSet const &  pset)
explicit

Definition at line 67 of file HitFinder_module.cc.

68  : EDProducer{pset}
69  , fCCHFAlg{pset.get<fhicl::ParameterSet>("CCHitFinderAlg")}
70  {
71  fCalDataModuleLabel = pset.get<art::InputTag>("CalDataModuleLabel");
72 
73  // let HitCollectionAssociator declare that we are going to produce
74  // hits and associations with wires and raw digits
75  // (with no particular product label);
76  // TODO this should be marked as transient when art will implement issue #8018
78 
79  } // HitFinder::HitFinder()
art::InputTag fCalDataModuleLabel
label of module producing input wires
EDProducer(fhicl::ParameterSet const &pset)
Definition: EDProducer.h:20
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
ProducesCollector & producesCollector() noexcept
CCHitFinderAlg fCCHFAlg

Member Function Documentation

void hit::HitFinder::endJob ( )
overrideprivatevirtual

Reimplemented from art::EDProducer.

Definition at line 114 of file HitFinder_module.cc.

114  {
115  // print the statistics about fits
116  mf::LogInfo log("HitFinder"); // messages are printed on "log" destruction
117  fCCHFAlg.PrintStats(log);
118  } // HitFinder::endJob()
void PrintStats(Stream &out) const
Print the fit statistics.
CCHitFinderAlg fCCHFAlg
void hit::HitFinder::produce ( art::Event evt)
overrideprivatevirtual

Implements art::EDProducer.

Definition at line 83 of file HitFinder_module.cc.

84  {
85  // fetch the wires needed by HitFinder
86 
87  // make this accessible to ClusterCrawler_module
89  = evt.getValidHandle<std::vector<recob::Wire>>(fCalDataModuleLabel);
90 
91  // find hits in all planes
92  fCCHFAlg.RunCCHitFinder(*wireVecHandle);
93 
94  // extract the result of the algorithm (it's moved)
95  std::unique_ptr<std::vector<recob::Hit>> Hits
96  (new std::vector<recob::Hit>(std::move(fCCHFAlg.YieldHits())));
97 
98  mf::LogInfo("HitFinder") << Hits->size() << " hits produced.";
99 
100  // shcol contains the hit collection
101  // and its associations to wires and raw digits;
102  // we get the association to raw digits through wire associations
104 
105  shcol.use_hits(std::move(Hits));
106 
107  // move the hit collection and the associations into the event:
108  shcol.put_into(evt);
109 
110  } // produce()
void RunCCHitFinder(std::vector< recob::Wire > const &Wires)
art::InputTag fCalDataModuleLabel
label of module producing input wires
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo
def move(depos, offset)
Definition: depos.py:107
A class handling a collection of hits and its associations.
Definition: HitCreator.h:692
ValidHandle< PROD > getValidHandle(InputTag const &tag) const
Definition: DataViewImpl.h:441
size_type size() const
Definition: PtrVector.h:302
art::PtrVector< recob::Hit > Hits
CCHitFinderAlg fCCHFAlg
std::vector< recob::Hit > && YieldHits()
Returns (and loses) the collection of reconstructed hits.

Member Data Documentation

art::InputTag hit::HitFinder::fCalDataModuleLabel
private

label of module producing input wires

Definition at line 40 of file HitFinder_module.cc.

CCHitFinderAlg hit::HitFinder::fCCHFAlg
private

Definition at line 41 of file HitFinder_module.cc.


The documentation for this class was generated from the following file: