CMS 3D CMS Logo

Public Member Functions | Private Attributes

L1MuTriggerScaleKeysOnlineProd Class Reference

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

List of all members.

Public Member Functions

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

Private Attributes

std::vector< std::string > m_objectTypes
std::vector< std::string > m_recordTypes

Detailed Description

Definition at line 23 of file L1MuTriggerScaleKeysOnlineProd.cc.


Constructor & Destructor Documentation

L1MuTriggerScaleKeysOnlineProd::L1MuTriggerScaleKeysOnlineProd ( const edm::ParameterSet iConfig) [inline]

Definition at line 25 of file L1MuTriggerScaleKeysOnlineProd.cc.

References Exception, m_objectTypes, and m_recordTypes.

          : L1ObjectKeysOnlineProdBase( iConfig ),
            m_objectTypes(iConfig.getParameter<std::vector<std::string> >("objectTypes")),
            m_recordTypes(iConfig.getParameter<std::vector<std::string> >("recordTypes"))
      {
        if(m_objectTypes.size() != m_recordTypes.size()) { 
            throw cond::Exception("mismatch: need equal number objectType and recordType entries!");
        }        
      }
L1MuTriggerScaleKeysOnlineProd::~L1MuTriggerScaleKeysOnlineProd ( ) [inline]

Definition at line 35 of file L1MuTriggerScaleKeysOnlineProd.cc.

{}

Member Function Documentation

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

Implements L1ObjectKeysOnlineProdBase.

Definition at line 46 of file L1MuTriggerScaleKeysOnlineProd.cc.

References l1t::OMDSReader::basicQuery(), l1t::OMDSReader::QueryResults::fillVariable(), i, L1TriggerKey::kGMT, m_objectTypes, L1ObjectKeysOnlineProdBase::m_omdsReader, m_recordTypes, l1t::OMDSReader::QueryResults::numberRows(), and l1t::OMDSReader::singleAttribute().

{
    
      std::string subsystemKey = pL1TriggerKey->subsystemKey( L1TriggerKey::kGMT ) ;

      if( !subsystemKey.empty() )
        {
      // Lookup GT scales key from GMT main config key
      l1t::OMDSReader::QueryResults scalesKeyResults =
      m_omdsReader.basicQuery(
          // SELECTed column
          "SCALES_KEY",
          // schema name
          "CMS_GMT",
          // table name
          "GMT_CONFIG",
          // WHERE lhs
          "GMT_CONFIG.KEY",
          // WHERE rhs
          m_omdsReader.singleAttribute( subsystemKey  ) );

      if( scalesKeyResults.numberRows() != 1 ) // check if query was successful
      {
         edm::LogError( "L1-O2O" ) << "Problem extracting GMT scales key from GMT config key." ;
         return ;
      }

      std::string objectKey ;
      scalesKeyResults.fillVariable(objectKey) ;

      edm::LogError( "L1-O2O" ) << "Registering " << m_recordTypes.size() << " keys ";
      // register the scales key for all the scales types we need to produce
      for(unsigned i = 0; i < m_recordTypes.size() ; ++i) { 
        edm::LogError( "L1-O2O" ) << "Registering scales key " << objectKey << " for " << m_recordTypes[i];
          pL1TriggerKey->add(m_recordTypes[i], m_objectTypes[i], objectKey ) ;
      }
        }
}

Member Data Documentation

std::vector<std::string> L1MuTriggerScaleKeysOnlineProd::m_objectTypes [private]
std::vector<std::string> L1MuTriggerScaleKeysOnlineProd::m_recordTypes [private]