CMS 3D CMS Logo

Public Member Functions | Private Attributes

L1MuGMTRSKeysOnlineProd Class Reference

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

List of all members.

Public Member Functions

virtual void fillObjectKeys (ReturnType pL1TriggerKey)
 L1MuGMTRSKeysOnlineProd (const edm::ParameterSet &iConfig)
 ~L1MuGMTRSKeysOnlineProd ()

Private Attributes

bool m_enableL1MuGMTChannelMask

Detailed Description

Description: online producer for GMT RUN SETTINGS.

Implementation:

Author:
: Ivan Mikulec
Date:
2009/03/25 20:51:08
Revision:
1.1

Definition at line 21 of file L1MuGMTRSKeysOnlineProd.cc.


Constructor & Destructor Documentation

L1MuGMTRSKeysOnlineProd::L1MuGMTRSKeysOnlineProd ( const edm::ParameterSet iConfig)

Definition at line 31 of file L1MuGMTRSKeysOnlineProd.cc.

   : L1ObjectKeysOnlineProdBase( iConfig ),
     m_enableL1MuGMTChannelMask( iConfig.getParameter< bool >( "enableL1MuGMTChannelMask" ) )
{
}
L1MuGMTRSKeysOnlineProd::~L1MuGMTRSKeysOnlineProd ( ) [inline]

Definition at line 24 of file L1MuGMTRSKeysOnlineProd.cc.

{}

Member Function Documentation

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

Implements L1ObjectKeysOnlineProdBase.

Definition at line 38 of file L1MuGMTRSKeysOnlineProd.cc.

References l1t::OMDSReader::basicQuery(), l1t::OMDSReader::QueryResults::fillVariable(), m_enableL1MuGMTChannelMask, L1ObjectKeysOnlineProdBase::m_omdsReader, l1t::OMDSReader::QueryResults::numberRows(), and l1t::OMDSReader::QueryResults::queryFailed().

{
   if( m_enableL1MuGMTChannelMask )
   {
      // Execute SQL queries to get data from OMDS (using key) and make C++ object.
      // Example: SELECT A_KEY FROM CMS_XXX.XXX_RUN_SETTINGS_KEYS_CURRENT
      l1t::OMDSReader::QueryResults objectKeyResults =
         m_omdsReader.basicQuery(
            "GMT_RUN_SETTINGS_FK",
            "CMS_GMT",
            "GMT_RUN_SETTINGS_KEY_CURRENT" );

      std::string objectKey ;

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

      pL1TriggerKey->add( "L1MuGMTChannelMaskRcd", "L1MuGMTChannelMask", objectKey ) ;
   }
}

Member Data Documentation

Definition at line 28 of file L1MuGMTRSKeysOnlineProd.cc.

Referenced by fillObjectKeys().