CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_5/src/CalibMuon/CSCCalibration/plugins/CSCIndexerESProducer.cc

Go to the documentation of this file.
00001 #include "FWCore/Framework/interface/ModuleFactory.h"
00002 
00003 #include "CalibMuon/CSCCalibration/interface/CSCIndexerESProducer.h"
00004 #include "CalibMuon/CSCCalibration/interface/CSCIndexerFactory.h"
00005 
00006 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00007 
00008 CSCIndexerESProducer::CSCIndexerESProducer(const edm::ParameterSet& pset)
00009 {
00010   algoName = pset.getParameter<std::string>("AlgoName");
00011 
00012   LogTrace("CSCIndexerESProducer") << " will produce: " << algoName;
00013 
00014   setWhatProduced(this);
00015 
00016 }
00017 
00018 CSCIndexerESProducer::~CSCIndexerESProducer(){
00019 }
00020 
00021 CSCIndexerESProducer::BSP_TYPE CSCIndexerESProducer::produce(const CSCIndexerRecord& )
00022 {
00023   LogTrace("CSCIndexerESProducer") << " producing: " << algoName;
00024 
00025   CSCIndexerESProducer::BSP_TYPE theIndexer(CSCIndexerFactory::get()->create(algoName));
00026 
00027   return theIndexer ;
00028 }
00029 
00030 // define this as a plug-in
00031 DEFINE_FWK_EVENTSETUP_MODULE(CSCIndexerESProducer);