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

Public Member Functions

 OpHitFinderICARUS (fhicl::ParameterSet const &p)
 
 OpHitFinderICARUS (OpHitFinderICARUS const &)=delete
 
 OpHitFinderICARUS (OpHitFinderICARUS &&)=delete
 
OpHitFinderICARUSoperator= (OpHitFinderICARUS const &)=delete
 
OpHitFinderICARUSoperator= (OpHitFinderICARUS &&)=delete
 
void produce (art::Event &e) override
 

Private Attributes

size_t fEvNumber
 
std::string fInputModuleName
 
std::unique_ptr
< light::IOpHitFinder
fOpHitFinder
 

Detailed Description

Definition at line 68 of file OpHitFinderICARUS_module.cc.

Constructor & Destructor Documentation

ophit::OpHitFinderICARUS::OpHitFinderICARUS ( fhicl::ParameterSet const &  p)
explicit

Definition at line 93 of file OpHitFinderICARUS_module.cc.

93  : EDProducer{p}
94 {
95  produces<std::vector<recob::OpHit>>();
96 
97  fInputModuleName = p.get< std::string >("InputModule" );
98 
99  fOpHitFinder = art::make_tool<light::IOpHitFinder> (p.get<fhicl::ParameterSet>("OpHitFinder"));
100 }
pdgs p
Definition: selectors.fcl:22
std::unique_ptr< light::IOpHitFinder > fOpHitFinder
ophit::OpHitFinderICARUS::OpHitFinderICARUS ( OpHitFinderICARUS const &  )
delete
ophit::OpHitFinderICARUS::OpHitFinderICARUS ( OpHitFinderICARUS &&  )
delete

Member Function Documentation

OpHitFinderICARUS& ophit::OpHitFinderICARUS::operator= ( OpHitFinderICARUS const &  )
delete
OpHitFinderICARUS& ophit::OpHitFinderICARUS::operator= ( OpHitFinderICARUS &&  )
delete
void ophit::OpHitFinderICARUS::produce ( art::Event &  e)
override

Definition at line 102 of file OpHitFinderICARUS_module.cc.

103 {
104  std::cout << "My module on event #" << e.id().event() << std::endl;
105 
106  //art::ServiceHandle<art::TFileService> tfs;
107  fEvNumber = e.id().event();
108 
109  std::unique_ptr<std::vector<recob::OpHit>> pulseVecPtr(std::make_unique<std::vector<recob::OpHit>>());
110 
111  art::Handle< std::vector< raw::OpDetWaveform > > wfHandle;
112  e.getByLabel(fInputModuleName, wfHandle);
113 
114  if(!wfHandle.isValid())
115  {
116  std::cout <<Form("Did not find any G4 photons from a producer: %s", "largeant") << std::endl;
117  }
118 
119  std::cout << "Dimensione primo " << wfHandle->size() << std::endl;
120 
121 // for(size_t wftime; wftime< wfHandle.size(); wftime++)
122  for(auto const& wvf : (*wfHandle))
123  {
124  light::OpHitVec opHitVec;
125 
126  fOpHitFinder->FindOpHits(wvf, opHitVec);
127 
128  for(auto& opHit : opHitVec)
129  pulseVecPtr->emplace_back(opHit);
130  }
131  // Store results into the event
132  e.put(std::move(pulseVecPtr));
133 }
std::unique_ptr< light::IOpHitFinder > fOpHitFinder
do i e
std::vector< recob::OpHit > OpHitVec
Definition: IOpHitFinder.h:26
BEGIN_PROLOG could also be cout

Member Data Documentation

size_t ophit::OpHitFinderICARUS::fEvNumber
private

Definition at line 86 of file OpHitFinderICARUS_module.cc.

std::string ophit::OpHitFinderICARUS::fInputModuleName
private

Definition at line 88 of file OpHitFinderICARUS_module.cc.

std::unique_ptr<light::IOpHitFinder> ophit::OpHitFinderICARUS::fOpHitFinder
private

Definition at line 90 of file OpHitFinderICARUS_module.cc.


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