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

Public Member Functions

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

Private Attributes

trk::TrackContainmentAlg fAlg
 
std::vector< std::string > fTrackModuleLabels
 

Detailed Description

Definition at line 27 of file TrackContainmentAnalyzer_module.cc.

Constructor & Destructor Documentation

trk::TrackContainmentAnalyzer::TrackContainmentAnalyzer ( fhicl::ParameterSet const &  p)
explicit

Definition at line 52 of file TrackContainmentAnalyzer_module.cc.

53  :
54  EDAnalyzer(p) // ,
55  // More initializers here.
56 {
57  fAlg.Configure(p.get<fhicl::ParameterSet>("TrackContainmentAlg"));
58  fTrackModuleLabels = p.get< std::vector<std::string> >("TrackModuleLabels");
60  art::ServiceHandle<art::TFileService const> tfs;
61  fAlg.SetupOutputTree(tfs->make<TTree>("myanatree","MyAnalysis Tree"));
62 }
void setFillOutputTree(bool flag=true)
pdgs p
Definition: selectors.fcl:22
void Configure(fhicl::ParameterSet const &)
art::ServiceHandle< art::TFileService > tfs
trk::TrackContainmentAnalyzer::TrackContainmentAnalyzer ( TrackContainmentAnalyzer const &  )
delete
trk::TrackContainmentAnalyzer::TrackContainmentAnalyzer ( TrackContainmentAnalyzer &&  )
delete

Member Function Documentation

void trk::TrackContainmentAnalyzer::analyze ( art::Event const &  e)
override

Definition at line 64 of file TrackContainmentAnalyzer_module.cc.

65 {
66 
67  fAlg.SetRunEvent(e.run(),e.event());
68 
69  std::vector< std::vector<recob::Track> > trackVectors;
70  for(size_t i_l=0; i_l<fTrackModuleLabels.size(); ++i_l){
71  art::Handle< std::vector<recob::Track> > trackHandle;
72  e.getByLabel(fTrackModuleLabels[i_l],trackHandle);
73  trackVectors.push_back(*trackHandle);
74  }
75 
76  art::ServiceHandle<geo::Geometry const> geoHandle;
77 
78  fAlg.ProcessTracks(trackVectors,*geoHandle);
79 
80 }
void ProcessTracks(std::vector< std::vector< recob::Track > > const &, geo::GeometryCore const &)
void SetRunEvent(unsigned int const &, unsigned int const &)
do i e
TrackContainmentAnalyzer& trk::TrackContainmentAnalyzer::operator= ( TrackContainmentAnalyzer const &  )
delete
TrackContainmentAnalyzer& trk::TrackContainmentAnalyzer::operator= ( TrackContainmentAnalyzer &&  )
delete

Member Data Documentation

trk::TrackContainmentAlg trk::TrackContainmentAnalyzer::fAlg
private

Definition at line 45 of file TrackContainmentAnalyzer_module.cc.

std::vector<std::string> trk::TrackContainmentAnalyzer::fTrackModuleLabels
private

Definition at line 47 of file TrackContainmentAnalyzer_module.cc.


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