Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 11:14:09

0001 #include "L1TriggerConfig/CSCTFConfigProducers/interface/L1MuCSCPtLutConfigOnlineProd.h"
0002 
0003 std::unique_ptr<L1MuCSCPtLut> L1MuCSCPtLutConfigOnlineProd::newObject(const std::string& objectKey) {
0004   edm::LogInfo("L1-O2O: L1MuCSCPtLutConfigOnlineProd") << "Producing "
0005                                                        << "L1MuCSCPtLut "
0006                                                        << "with key PTLUT_VERSION=" << objectKey;
0007 
0008   // read the Pt_LUT: it is CLOB with 2^21 different values
0009   //SELECT PT_LUT FROM CMS_CSC_TF.CSCTF_PTLUS WHERE CSCTF_PTLUS.PTLUT_VERSION = objectKey
0010   l1t::OMDSReader::QueryResults results = m_omdsReader.basicQuery(
0011       "PT_LUT", "CMS_CSC_TF", "CSCTF_PTLUTS", "CSCTF_PTLUTS.PTLUT_VERSION", m_omdsReader.singleAttribute(objectKey));
0012 
0013   // check if query was successful
0014   if (results.queryFailed()) {
0015     edm::LogError("L1-O2O") << "Problem with L1MuCSCPtLutParameters key";
0016     // return empty object
0017     return std::unique_ptr<L1MuCSCPtLut>();
0018   }
0019 
0020   std::string ptlut;
0021   results.fillVariable(ptlut);
0022 
0023   // if uncommented it will generate a huge output...
0024   //edm::LogInfo( "L1-O2O: L1MuCSCPtLutConfigOnlineProd" ) << "PtLUT is "
0025   //                                                       << "ptlut";
0026 
0027   edm::LogInfo("L1-O2O: L1MuCSCPtLutConfigOnlineProd") << "Returning L1MuCSCPtLut";
0028 
0029   auto CSCTFPtLut = std::make_unique<L1MuCSCPtLut>();
0030   CSCTFPtLut->readFromDBS(ptlut);
0031 
0032   return CSCTFPtLut;
0033 }
0034 
0035 DEFINE_FWK_EVENTSETUP_MODULE(L1MuCSCPtLutConfigOnlineProd);