CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions
CastorHitAnalyzerImpl Namespace Reference

Functions

template<class Collection >
void analyze (edm::Event const &e, CaloHitAnalyzer &analyzer)
 

Function Documentation

template<class Collection >
void CastorHitAnalyzerImpl::analyze ( edm::Event const &  e,
CaloHitAnalyzer analyzer 
)

Definition at line 18 of file CastorHitAnalyzer.cc.

References CaloHitAnalyzer::analyze(), relval_parameters_module::energy, edm::Event::getByType(), i, and edm::HandleBase::isValid().

18  {
20  e.getByType(recHits);
21  if (!recHits.isValid()) {
22  edm::LogError("CastorHitAnalyzer") << "Could not find Castor RecHitContainer ";
23  } else {
24  for(unsigned i = 0 ; i < recHits->size(); ++i) {
25  analyzer.analyze((*recHits)[i].id().rawId(), (*recHits)[i].energy());
26  }
27  }
28  }
int i
Definition: DBlmapReader.cc:9
void analyze(int detId, double recEnergy)
to be called for each RecHit
bool isValid() const
Definition: HandleBase.h:76