CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 42 of file CastorHitAnalyzer.cc.

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

42  {
44  e.getByLabel(tag, recHits);
45  if (!recHits.isValid()) {
46  edm::LogError("CastorHitAnalyzer") << "Could not find Castor RecHitContainer ";
47  } else {
48  for (unsigned i = 0; i < recHits->size(); ++i) {
49  analyzer.analyze((*recHits)[i].id().rawId(), (*recHits)[i].energy());
50  }
51  }
52  }
void analyze(int detId, double recEnergy)
to be called for each RecHit
Log< level::Error, false > LogError
bool isValid() const
Definition: HandleBase.h:70