CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/FWCore/Framework/src/NoDelayedReader.cc

Go to the documentation of this file.
00001 /*----------------------------------------------------------------------
00002 ----------------------------------------------------------------------*/
00003 
00004 #include "FWCore/Framework/interface/NoDelayedReader.h"
00005 #include "DataFormats/Provenance/interface/BranchKey.h"
00006 #include "FWCore/Framework/interface/EventPrincipal.h"
00007 #include "FWCore/Framework/interface/RunPrincipal.h"
00008 #include "FWCore/Framework/interface/LuminosityBlockPrincipal.h"
00009 #include "FWCore/Utilities/interface/EDMException.h"
00010 
00011 namespace edm {
00012   NoDelayedReader::~NoDelayedReader() {}
00013 
00014   std::auto_ptr<EDProduct>
00015   NoDelayedReader::getProduct_(BranchKey const& k, EDProductGetter const* ep) const {
00016     EventPrincipal const* epr = dynamic_cast<EventPrincipal const*>(ep);
00017     if (epr) {
00018       throw edm::Exception(errors::LogicError,"NoDelayedReader")
00019         << "getProduct() called for branchkey: " << k << " EventID: " << epr->id() << "\n";
00020     }
00021     RunPrincipal const* rpr = dynamic_cast<RunPrincipal const*>(ep);
00022     if (rpr) {
00023       throw edm::Exception(errors::LogicError,"NoDelayedReader")
00024         << "getProduct() called for branchkey: " << k << " RunID: " << epr->id() << "\n";
00025     }
00026     LuminosityBlockPrincipal const* lpr = dynamic_cast<LuminosityBlockPrincipal const*>(ep);
00027     if (lpr) {
00028       throw edm::Exception(errors::LogicError,"NoDelayedReader")
00029         << "getProduct() called for branchkey: " << k << " LuminosityBlockNumber_t: " << lpr->id() << "\n";
00030     }
00031     throw edm::Exception(errors::LogicError,"NoDelayedReader")
00032       << "getProduct() called for branchkey: " << k << "\n";
00033   }
00034 }