CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/RecoEcal/EgammaCoreTools/plugins/EcalClusterLocalContCorrectionBaseClass.cc

Go to the documentation of this file.
00001 #include "RecoEcal/EgammaCoreTools/plugins/EcalClusterLocalContCorrectionBaseClass.h"
00002 
00003 #include "CondFormats/DataRecord/interface/EcalClusterLocalContCorrParametersRcd.h"
00004 
00005 #include "FWCore/Framework/interface/EventSetup.h"
00006 #include "FWCore/Framework/interface/ESHandle.h"
00007 
00008 EcalClusterLocalContCorrectionBaseClass::EcalClusterLocalContCorrectionBaseClass()
00009 {}
00010 
00011 EcalClusterLocalContCorrectionBaseClass::~EcalClusterLocalContCorrectionBaseClass()
00012 {}
00013 
00014 void
00015 EcalClusterLocalContCorrectionBaseClass::init( const edm::EventSetup& es )
00016 {
00017         es.get<EcalClusterLocalContCorrParametersRcd>().get( esParams_ );
00018         params_ = esParams_.product();
00019         es_ = &es; //needed to access the ECAL geometry
00020 }
00021 
00022 void
00023 EcalClusterLocalContCorrectionBaseClass::checkInit() const
00024 {
00025         if ( ! params_ ) {
00026                 // non-initialized function parameters: throw exception
00027                 throw cms::Exception("EcalClusterLocalContCorrectionBaseClass::checkInit()") 
00028                         << "Trying to access an uninitialized crack correction function.\n"
00029                         "Please call `init( edm::EventSetup &)' before any use of the function.\n";
00030         }
00031 }