CMS 3D CMS Logo

Functions

CastorDigiAnalyzerImpl Namespace Reference

Functions

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

Function Documentation

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

Definition at line 18 of file CastorDigiAnalyzer.cc.

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

                                                                     {
    edm::Handle<Collection> digis;
    e.getByType(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]);
      }
    }
  }