MichelTiming_module.cc
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 // Class: MichelTiming
3 // Plugin Type: analyzer (art v3_05_01)
4 // File: MichelTiming_module.cc
5 //
6 // Generated at Mon Jun 22 22:21:41 2020 by Tingjun Yang using cetskelgen
7 // from cetlib version v3_10_00.
8 ////////////////////////////////////////////////////////////////////////
9 
18 #include "fhiclcpp/ParameterSet.h"
20 
21 namespace pdsp {
22  class MichelTiming;
23 }
24 
25 
27 public:
28  explicit MichelTiming(fhicl::ParameterSet const& p);
29  // The compiler-generated destructor is fine for non-base
30  // classes without bare pointers or other resource use.
31 
32  // Plugins should not be copied or assigned.
33  MichelTiming(MichelTiming const&) = delete;
34  MichelTiming(MichelTiming&&) = delete;
35  MichelTiming& operator=(MichelTiming const&) = delete;
36  MichelTiming& operator=(MichelTiming&&) = delete;
37 
38  // Required functions.
39  void analyze(art::Event const& e) override;
40 
41  // Selected optional functions.
42  void beginJob() override;
43 
44 private:
45 
47 
48 };
49 
50 
52  : EDAnalyzer{p},
53  fFlashModuleLabel(p.get< art::InputTag >("FlashModuleLabel"))
54 {
55 }
56 
58 {
59  std::vector < art::Ptr < recob::OpFlash > > flashList;
60  auto flashListHandle = e.getHandle < std::vector < recob::OpFlash > >(fFlashModuleLabel);
61  if (flashListHandle) {
62  art::fill_ptr_vector(flashList, flashListHandle);
63  }
64  else return;
65 
66  for (const auto & flash : flashList){
67  std::cout<<flash.key()<<" "<<flash->Time()<<" "<<flash->TotalPE()<<std::endl;
68  }
69 
70 
71 }
72 
74 {
75  // Implementation of optional member function here.
76 }
77 
void analyze(art::Event const &e) override
Handle< PROD > getHandle(SelectorBase const &) const
Definition: DataViewImpl.h:382
MichelTiming & operator=(MichelTiming const &)=delete
EDAnalyzer(fhicl::ParameterSet const &pset)
Definition: EDAnalyzer.h:25
MichelTiming(fhicl::ParameterSet const &p)
art::InputTag fFlashModuleLabel
const double e
#define DEFINE_ART_MODULE(klass)
Definition: ModuleMacros.h:67
void beginJob() override
p
Definition: test.py:223
void fill_ptr_vector(std::vector< Ptr< T >> &ptrs, H const &h)
Definition: Ptr.h:297
QTextStream & endl(QTextStream &s)