CMS 3D CMS Logo

Functions
CastorHitAnalyzerImpl Namespace Reference

Functions

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

Function Documentation

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

Definition at line 15 of file CastorHitAnalyzer.cc.

References CaloHitAnalyzer::analyze(), edm::Event::getByLabel(), mps_fire::i, and edm::HandleBase::isValid().

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