#include <L1GtTscObjectKeysOnlineProd.h>
Public Member Functions | |
virtual void | fillObjectKeys (ReturnType pL1TriggerKey) |
public methods | |
L1GtTscObjectKeysOnlineProd (const edm::ParameterSet &) | |
constructor | |
~L1GtTscObjectKeysOnlineProd () | |
destructor | |
Private Member Functions | |
std::string | keyL1GtParameters (const std::string &subsystemKey, const std::string >Schema) |
keys for individual objects | |
std::string | keyL1GtPsbSetup (const std::string &subsystemKey, const std::string >Schema) |
std::string | keyL1GtTriggerMenu (const std::string &subsystemKey, const std::string >Schema) |
Private Attributes | |
bool | m_enableL1GtParameters |
enable key search for each record | |
bool | m_enableL1GtPsbSetup |
bool | m_enableL1GtTriggerMenu |
Description: online producer for L1 GT record keys starting from TSC key.
Implementation: <TODO: enter implementation details>
$Date$ $Revision$
Definition at line 26 of file L1GtTscObjectKeysOnlineProd.h.
L1GtTscObjectKeysOnlineProd::L1GtTscObjectKeysOnlineProd | ( | const edm::ParameterSet & | parSet | ) |
constructor
Definition at line 26 of file L1GtTscObjectKeysOnlineProd.cc.
: L1ObjectKeysOnlineProdBase(parSet), m_enableL1GtParameters( parSet.getParameter<bool> ("EnableL1GtParameters")), m_enableL1GtTriggerMenu( parSet.getParameter<bool> ("EnableL1GtTriggerMenu")), m_enableL1GtPsbSetup( parSet.getParameter<bool> ("EnableL1GtPsbSetup")) { // empty }
L1GtTscObjectKeysOnlineProd::~L1GtTscObjectKeysOnlineProd | ( | ) |
void L1GtTscObjectKeysOnlineProd::fillObjectKeys | ( | ReturnType | pL1TriggerKey | ) | [virtual] |
public methods
Implements L1ObjectKeysOnlineProdBase.
Definition at line 129 of file L1GtTscObjectKeysOnlineProd.cc.
References keyL1GtParameters(), keyL1GtPsbSetup(), keyL1GtTriggerMenu(), L1TriggerKey::kGT, m_enableL1GtParameters, m_enableL1GtPsbSetup, and m_enableL1GtTriggerMenu.
{ // kMYSUBSYSTEM = kCSCTF, kDTTF, kRPC, kGMT, kRCT, mkGCT, kGT, or kTSP0 // subsystemKey = TRIGGERSUP_CONF.{CSCTF_KEY, DTTF_KEY, RPC_KEY, GMT_KEY, RCT_KEY, GCT_KEY, GT_KEY} std::string subsystemKey = pL1TriggerKey->subsystemKey(L1TriggerKey::kGT); const std::string gtSchema = "CMS_GT"; // if (m_enableL1GtParameters) { const std::string& objectKey = keyL1GtParameters(subsystemKey, gtSchema); if (!objectKey.empty()) { pL1TriggerKey->add("L1GtParametersRcd", "L1GtParameters", objectKey); } } // if (m_enableL1GtTriggerMenu) { const std::string& objectKey = keyL1GtTriggerMenu(subsystemKey, gtSchema); if (!objectKey.empty()) { pL1TriggerKey->add("L1GtTriggerMenuRcd", "L1GtTriggerMenu", objectKey); } } // if (m_enableL1GtPsbSetup) { const std::string& objectKey = keyL1GtPsbSetup(subsystemKey, gtSchema); if (!objectKey.empty()) { pL1TriggerKey->add("L1GtPsbSetupRcd", "L1GtPsbSetup", objectKey); } } }
std::string L1GtTscObjectKeysOnlineProd::keyL1GtParameters | ( | const std::string & | subsystemKey, |
const std::string & | gtSchema | ||
) | [private] |
keys for individual objects
Definition at line 48 of file L1GtTscObjectKeysOnlineProd.cc.
References l1t::OMDSReader::basicQuery(), l1t::OMDSReader::QueryResults::fillVariable(), L1ObjectKeysOnlineProdBase::m_omdsReader, l1t::OMDSReader::QueryResults::numberRows(), l1t::OMDSReader::QueryResults::queryFailed(), and l1t::OMDSReader::singleAttribute().
Referenced by fillObjectKeys().
{ std::string objectKey; if (!subsystemKey.empty()) { // Execute SQL queries to get keys from OMDS. // SELECT GTFE_SETUP_FK FROM CMS_GT.GT_SETUP WHERE GT_SETUP.ID = MyKey l1t::OMDSReader::QueryResults objectKeyResults = m_omdsReader.basicQuery( "GTFE_SETUP_FK", gtSchema, "GT_SETUP", "GT_SETUP.ID", m_omdsReader.singleAttribute( subsystemKey)); // check if query was successful if (objectKeyResults.queryFailed()) { edm::LogError("L1-O2O") << "Problem with key for record L1GtParametersRcd: query failed "; return objectKey; } else if ( ( objectKeyResults.numberRows() != 1 )) { edm::LogError("L1-O2O") << "Problem with key for record L1GtParametersRcd: " << ( objectKeyResults.numberRows() ) << " rows were returned"; return objectKey; } objectKeyResults.fillVariable(objectKey); } return objectKey; }
std::string L1GtTscObjectKeysOnlineProd::keyL1GtPsbSetup | ( | const std::string & | subsystemKey, |
const std::string & | gtSchema | ||
) | [private] |
Definition at line 111 of file L1GtTscObjectKeysOnlineProd.cc.
Referenced by fillObjectKeys().
{ std::string objectKey; if (!subsystemKey.empty()) { // no need to query OMDS, one uses the GT_SETUP key to get the individual PSB keys. // the L1GtPsbSetup key is GT_SETUP key objectKey = subsystemKey; } return objectKey; }
std::string L1GtTscObjectKeysOnlineProd::keyL1GtTriggerMenu | ( | const std::string & | subsystemKey, |
const std::string & | gtSchema | ||
) | [private] |
Definition at line 79 of file L1GtTscObjectKeysOnlineProd.cc.
References l1t::OMDSReader::basicQuery(), l1t::OMDSReader::QueryResults::fillVariable(), L1ObjectKeysOnlineProdBase::m_omdsReader, l1t::OMDSReader::QueryResults::numberRows(), l1t::OMDSReader::QueryResults::queryFailed(), and l1t::OMDSReader::singleAttribute().
Referenced by fillObjectKeys().
{ std::string objectKey; if (!subsystemKey.empty()) { // Execute SQL queries to get keys from OMDS. // SELECT L1T_MENU_FK FROM CMS_GT.GT_SETUP WHERE GT_SETUP.ID = MyKey l1t::OMDSReader::QueryResults objectKeyResults = m_omdsReader.basicQuery( "L1T_MENU_FK", gtSchema, "GT_SETUP", "GT_SETUP.ID", m_omdsReader.singleAttribute( subsystemKey)); // check if query was successful if (objectKeyResults.queryFailed()) { edm::LogError("L1-O2O") << "Problem with key for record L1GtTriggerMenuRcd: query failed "; return objectKey; } else if ( ( objectKeyResults.numberRows() != 1 )) { edm::LogError("L1-O2O") << "Problem with key for record L1GtTriggerMenuRcd: " << ( objectKeyResults.numberRows() ) << " rows were returned"; return objectKey; } objectKeyResults.fillVariable(objectKey); } return objectKey; }
bool L1GtTscObjectKeysOnlineProd::m_enableL1GtParameters [private] |
enable key search for each record
Definition at line 51 of file L1GtTscObjectKeysOnlineProd.h.
Referenced by fillObjectKeys().
bool L1GtTscObjectKeysOnlineProd::m_enableL1GtPsbSetup [private] |
Definition at line 53 of file L1GtTscObjectKeysOnlineProd.h.
Referenced by fillObjectKeys().
bool L1GtTscObjectKeysOnlineProd::m_enableL1GtTriggerMenu [private] |
Definition at line 52 of file L1GtTscObjectKeysOnlineProd.h.
Referenced by fillObjectKeys().