CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_9_patch3/src/L1TriggerConfig/CSCTFConfigProducers/src/L1MuCSCPtLutConfigOnlineProd.cc

Go to the documentation of this file.
00001 #include "L1TriggerConfig/CSCTFConfigProducers/interface/L1MuCSCPtLutConfigOnlineProd.h"
00002 
00003 boost::shared_ptr< L1MuCSCPtLut >
00004 L1MuCSCPtLutConfigOnlineProd::newObject( const std::string& objectKey )
00005 {
00006 
00007   edm::LogInfo( "L1-O2O: L1MuCSCPtLutConfigOnlineProd" ) << "Producing "
00008                                                          << "L1MuCSCPtLut "
00009                                                          << "with key PTLUT_VERSION="
00010                                                          << objectKey;
00011   
00012   // read the Pt_LUT: it is CLOB with 2^21 different values 
00013   //SELECT PT_LUT FROM CMS_CSC_TF.CSCTF_PTLUS WHERE CSCTF_PTLUS.PTLUT_VERSION = objectKey
00014   l1t::OMDSReader::QueryResults results = m_omdsReader.basicQuery(
00015                                                                   "PT_LUT",
00016                                                                   "CMS_CSC_TF",
00017                                                                   "CSCTF_PTLUTS",
00018                                                                   "CSCTF_PTLUTS.PTLUT_VERSION",
00019                                                                   m_omdsReader.singleAttribute(objectKey)
00020                                                                   ) ;
00021   
00022   // check if query was successful
00023   if( results.queryFailed() ) 
00024     {
00025       edm::LogError( "L1-O2O" ) << "Problem with L1MuCSCPtLutParameters key" ;
00026       // return empty object
00027       return boost::shared_ptr< L1MuCSCPtLut >() ;
00028     }
00029   
00030   
00031   std::string ptlut;
00032   results.fillVariable( ptlut ) ;
00033   
00034   // if uncommented it will generate a huge output...
00035   //edm::LogInfo( "L1-O2O: L1MuCSCPtLutConfigOnlineProd" ) << "PtLUT is "
00036   //                                                       << "ptlut";
00037   
00038   edm::LogInfo( "L1-O2O: L1MuCSCPtLutConfigOnlineProd" ) << "Returning L1MuCSCPtLut";
00039 
00040   L1MuCSCPtLut* CSCTFPtLut = new L1MuCSCPtLut();
00041   CSCTFPtLut->readFromDBS(ptlut);
00042 
00043   return boost::shared_ptr< L1MuCSCPtLut >( CSCTFPtLut ) ;
00044 }
00045 
00046 DEFINE_FWK_EVENTSETUP_MODULE(L1MuCSCPtLutConfigOnlineProd);