CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_5/src/RecoEcal/EgammaCoreTools/plugins/EcalClusterEnergyUncertaintyBaseClass.cc

Go to the documentation of this file.
00001 #include "RecoEcal/EgammaCoreTools/plugins/EcalClusterEnergyUncertaintyBaseClass.h"
00002 
00003 #include "CondFormats/DataRecord/interface/EcalClusterEnergyUncertaintyParametersRcd.h"
00004 
00005 #include "FWCore/Framework/interface/EventSetup.h"
00006 #include "FWCore/Framework/interface/ESHandle.h"
00007 
00008 EcalClusterEnergyUncertaintyBaseClass::EcalClusterEnergyUncertaintyBaseClass()
00009 {}
00010 
00011 EcalClusterEnergyUncertaintyBaseClass::~EcalClusterEnergyUncertaintyBaseClass()
00012 {}
00013 
00014 void
00015 EcalClusterEnergyUncertaintyBaseClass::init( const edm::EventSetup& es )
00016 {
00017         es.get<EcalClusterEnergyUncertaintyParametersRcd>().get( esParams_ );
00018         params_ = esParams_.product();
00019 }
00020 
00021 void
00022 EcalClusterEnergyUncertaintyBaseClass::checkInit() const
00023 {
00024         if ( ! params_ ) {
00025                 // non-initialized function parameters: throw exception
00026                 throw cms::Exception("EcalClusterEnergyUncertaintyBaseClass::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 }