CMS 3D CMS Logo

CSCTFObjectKeysOnlineProd.cc
Go to the documentation of this file.
3 
6  m_enableConfiguration(iConfig.getParameter<bool>("enableConfiguration")),
7  m_enablePtLut(iConfig.getParameter<bool>("enablePtLut")) {}
8 
10  std::string csctfKey = pL1TriggerKey->subsystemKey(L1TriggerKey::kCSCTF);
11 
12  if (!csctfKey.empty()) {
14  //----------------------------------------------------------------------------
15  // register the main CSCTF key
16  pL1TriggerKey->add("L1MuCSCTFConfigurationRcd", "L1MuCSCTFConfiguration", csctfKey);
17  //----------------------------------------------------------------------------
18  }
19 
20  if (m_enablePtLut) {
21  //----------------------------------------------------------------------------
22  // PT LUT
23  //
24  // while the sp configuration can change from sector to sector, the pt LUT file
25  //loaded in the CSCTF boards is the same for each SP => the same PTLUT_VERSION
26  // RETRIEVE THE VERSION FROM THE SP1 CONFIGURATION
27  //
28  // e.g., SELECT PTLUT_VERSION FROM CMS_CSC_TF.CSCTF_SP_CONF WHERE CSCTF_SP_CONF.SP_KEY = '1702100001'
29  // e.g., CSCTF key of the type day/month/year, e.g. 170210 = 17th February 2010
30  std::string sp1key = csctfKey + "0001";
31 
32  // query
34  "PTLUT_VERSION", "CMS_CSC_TF", "CSCTF_SP_CONF", "CSCTF_SP_CONF.SP_KEY", m_omdsReader.singleAttribute(sp1key));
35 
36  // check if query was successful
37  if (objectKeyResults.queryFailed() || objectKeyResults.numberRows() != 1) {
38  edm::LogError("L1-O2O") << "Problem with CSCTF key while retrieving "
39  << "the PTLUT_VERSION";
40  return;
41  }
42 
43  // register the pt LUT key
44  std::string ptLutKey;
45  objectKeyResults.fillVariable(ptLutKey);
46  pL1TriggerKey->add("L1MuCSCPtLutRcd", "L1MuCSCPtLut", ptLutKey);
47  //----------------------------------------------------------------------------
48  }
49  }
50 }
CSCTFObjectKeysOnlineProd(const edm::ParameterSet &iConfig)
const QueryResults singleAttribute(const T &data) const
Definition: OMDSReader.h:259
void fillObjectKeys(FillType) override
std::unique_ptr< L1TriggerKey >::pointer FillType
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
bool fillVariable(const std::string &columnName, T &outputVariable) const
Definition: OMDSReader.h:274