00001 // -*- C++ -*- 00002 // 00003 // Package: L1TriggerConfig 00004 // Class: DTTFRSKeysOnlineProd 00005 // 00013 // 00014 // Original Author: J. Troconiz - UAM Madrid 00015 // Created: Thu Oct 2 21:43:50 CEST 2008 00016 // $Id: DTTFRSKeysOnlineProd.cc,v 1.1 2009/05/14 14:13:40 troco Exp $ 00017 // 00018 // 00019 00020 00021 // system include files 00022 00023 // user include files 00024 #include "CondTools/L1Trigger/interface/L1ObjectKeysOnlineProdBase.h" 00025 00026 #include "FWCore/MessageLogger/interface/MessageLogger.h" 00027 00028 // 00029 // class declaration 00030 // 00031 00032 class DTTFRSKeysOnlineProd : public L1ObjectKeysOnlineProdBase { 00033 public: 00034 DTTFRSKeysOnlineProd(const edm::ParameterSet&); 00035 ~DTTFRSKeysOnlineProd(); 00036 00037 virtual void fillObjectKeys( ReturnType pL1TriggerKey ) ; 00038 private: 00039 // ----------member data --------------------------- 00040 }; 00041 00042 // 00043 // constants, enums and typedefs 00044 // 00045 00046 // 00047 // static data member definitions 00048 // 00049 00050 // 00051 // constructors and destructor 00052 // 00053 DTTFRSKeysOnlineProd::DTTFRSKeysOnlineProd(const edm::ParameterSet& iConfig) 00054 : L1ObjectKeysOnlineProdBase( iConfig ) 00055 {} 00056 00057 00058 DTTFRSKeysOnlineProd::~DTTFRSKeysOnlineProd() 00059 { 00060 00061 // do anything here that needs to be done at desctruction time 00062 // (e.g. close files, deallocate resources etc.) 00063 00064 } 00065 00066 00067 // 00068 // member functions 00069 // 00070 00071 // ------------ method called to produce the data ------------ 00072 void 00073 DTTFRSKeysOnlineProd::fillObjectKeys( ReturnType pL1TriggerKey ) 00074 { 00075 // SELECT HW_SETTINGS FROM CMS_DT_TF.DTTF_SETTINGS_KEY_CURRENT 00076 l1t::OMDSReader::QueryResults rsKeyResults = 00077 m_omdsReader.basicQuery( "HW_SETTINGS", 00078 "CMS_DT_TF", 00079 "DTTF_SETTINGS_KEY_CURRENT" ); 00080 00081 if( rsKeyResults.queryFailed() || 00082 rsKeyResults.numberRows() != 1 ) // check query successful 00083 { 00084 edm::LogError( "L1-O2O" ) << "Problem with DTTF RS key." ; 00085 return ; 00086 } 00087 00088 std::string rsKey ; 00089 rsKeyResults.fillVariable( rsKey ) ; 00090 00091 pL1TriggerKey->add( "L1MuDTTFMasksRcd", 00092 "L1MuDTTFMasks", 00093 rsKey ) ; 00094 } 00095 00096 //define this as a plug-in 00097 DEFINE_FWK_EVENTSETUP_MODULE(DTTFRSKeysOnlineProd);