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 
const QueryResults singleAttribute(const T &data) const
Definition: OMDSReader.h:259
Log< level::Error, false > LogError
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 DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:61
Log< level::Info, false > LogInfo
std::unique_ptr< L1MuCSCPtLut > newObject(const std::string &objectKey) override