CMS 3D CMS Logo

L1MuCSCPtLutConfigOnlineProd.cc
Go to the documentation of this file.
2 
3 std::unique_ptr<L1MuCSCPtLut> L1MuCSCPtLutConfigOnlineProd::newObject(const std::string& objectKey) {
4  edm::LogInfo("L1-O2O: L1MuCSCPtLutConfigOnlineProd") << "Producing "
5  << "L1MuCSCPtLut "
6  << "with key PTLUT_VERSION=" << objectKey;
7 
8  // read the Pt_LUT: it is CLOB with 2^21 different values
9  //SELECT PT_LUT FROM CMS_CSC_TF.CSCTF_PTLUS WHERE CSCTF_PTLUS.PTLUT_VERSION = objectKey
11  "PT_LUT", "CMS_CSC_TF", "CSCTF_PTLUTS", "CSCTF_PTLUTS.PTLUT_VERSION", m_omdsReader.singleAttribute(objectKey));
12 
13  // check if query was successful
14  if (results.queryFailed()) {
15  edm::LogError("L1-O2O") << "Problem with L1MuCSCPtLutParameters key";
16  // return empty object
17  return std::unique_ptr<L1MuCSCPtLut>();
18  }
19 
20  std::string ptlut;
21  results.fillVariable(ptlut);
22 
23  // if uncommented it will generate a huge output...
24  //edm::LogInfo( "L1-O2O: L1MuCSCPtLutConfigOnlineProd" ) << "PtLUT is "
25  // << "ptlut";
26 
27  edm::LogInfo("L1-O2O: L1MuCSCPtLutConfigOnlineProd") << "Returning L1MuCSCPtLut";
28 
29  auto CSCTFPtLut = std::make_unique<L1MuCSCPtLut>();
30  CSCTFPtLut->readFromDBS(ptlut);
31 
32  return CSCTFPtLut;
33 }
34 
l1t::OMDSReader::QueryResults
Definition: OMDSReader.h:49
L1ConfigOnlineProdBase< L1MuCSCPtLutRcd, L1MuCSCPtLut >::m_omdsReader
l1t::OMDSReader m_omdsReader
Definition: L1ConfigOnlineProdBase.h:65
edm::LogInfo
Definition: MessageLogger.h:254
bookConverter.results
results
Definition: bookConverter.py:144
l1t::OMDSReader::singleAttribute
const QueryResults singleAttribute(const T &data) const
Definition: OMDSReader.h:259
L1MuCSCPtLutConfigOnlineProd
Definition: L1MuCSCPtLutConfigOnlineProd.h:5
L1MuCSCPtLutConfigOnlineProd.h
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::LogError
Definition: MessageLogger.h:183
l1t::OMDSReader::basicQuery
const QueryResults basicQuery(const std::vector< std::string > &columnNames, const std::string &schemaName, const std::string &tableName, const std::string &conditionLHS="", const QueryResults conditionRHS=QueryResults(), const std::string &conditionRHSName="")
Definition: OMDSReader.cc:75
DEFINE_FWK_EVENTSETUP_MODULE
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
L1MuCSCPtLutConfigOnlineProd::newObject
std::unique_ptr< L1MuCSCPtLut > newObject(const std::string &objectKey) override
Definition: L1MuCSCPtLutConfigOnlineProd.cc:3