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

Public Member Functions

 PrintCalorimetry (fhicl::ParameterSet const &p)
 
 PrintCalorimetry (PrintCalorimetry const &)=delete
 
 PrintCalorimetry (PrintCalorimetry &&)=delete
 
PrintCalorimetryoperator= (PrintCalorimetry const &)=delete
 
PrintCalorimetryoperator= (PrintCalorimetry &&)=delete
 

Private Member Functions

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

Private Attributes

std::string fTrackModuleLabel
 
std::vector< std::string > fCaloModuleLabels
 

Detailed Description

Definition at line 24 of file PrintCalorimetry_module.cc.

Constructor & Destructor Documentation

calo::PrintCalorimetry::PrintCalorimetry ( fhicl::ParameterSet const &  p)
explicit

Definition at line 47 of file PrintCalorimetry_module.cc.

48  :
49  EDAnalyzer(p),
50  fTrackModuleLabel(p.get<std::string>("TrackModuleLabel")),
51  fCaloModuleLabels(p.get< std::vector<std::string> >("CaloModuleLabels"))
52 {}
pdgs p
Definition: selectors.fcl:22
std::vector< std::string > fCaloModuleLabels
calo::PrintCalorimetry::PrintCalorimetry ( PrintCalorimetry const &  )
delete
calo::PrintCalorimetry::PrintCalorimetry ( PrintCalorimetry &&  )
delete

Member Function Documentation

void calo::PrintCalorimetry::analyze ( art::Event const &  e)
overrideprivate

Definition at line 54 of file PrintCalorimetry_module.cc.

55 {
56  art::Handle< std::vector<recob::Track> > trackHandle;
57  e.getByLabel(fTrackModuleLabel,trackHandle);
58 
59  std::vector< art::FindManyP<anab::Calorimetry> > caloAssnVector;//(fCaloModuleLabels.size());
60 
61  for(size_t i_cm=0; i_cm<fCaloModuleLabels.size(); i_cm++)
62  caloAssnVector.emplace_back(trackHandle,e,fCaloModuleLabels[i_cm]);
63 
64  for(size_t i_trk=0; i_trk<trackHandle->size(); i_trk++){
65  std::cout << "(Run,Event,Track) = (" << e.run() << "," << e.event() << "," << i_trk << ")" << std::endl;
66  std::cout << "-------------------" << std::endl;
67 
68  for(size_t i_cm=0; i_cm<caloAssnVector.size(); i_cm++){
69  std::cout << "Calorimetry module " << i_cm << std::endl;
70  for(auto const& caloptr : caloAssnVector[i_cm].at(i_trk))
71  std::cout << *caloptr << std::endl;
72  }
73 
74  }
75 
76 }
std::vector< std::string > fCaloModuleLabels
do i e
BEGIN_PROLOG could also be cout
PrintCalorimetry& calo::PrintCalorimetry::operator= ( PrintCalorimetry const &  )
delete
PrintCalorimetry& calo::PrintCalorimetry::operator= ( PrintCalorimetry &&  )
delete

Member Data Documentation

std::vector<std::string> calo::PrintCalorimetry::fCaloModuleLabels
private

Definition at line 42 of file PrintCalorimetry_module.cc.

std::string calo::PrintCalorimetry::fTrackModuleLabel
private

Definition at line 41 of file PrintCalorimetry_module.cc.


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