Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:22:16

0001 // -*- C++ -*-
0002 //
0003 // Package:    L1TriggerConfig
0004 // Class:      DTTFRSKeysOnlineProd
0005 //
0006 /**\class DTTFRSKeysOnlineProd DTTFRSKeysOnlineProd.h L1TriggerConfig/DTTFConfigProducers/src/DTTFRSKeysOnlineProd.cc
0007 
0008  Description: <one line class summary>
0009 
0010  Implementation:
0011      <Notes on implementation>
0012 */
0013 //
0014 // Original Author:  J. Troconiz - UAM Madrid
0015 //         Created:  Thu Oct  2 21:43:50 CEST 2008
0016 //
0017 //
0018 
0019 // system include files
0020 
0021 // user include files
0022 #include "CondTools/L1Trigger/interface/L1ObjectKeysOnlineProdBase.h"
0023 
0024 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0025 
0026 //
0027 // class declaration
0028 //
0029 
0030 class DTTFRSKeysOnlineProd : public L1ObjectKeysOnlineProdBase {
0031 public:
0032   DTTFRSKeysOnlineProd(const edm::ParameterSet&);
0033   ~DTTFRSKeysOnlineProd() override;
0034 
0035   void fillObjectKeys(FillType) override;
0036 
0037 private:
0038   // ----------member data ---------------------------
0039 };
0040 
0041 //
0042 // constants, enums and typedefs
0043 //
0044 
0045 //
0046 // static data member definitions
0047 //
0048 
0049 //
0050 // constructors and destructor
0051 //
0052 DTTFRSKeysOnlineProd::DTTFRSKeysOnlineProd(const edm::ParameterSet& iConfig) : L1ObjectKeysOnlineProdBase(iConfig) {}
0053 
0054 DTTFRSKeysOnlineProd::~DTTFRSKeysOnlineProd() {
0055   // do anything here that needs to be done at desctruction time
0056   // (e.g. close files, deallocate resources etc.)
0057 }
0058 
0059 //
0060 // member functions
0061 //
0062 
0063 // ------------ method called to produce the data  ------------
0064 void DTTFRSKeysOnlineProd::fillObjectKeys(FillType pL1TriggerKey) {
0065   // SELECT HW_SETTINGS FROM CMS_DT_TF.DTTF_SETTINGS_KEY_CURRENT
0066   l1t::OMDSReader::QueryResults rsKeyResults =
0067       m_omdsReader.basicQuery("HW_SETTINGS", "CMS_DT_TF", "DTTF_SETTINGS_KEY_CURRENT");
0068 
0069   if (rsKeyResults.queryFailed() || rsKeyResults.numberRows() != 1)  // check query successful
0070   {
0071     edm::LogError("L1-O2O") << "Problem with DTTF RS key.";
0072     return;
0073   }
0074 
0075   std::string rsKey;
0076   rsKeyResults.fillVariable(rsKey);
0077 
0078   pL1TriggerKey->add("L1MuDTTFMasksRcd", "L1MuDTTFMasks", rsKey);
0079 }
0080 
0081 //define this as a plug-in
0082 DEFINE_FWK_EVENTSETUP_MODULE(DTTFRSKeysOnlineProd);