File indexing completed on 2024-04-06 12:03:13
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023 #include "CondTools/L1Trigger/interface/L1ObjectKeysOnlineProdBase.h"
0024
0025 #include "CondTools/L1Trigger/interface/Exception.h"
0026
0027 #include "CondFormats/L1TObjects/interface/L1TriggerKeyList.h"
0028 #include "CondFormats/DataRecord/interface/L1TriggerKeyListRcd.h"
0029
0030 #include "FWCore/Framework/interface/EventSetup.h"
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047 L1ObjectKeysOnlineProdBase::L1ObjectKeysOnlineProdBase(const edm::ParameterSet& iConfig)
0048 : m_omdsReader(iConfig.getParameter<std::string>("onlineDB"),
0049 iConfig.getParameter<std::string>("onlineAuthentication")) {
0050
0051
0052
0053
0054
0055 auto cc = setWhatProduced(this, iConfig.getParameter<std::string>("subsystemLabel"));
0056
0057
0058 l1TriggerKeyToken_ = cc.consumes(edm::ESInputTag("", "SubsystemKeysOnly"));
0059 }
0060
0061 L1ObjectKeysOnlineProdBase::~L1ObjectKeysOnlineProdBase() {
0062
0063
0064 }
0065
0066
0067
0068
0069
0070
0071 L1ObjectKeysOnlineProdBase::ReturnType L1ObjectKeysOnlineProdBase::produce(const L1TriggerKeyRcd& iRecord) {
0072
0073
0074 edm::ESHandle<L1TriggerKey> subsystemKeys;
0075 try {
0076 subsystemKeys = iRecord.getHandle(l1TriggerKeyToken_);
0077 } catch (l1t::DataAlreadyPresentException& ex) {
0078 throw ex;
0079 }
0080
0081
0082 std::unique_ptr<L1TriggerKey> pL1TriggerKey = std::make_unique<L1TriggerKey>(*subsystemKeys);
0083
0084
0085 fillObjectKeys(pL1TriggerKey.get());
0086
0087 return pL1TriggerKey;
0088 }
0089
0090
0091