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 }
l1t::OMDSReader::QueryResults
Definition: OMDSReader.h:49
electrons_cff.bool
bool
Definition: electrons_cff.py:393
MessageLogger.h
CSCTFObjectKeysOnlineProd::fillObjectKeys
void fillObjectKeys(FillType) override
Definition: CSCTFObjectKeysOnlineProd.cc:9
L1ObjectKeysOnlineProdBase::m_omdsReader
l1t::OMDSReader m_omdsReader
Definition: L1ObjectKeysOnlineProdBase.h:54
l1t::OMDSReader::singleAttribute
const QueryResults singleAttribute(const T &data) const
Definition: OMDSReader.h:259
l1t::OMDSReader::QueryResults::fillVariable
bool fillVariable(const std::string &columnName, T &outputVariable) const
Definition: OMDSReader.h:274
CSCTFObjectKeysOnlineProd::CSCTFObjectKeysOnlineProd
CSCTFObjectKeysOnlineProd(const edm::ParameterSet &iConfig)
Definition: CSCTFObjectKeysOnlineProd.cc:4
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
L1ObjectKeysOnlineProdBase
Definition: L1ObjectKeysOnlineProdBase.h:39
edm::ParameterSet
Definition: ParameterSet.h:47
CSCTFObjectKeysOnlineProd::m_enablePtLut
bool m_enablePtLut
Definition: CSCTFObjectKeysOnlineProd.h:12
l1t::OMDSReader::QueryResults::numberRows
int numberRows() const
Definition: OMDSReader.h:60
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
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
CSCTFObjectKeysOnlineProd.h
L1TriggerKey::kCSCTF
Definition: L1TriggerKey.h:27
l1t::OMDSReader::QueryResults::queryFailed
bool queryFailed() const
Definition: OMDSReader.h:59
L1ObjectKeysOnlineProdBase::FillType
std::unique_ptr< L1TriggerKey >::pointer FillType
Definition: L1ObjectKeysOnlineProdBase.h:45
CSCTFObjectKeysOnlineProd::m_enableConfiguration
bool m_enableConfiguration
Definition: CSCTFObjectKeysOnlineProd.h:11