All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
sbn::TrackHitDumper Class Reference
Inheritance diagram for sbn::TrackHitDumper:

Public Member Functions

 TrackHitDumper (fhicl::ParameterSet const &p)
 
 TrackHitDumper (TrackHitDumper const &)=delete
 
 TrackHitDumper (TrackHitDumper &&)=delete
 
TrackHitDumperoperator= (TrackHitDumper const &)=delete
 
TrackHitDumperoperator= (TrackHitDumper &&)=delete
 
void analyze (art::Event const &e) override
 

Private Attributes

std::vector< std::string > fHitLabels
 

Detailed Description

Definition at line 38 of file TrackHitDumper_module.cc.

Constructor & Destructor Documentation

sbn::TrackHitDumper::TrackHitDumper ( fhicl::ParameterSet const &  p)
explicit

Definition at line 59 of file TrackHitDumper_module.cc.

60  : art::EDAnalyzer{p}
61 {
62  fHitLabels = p.get<std::vector<std::string>>("HitLabels");
63  std::cout << "SBN Track Hit Dumper!\n";
64  for (const std::string &label: fHitLabels) {
65  std::cout << "Processing hits with label: " << label << std::endl;
66  }
67 
68 }
pdgs p
Definition: selectors.fcl:22
std::vector< std::string > fHitLabels
BEGIN_PROLOG could also be cout
sbn::TrackHitDumper::TrackHitDumper ( TrackHitDumper const &  )
delete
sbn::TrackHitDumper::TrackHitDumper ( TrackHitDumper &&  )
delete

Member Function Documentation

void sbn::TrackHitDumper::analyze ( art::Event const &  e)
override

Definition at line 70 of file TrackHitDumper_module.cc.

71 {
72 
73  std::cout << "New Event!\n";
74 
75  // iterate over the hit tags
76  for (const std::string &label: fHitLabels) {
77  std::cout << "Processing hits with label: " << label << std::endl;
78 
79  art::Handle<std::vector<recob::Hit>> hit_handle;
80  e.getByLabel(label, hit_handle);
81 
82  std::vector<art::Ptr<recob::Hit>> hits;
83  art::fill_ptr_vector(hits, hit_handle);
84 
85  for (art::Ptr<recob::Hit> hit: hits) {
86  std::cout << "Hit on wire: " << hit->WireID() << " channel: " << hit->Channel() << " view: " << hit->View() << std::endl;
87  std::cout << "Hit amp: " << hit->PeakAmplitude() << " RMS: " << hit->RMS() << " width: " << hit->SigmaPeakAmplitude();
88  std::cout << " from: " << hit->StartTick() << " to: " << hit->EndTick() << " center: " << hit->PeakTime() << std::endl;
89  std::cout << "area: " << hit->Integral() << " sim ADC: " << hit->SummedADC() << std::endl;
90  }
91  }
92 
93 }
std::vector< std::string > fHitLabels
process_name hit
Definition: cheaterreco.fcl:51
do i e
BEGIN_PROLOG could also be cout
TrackHitDumper& sbn::TrackHitDumper::operator= ( TrackHitDumper const &  )
delete
TrackHitDumper& sbn::TrackHitDumper::operator= ( TrackHitDumper &&  )
delete

Member Data Documentation

std::vector<std::string> sbn::TrackHitDumper::fHitLabels
private

Definition at line 56 of file TrackHitDumper_module.cc.


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