CMS 3D CMS Logo

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().

                                                              {
    edm::Handle<Collection> recHits;
    e.getByType(recHits);
    if (!recHits.isValid()) {
      edm::LogError("CastorHitAnalyzer") << "Could not find Castor RecHitContainer ";
    } else {
      for(unsigned i = 0 ; i < recHits->size(); ++i) {
        analyzer.analyze((*recHits)[i].id().rawId(), (*recHits)[i].energy());
      }
    }
  }