CMS 3D CMS Logo

Functions

CastorDigiAnalyzerImpl Namespace Reference

Functions

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

Function Documentation

template<class Collection >
void CastorDigiAnalyzerImpl::analyze ( edm::Event const &  e,
CastorDigiStatistics statistics,
edm::InputTag tag 
)

Definition at line 19 of file CastorDigiAnalyzer.cc.

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

                                                                                       {
    edm::Handle<Collection> digis;
    e.getByLabel(tag, digis);
    if (!digis.isValid()) {
      edm::LogError("CastorDigiAnalyzer") << "Could not find Castor Digi Container ";
    } else {
      for(unsigned i = 0; i < digis->size(); ++i) {
        statistics.analyze((*digis)[i]);
      }
    }
  }