CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EcalClusterCrackCorrectionBaseClass.cc
Go to the documentation of this file.
2 
4 
7 
9  params_(0)
10 {}
11 
13 {}
14 
15 void
17 {
19  params_ = esParams_.product();
20  es_ = &es; //needed to access the ECAL geometry
21 
23  //EcalClusterCrackCorrParameters::const_iterator it;
24  //std::cout << "[[EcalClusterCrackCorrectionBaseClass::init]] "
25  // << params_->size() << " parameters:";
26  //for ( it = params_->begin(); it != params_->end(); ++it ) {
27  // std::cout << " " << *it;
28  //}
29  //std::cout << "\n";
30 }
31 
32 void
34 {
35  if ( ! params_ ) {
36  // non initialized function parameters: throw exception
37  throw cms::Exception("EcalClusterCrackCorrectionBaseClass::checkInit()")
38  << "Trying to access an uninitialized crack correction function.\n"
39  "Please call `init( edm::EventSetup &)' before any use of the function.\n";
40  }
41 }
edm::ESHandle< EcalClusterCrackCorrParameters > esParams_
const EcalClusterCrackCorrParameters * params_
const T & get() const
Definition: EventSetup.h:56
virtual void init(const edm::EventSetup &es)