CMS 3D CMS Logo

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

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