10 #include "art/Framework/Core/EDAnalyzer.h"
11 #include "art/Framework/Core/ModuleMacros.h"
12 #include "art/Framework/Principal/Event.h"
13 #include "art/Framework/Principal/Handle.h"
14 #include "art/Framework/Services/Registry/ServiceHandle.h"
15 #include "fhiclcpp/ParameterSet.h"
17 #include "art_root_io/TFileService.h"
24 class OpFlashSimpleAna;
39 void analyze(art::Event
const &
e)
override;
67 if(fOpFlashModuleLabel.size()>0){
68 art::Handle< std::vector< recob::OpFlash > > flashHandle;
69 e.getByLabel(fOpFlashModuleLabel, flashHandle);
70 std::vector<recob::OpFlash>
const& flashVector(*flashHandle);
71 fAnaAlg.FillOpFlashes(flashVector);
73 if(fOpHitModuleLabel.size()>0){
74 art::Handle< std::vector< recob::OpHit > > hitHandle;
75 e.getByLabel(fOpHitModuleLabel, hitHandle);
76 std::vector<recob::OpHit>
const& hitVector(*hitHandle);
77 fAnaAlg.FillOpHits(hitVector);
83 art::ServiceHandle<art::TFileService const>
tfs;
84 if(fOpFlashModuleLabel.size()>0)
85 fAnaAlg.SetOpFlashTree(tfs->make<TTree>(
"OpFlashTree",
"OpFlashSimpleAna: Flash Tree"),
87 if(fOpHitModuleLabel.size()>0)
88 fAnaAlg.SetOpHitTree(tfs->make<TTree>(
"OpHitTree",
"OpFlashSimpleAna: Hit Tree"));
std::string fOpHitModuleLabel
OpFlashSimpleAna & operator=(OpFlashSimpleAna const &)=delete
std::string fOpFlashModuleLabel
void analyze(art::Event const &e) override
art::ServiceHandle< art::TFileService > tfs
OpFlashSimpleAna(fhicl::ParameterSet const &p)