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 19 of file CastorHitAnalyzer.cc.

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

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