Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:03:12

0001 #ifndef CondTools_L1Trigger_L1ObjectKeysOnlineProdBase_h
0002 #define CondTools_L1Trigger_L1ObjectKeysOnlineProdBase_h
0003 // -*- C++ -*-
0004 //
0005 // Package:     L1Trigger
0006 // Class  :     L1ObjectKeysOnlineProdBase
0007 //
0008 /**\class L1ObjectKeysOnlineProdBase L1ObjectKeysOnlineProdBase.h CondTools/L1Trigger/interface/L1ObjectKeysOnlineProdBase.h
0009 
0010  Description: Abstract base class for producers that navigate OMDS to get
0011  object keys for a given subsystem key.  Each base class should be configured
0012  (via ParameterSet) with a different subsystem label.
0013 
0014  Usage:
0015     <usage>
0016 
0017 */
0018 //
0019 // Original Author:  Werner Sun
0020 //         Created:  Fri Aug 22 19:47:58 CEST 2008
0021 // $Id$
0022 //
0023 
0024 // system include files
0025 #include <memory>
0026 
0027 // user include files
0028 #include "FWCore/Framework/interface/ModuleFactory.h"
0029 #include "FWCore/Framework/interface/ESProducer.h"
0030 #include "FWCore/Framework/interface/ESHandle.h"
0031 
0032 #include "CondFormats/L1TObjects/interface/L1TriggerKey.h"
0033 #include "CondFormats/DataRecord/interface/L1TriggerKeyRcd.h"
0034 
0035 #include "CondTools/L1Trigger/interface/OMDSReader.h"
0036 
0037 // forward declarations
0038 
0039 class L1ObjectKeysOnlineProdBase : public edm::ESProducer {
0040 public:
0041   L1ObjectKeysOnlineProdBase(const edm::ParameterSet&);
0042   ~L1ObjectKeysOnlineProdBase() override;
0043 
0044   typedef std::unique_ptr<L1TriggerKey> ReturnType;
0045   typedef std::unique_ptr<L1TriggerKey>::pointer FillType;
0046 
0047   ReturnType produce(const L1TriggerKeyRcd&);
0048 
0049   virtual void fillObjectKeys(FillType) = 0;
0050 
0051 private:
0052   // ----------member data ---------------------------
0053 protected:
0054   l1t::OMDSReader m_omdsReader;
0055   edm::ESGetToken<L1TriggerKey, L1TriggerKeyRcd> l1TriggerKeyToken_;
0056 };
0057 
0058 #endif