CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

L1GtRsObjectKeysOnlineProd Class Reference

#include <L1GtRsObjectKeysOnlineProd.h>

Inheritance diagram for L1GtRsObjectKeysOnlineProd:
L1ObjectKeysOnlineProdBase edm::ESProducer edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

List of all members.

Public Member Functions

virtual void fillObjectKeys (ReturnType pL1TriggerKey)
 public methods
 L1GtRsObjectKeysOnlineProd (const edm::ParameterSet &)
 constructor
 ~L1GtRsObjectKeysOnlineProd ()
 destructor

Private Member Functions

std::string keyL1GtPrescaleFactorsAlgoTrig (const std::string &)
 keys for individual objects
std::string keyL1GtPrescaleFactorsTechTrig (const std::string &)
std::string keyL1GtTriggerMaskAlgoTrig (const std::string &)
std::string keyL1GtTriggerMaskTechTrig (const std::string &)
std::string keyL1GtTriggerMaskVetoTechTrig (const std::string &)

Private Attributes

bool m_enableL1GtPrescaleFactorsAlgoTrig
 enable key search for each record
bool m_enableL1GtPrescaleFactorsTechTrig
bool m_enableL1GtTriggerMaskAlgoTrig
bool m_enableL1GtTriggerMaskTechTrig
bool m_enableL1GtTriggerMaskVetoTechTrig
int m_partitionNumber
 partition number

Detailed Description

Description: online producer for L1 GT record keys from RUN SETTINGS.

Implementation: <TODO: enter implementation details>

Author:
: Vasile Mihai Ghete - HEPHY Vienna

$Date$ $Revision$

Definition at line 26 of file L1GtRsObjectKeysOnlineProd.h.


Constructor & Destructor Documentation

L1GtRsObjectKeysOnlineProd::L1GtRsObjectKeysOnlineProd ( const edm::ParameterSet parSet)

constructor

Definition at line 26 of file L1GtRsObjectKeysOnlineProd.cc.

                                                                                    :
    L1ObjectKeysOnlineProdBase(parSet),
    m_partitionNumber(
            parSet.getParameter<int> ("PartitionNumber")),
    m_enableL1GtPrescaleFactorsAlgoTrig(
            parSet.getParameter<bool> ("EnableL1GtPrescaleFactorsAlgoTrig")),
    m_enableL1GtPrescaleFactorsTechTrig(
            parSet.getParameter<bool> ("EnableL1GtPrescaleFactorsTechTrig")),
    m_enableL1GtTriggerMaskAlgoTrig(
            parSet.getParameter<bool> ("EnableL1GtTriggerMaskAlgoTrig")),
    m_enableL1GtTriggerMaskTechTrig(
            parSet.getParameter<bool> ("EnableL1GtTriggerMaskTechTrig")),
    m_enableL1GtTriggerMaskVetoTechTrig(
            parSet.getParameter<bool> ("EnableL1GtTriggerMaskVetoTechTrig")) {

    // empty
}
L1GtRsObjectKeysOnlineProd::~L1GtRsObjectKeysOnlineProd ( )

destructor

Definition at line 45 of file L1GtRsObjectKeysOnlineProd.cc.

                                                        {

    // empty

}

Member Function Documentation

void L1GtRsObjectKeysOnlineProd::fillObjectKeys ( ReturnType  pL1TriggerKey) [virtual]

public methods

Implements L1ObjectKeysOnlineProdBase.

Definition at line 243 of file L1GtRsObjectKeysOnlineProd.cc.

References keyL1GtPrescaleFactorsAlgoTrig(), keyL1GtPrescaleFactorsTechTrig(), keyL1GtTriggerMaskAlgoTrig(), keyL1GtTriggerMaskTechTrig(), keyL1GtTriggerMaskVetoTechTrig(), m_enableL1GtPrescaleFactorsAlgoTrig, m_enableL1GtPrescaleFactorsTechTrig, m_enableL1GtTriggerMaskAlgoTrig, m_enableL1GtTriggerMaskTechTrig, and m_enableL1GtTriggerMaskVetoTechTrig.

                                                                        {

    const std::string gtSchema = "CMS_GT";

    if (m_enableL1GtPrescaleFactorsAlgoTrig) {
        const std::string& objectKey = keyL1GtPrescaleFactorsAlgoTrig(gtSchema);
        if (!objectKey.empty()) {
            pL1TriggerKey->add(
                    "L1GtPrescaleFactorsAlgoTrigRcd", "L1GtPrescaleFactors", objectKey);
        }
    }

    if (m_enableL1GtPrescaleFactorsTechTrig) {
        const std::string& objectKey = keyL1GtPrescaleFactorsTechTrig(gtSchema);
        if (!objectKey.empty()) {
            pL1TriggerKey->add(
                    "L1GtPrescaleFactorsTechTrigRcd", "L1GtPrescaleFactors", objectKey);
        }
    }

    if (m_enableL1GtTriggerMaskAlgoTrig) {
        const std::string& objectKey = keyL1GtTriggerMaskAlgoTrig(gtSchema);
        if (!objectKey.empty()) {
            pL1TriggerKey->add("L1GtTriggerMaskAlgoTrigRcd", "L1GtTriggerMask", objectKey);
        }
    }

    if (m_enableL1GtTriggerMaskTechTrig) {
        const std::string& objectKey = keyL1GtTriggerMaskTechTrig(gtSchema);
        if (!objectKey.empty()) {
            pL1TriggerKey->add("L1GtTriggerMaskTechTrigRcd", "L1GtTriggerMask", objectKey);
        }
    }

    if (m_enableL1GtTriggerMaskVetoTechTrig) {
        const std::string& objectKey = keyL1GtTriggerMaskVetoTechTrig(gtSchema);
        if (!objectKey.empty()) {
            pL1TriggerKey->add(
                    "L1GtTriggerMaskVetoTechTrigRcd", "L1GtTriggerMask", objectKey);
        }
    }

}
std::string L1GtRsObjectKeysOnlineProd::keyL1GtPrescaleFactorsAlgoTrig ( const std::string &  gtSchema) [private]

keys for individual objects

Definition at line 52 of file L1GtRsObjectKeysOnlineProd.cc.

References l1t::OMDSReader::basicQueryGenericKey(), l1t::OMDSReader::QueryResults::fillVariable(), edm::isDebugEnabled(), LogTrace, L1ObjectKeysOnlineProdBase::m_omdsReader, m_partitionNumber, l1t::OMDSReader::QueryResults::numberRows(), l1t::OMDSReader::QueryResults::queryFailed(), and l1t::OMDSReader::singleAttribute().

Referenced by fillObjectKeys().

                                                                                              {

    std::string objectKey;

    // SELECT GT_RUN_SETTINGS_FK FROM CMS_GT.GT_RUN_SETTINGS_KEY_CURRENT
    //        WHERE GT_RUN_SETTINGS_KEY_CURRENT.GT_PARTITION_NUMBER = m_partitionNumber
    l1t::OMDSReader::QueryResults objectKeyResults =
            m_omdsReader.basicQueryGenericKey<int> ("GT_RUN_SETTINGS_FK",
                    gtSchema, "GT_RUN_SETTINGS_KEY_CURRENT",
                    "GT_RUN_SETTINGS_KEY_CURRENT.GT_PARTITION_NUMBER",
                    m_omdsReader.singleAttribute(m_partitionNumber), "");

    // check if query was successful
    if (objectKeyResults.queryFailed()) {
        edm::LogError("L1-O2O")
                << "Problem with key for record L1GtPrescaleFactorsAlgoTrigRcd: query failed ";
        return objectKey;
    } else if ( ( objectKeyResults.numberRows() != 1 )) {
        edm::LogError("L1-O2O") << "Problem with key for record L1GtPrescaleFactorsAlgoTrigRcd: "
                << ( objectKeyResults.numberRows() ) << " rows were returned";
        return objectKey;
    }

    objectKeyResults.fillVariable(objectKey);

    //
    if (edm::isDebugEnabled()) {
        LogTrace("L1GtRsObjectKeysOnlineProd")
                << "\nThe following GT_RUN_SETTINGS_FK key "
                << "was found for L1GtPrescaleFactorsAlgoTrigRcd: \n  "
                << objectKey << "\nfor partition " << m_partitionNumber << "\n"
                << std::endl;
    }

    return objectKey;
}
std::string L1GtRsObjectKeysOnlineProd::keyL1GtPrescaleFactorsTechTrig ( const std::string &  gtSchema) [private]

Definition at line 90 of file L1GtRsObjectKeysOnlineProd.cc.

References l1t::OMDSReader::basicQueryGenericKey(), l1t::OMDSReader::QueryResults::fillVariable(), edm::isDebugEnabled(), LogTrace, L1ObjectKeysOnlineProdBase::m_omdsReader, m_partitionNumber, l1t::OMDSReader::QueryResults::numberRows(), l1t::OMDSReader::QueryResults::queryFailed(), and l1t::OMDSReader::singleAttribute().

Referenced by fillObjectKeys().

                                                                                              {

    std::string objectKey;

    // SELECT GT_RUN_SETTINGS_FK FROM CMS_GT.GT_RUN_SETTINGS_KEY_CURRENT
    //        WHERE GT_RUN_SETTINGS_KEY_CURRENT.GT_PARTITION_NUMBER = m_partitionNumber
    l1t::OMDSReader::QueryResults objectKeyResults =
            m_omdsReader.basicQueryGenericKey<int> ("GT_RUN_SETTINGS_FK",
                    gtSchema, "GT_RUN_SETTINGS_KEY_CURRENT",
                    "GT_RUN_SETTINGS_KEY_CURRENT.GT_PARTITION_NUMBER",
                    m_omdsReader.singleAttribute(m_partitionNumber), "");

    // check if query was successful
    if (objectKeyResults.queryFailed()) {
        edm::LogError("L1-O2O")
                << "Problem with key for record L1GtPrescaleFactorsTechTrigRcd: query failed ";
        return objectKey;
    } else if ( ( objectKeyResults.numberRows() != 1 )) {
        edm::LogError("L1-O2O") << "Problem with key for record L1GtPrescaleFactorsTechTrigRcd: "
                << ( objectKeyResults.numberRows() ) << " rows were returned";
        return objectKey;
    }

    objectKeyResults.fillVariable(objectKey);

    //
    if (edm::isDebugEnabled()) {
        LogTrace("L1GtRsObjectKeysOnlineProd")
                << "\nThe following GT_RUN_SETTINGS_FK key "
                << "was found for L1GtPrescaleFactorsTechTrigRcd: \n  "
                << objectKey << "\nfor partition " << m_partitionNumber << "\n"
                << std::endl;
    }

    return objectKey;
}
std::string L1GtRsObjectKeysOnlineProd::keyL1GtTriggerMaskAlgoTrig ( const std::string &  gtSchema) [private]

Definition at line 128 of file L1GtRsObjectKeysOnlineProd.cc.

References l1t::OMDSReader::basicQuery(), l1t::OMDSReader::basicQueryGenericKey(), l1t::OMDSReader::QueryResults::fillVariable(), edm::isDebugEnabled(), LogTrace, L1ObjectKeysOnlineProdBase::m_omdsReader, m_partitionNumber, l1t::OMDSReader::QueryResults::numberRows(), l1t::OMDSReader::QueryResults::queryFailed(), and l1t::OMDSReader::singleAttribute().

Referenced by fillObjectKeys().

                                                                                          {

    std::string objectKey;

    // SELECT FINOR_ALGO_FK FROM CMS_GT.GT_RUN_SETTINGS
    //        WHERE GT_RUN_SETTINGS.ID = (
    // SELECT GT_RUN_SETTINGS_FK FROM CMS_GT.GT_RUN_SETTINGS_KEY_CURRENT
    //        WHERE GT_RUN_SETTINGS_KEY_CURRENT.GT_PARTITION_NUMBER = m_partitionNumber)
    l1t::OMDSReader::QueryResults objectKeyResults = m_omdsReader.basicQuery(
            "FINOR_ALGO_FK", gtSchema, "GT_RUN_SETTINGS", "GT_RUN_SETTINGS.ID",
            m_omdsReader.basicQueryGenericKey<int> (
                    "GT_RUN_SETTINGS_FK", gtSchema, "GT_RUN_SETTINGS_KEY_CURRENT",
                    "GT_RUN_SETTINGS_KEY_CURRENT.GT_PARTITION_NUMBER",
                    m_omdsReader.singleAttribute(m_partitionNumber), ""));

    // check if query was successful
    if (objectKeyResults.queryFailed()) {
        edm::LogError("L1-O2O")
                << "Problem with key for record L1GtTriggerMaskAlgoTrigRcd: query failed ";
        return objectKey;
    } else if ( ( objectKeyResults.numberRows() != 1 )) {
        edm::LogError("L1-O2O") << "Problem with key for record L1GtTriggerMaskAlgoTrigRcd: "
                << ( objectKeyResults.numberRows() ) << " rows were returned";
        return objectKey;
    }

    objectKeyResults.fillVariable(objectKey);

    //
    if (edm::isDebugEnabled()) {
        LogTrace("L1GtRsObjectKeysOnlineProd")
                << "\nThe following key was found for L1GtTriggerMaskAlgoTrigRcd: \n  " << objectKey
                << "\nfor partition " << m_partitionNumber << "\n" << std::endl;
    }

    return objectKey;
}
std::string L1GtRsObjectKeysOnlineProd::keyL1GtTriggerMaskTechTrig ( const std::string &  gtSchema) [private]

Definition at line 166 of file L1GtRsObjectKeysOnlineProd.cc.

References l1t::OMDSReader::basicQuery(), l1t::OMDSReader::basicQueryGenericKey(), l1t::OMDSReader::QueryResults::fillVariable(), edm::isDebugEnabled(), LogTrace, L1ObjectKeysOnlineProdBase::m_omdsReader, m_partitionNumber, l1t::OMDSReader::QueryResults::numberRows(), l1t::OMDSReader::QueryResults::queryFailed(), and l1t::OMDSReader::singleAttribute().

Referenced by fillObjectKeys().

                                                                                          {

    std::string objectKey;

    // SELECT FINOR_TT_FK FROM CMS_GT.GT_RUN_SETTINGS
    //        WHERE GT_RUN_SETTINGS.ID = (
    // SELECT GT_RUN_SETTINGS_FK FROM CMS_GT.GT_RUN_SETTINGS_KEY_CURRENT
    //        WHERE GT_RUN_SETTINGS_KEY_CURRENT.GT_PARTITION_NUMBER = m_partitionNumber)
    l1t::OMDSReader::QueryResults objectKeyResults = m_omdsReader.basicQuery(
            "FINOR_TT_FK", gtSchema, "GT_RUN_SETTINGS", "GT_RUN_SETTINGS.ID",
            m_omdsReader.basicQueryGenericKey<int> (
                    "GT_RUN_SETTINGS_FK", gtSchema, "GT_RUN_SETTINGS_KEY_CURRENT",
                    "GT_RUN_SETTINGS_KEY_CURRENT.GT_PARTITION_NUMBER",
                    m_omdsReader.singleAttribute(m_partitionNumber), ""));

    // check if query was successful
    if (objectKeyResults.queryFailed()) {
        edm::LogError("L1-O2O")
                << "Problem with key for record L1GtTriggerMaskTechTrigRcd: query failed ";
        return objectKey;
    } else if ( ( objectKeyResults.numberRows() != 1 )) {
        edm::LogError("L1-O2O") << "Problem with key for record L1GtTriggerMaskTechTrigRcd: "
                << ( objectKeyResults.numberRows() ) << " rows were returned";
        return objectKey;
    }

    objectKeyResults.fillVariable(objectKey);

    //
    if (edm::isDebugEnabled()) {
        LogTrace("L1GtRsObjectKeysOnlineProd")
                << "\nThe following key was found for L1GtTriggerMaskTechTrigRcd: \n  " << objectKey
                << "\nfor partition " << m_partitionNumber << "\n" << std::endl;
    }

    return objectKey;
}
std::string L1GtRsObjectKeysOnlineProd::keyL1GtTriggerMaskVetoTechTrig ( const std::string &  gtSchema) [private]

Definition at line 204 of file L1GtRsObjectKeysOnlineProd.cc.

References l1t::OMDSReader::basicQuery(), l1t::OMDSReader::basicQueryGenericKey(), l1t::OMDSReader::QueryResults::fillVariable(), edm::isDebugEnabled(), LogTrace, L1ObjectKeysOnlineProdBase::m_omdsReader, m_partitionNumber, l1t::OMDSReader::QueryResults::numberRows(), l1t::OMDSReader::QueryResults::queryFailed(), and l1t::OMDSReader::singleAttribute().

Referenced by fillObjectKeys().

                                                                                              {

    std::string objectKey;

    // SELECT VETO_TT_FK FROM CMS_GT.GT_RUN_SETTINGS
    //        WHERE GT_RUN_SETTINGS.ID = (
    // SELECT GT_RUN_SETTINGS_FK FROM CMS_GT.GT_RUN_SETTINGS_KEY_CURRENT
    //        WHERE GT_RUN_SETTINGS_KEY_CURRENT.GT_PARTITION_NUMBER = m_partitionNumber)
    l1t::OMDSReader::QueryResults objectKeyResults = m_omdsReader.basicQuery(
            "VETO_TT_FK", gtSchema, "GT_RUN_SETTINGS", "GT_RUN_SETTINGS.ID",
            m_omdsReader.basicQueryGenericKey<int> (
                    "GT_RUN_SETTINGS_FK", gtSchema, "GT_RUN_SETTINGS_KEY_CURRENT",
                    "GT_RUN_SETTINGS_KEY_CURRENT.GT_PARTITION_NUMBER",
                    m_omdsReader.singleAttribute(m_partitionNumber), ""));

    // check if query was successful
    if (objectKeyResults.queryFailed()) {
        edm::LogError("L1-O2O")
                << "Problem with key for record L1GtTriggerMaskVetoTechTrigRcd: query failed ";
        return objectKey;
    } else if ( ( objectKeyResults.numberRows() != 1 )) {
        edm::LogError("L1-O2O") << "Problem with key for record L1GtTriggerMaskVetoTechTrigRcd: "
                << ( objectKeyResults.numberRows() ) << " rows were returned";
        return objectKey;
    }

    objectKeyResults.fillVariable(objectKey);

    //
    if (edm::isDebugEnabled()) {
        LogTrace("L1GtRsObjectKeysOnlineProd")
                << "\nThe following key was found for L1GtTriggerMaskVetoTechTrigRcd: \n  "
                << objectKey << "\nfor partition " << m_partitionNumber << "\n" << std::endl;
    }

    return objectKey;
}

Member Data Documentation

enable key search for each record

Definition at line 56 of file L1GtRsObjectKeysOnlineProd.h.

Referenced by fillObjectKeys().

Definition at line 57 of file L1GtRsObjectKeysOnlineProd.h.

Referenced by fillObjectKeys().

Definition at line 58 of file L1GtRsObjectKeysOnlineProd.h.

Referenced by fillObjectKeys().

Definition at line 59 of file L1GtRsObjectKeysOnlineProd.h.

Referenced by fillObjectKeys().

Definition at line 60 of file L1GtRsObjectKeysOnlineProd.h.

Referenced by fillObjectKeys().