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

Public Member Functions

 OpFlashSimpleAna (fhicl::ParameterSet const &p)
 
 OpFlashSimpleAna (OpFlashSimpleAna const &)=delete
 
 OpFlashSimpleAna (OpFlashSimpleAna &&)=delete
 
OpFlashSimpleAnaoperator= (OpFlashSimpleAna const &)=delete
 
OpFlashSimpleAnaoperator= (OpFlashSimpleAna &&)=delete
 
void analyze (art::Event const &e) override
 
void beginJob () override
 

Private Attributes

std::string fOpFlashModuleLabel
 
std::string fOpHitModuleLabel
 
bool fMakeOpDetPEHist
 
OpFlashAnaAlg fAnaAlg
 

Detailed Description

Definition at line 27 of file OpFlashSimpleAna_module.cc.

Constructor & Destructor Documentation

opdet::OpFlashSimpleAna::OpFlashSimpleAna ( fhicl::ParameterSet const &  p)
explicit

Definition at line 55 of file OpFlashSimpleAna_module.cc.

56  :
57  EDAnalyzer(p) // ,
58  // More initializers here.
59 {
60  fOpFlashModuleLabel = p.get<std::string>("OpFlashModuleLabel","");
61  fOpHitModuleLabel = p.get<std::string>("OpFlashModuleLabel","");
62  fMakeOpDetPEHist = p.get<bool>("MakeOpDetPEHist",true);
63 }
pdgs p
Definition: selectors.fcl:22
opdet::OpFlashSimpleAna::OpFlashSimpleAna ( OpFlashSimpleAna const &  )
delete
opdet::OpFlashSimpleAna::OpFlashSimpleAna ( OpFlashSimpleAna &&  )
delete

Member Function Documentation

void opdet::OpFlashSimpleAna::analyze ( art::Event const &  e)
override

Definition at line 65 of file OpFlashSimpleAna_module.cc.

66 {
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);
72  }
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);
78  }
79 }
void FillOpFlashes(const std::vector< recob::OpFlash > &)
void FillOpHits(const std::vector< recob::OpHit > &)
do i e
void opdet::OpFlashSimpleAna::beginJob ( )
override

Definition at line 81 of file OpFlashSimpleAna_module.cc.

82 {
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"));
89 }
void SetOpFlashTree(TTree *, bool makeOpDetPEHist=true)
void SetOpHitTree(TTree *)
art::ServiceHandle< art::TFileService > tfs
OpFlashSimpleAna& opdet::OpFlashSimpleAna::operator= ( OpFlashSimpleAna const &  )
delete
OpFlashSimpleAna& opdet::OpFlashSimpleAna::operator= ( OpFlashSimpleAna &&  )
delete

Member Data Documentation

OpFlashAnaAlg opdet::OpFlashSimpleAna::fAnaAlg
private

Definition at line 50 of file OpFlashSimpleAna_module.cc.

bool opdet::OpFlashSimpleAna::fMakeOpDetPEHist
private

Definition at line 48 of file OpFlashSimpleAna_module.cc.

std::string opdet::OpFlashSimpleAna::fOpFlashModuleLabel
private

Definition at line 46 of file OpFlashSimpleAna_module.cc.

std::string opdet::OpFlashSimpleAna::fOpHitModuleLabel
private

Definition at line 47 of file OpFlashSimpleAna_module.cc.


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