File indexing completed on 2024-04-06 12:03:12
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/plugins/L1TriggerKeyDummyProd.h"
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040 L1TriggerKeyDummyProd::L1TriggerKeyDummyProd(const edm::ParameterSet& iConfig) {
0041
0042
0043
0044
0045
0046 std::string label = iConfig.getParameter<std::string>("label");
0047 setWhatProduced(this, label);
0048
0049
0050 m_key.setTSCKey(iConfig.getParameter<std::string>("tscKey"));
0051 m_key.setSubsystemKey(L1TriggerKey::kCSCTF, iConfig.getParameter<std::string>("csctfKey"));
0052 m_key.setSubsystemKey(L1TriggerKey::kDTTF, iConfig.getParameter<std::string>("dttfKey"));
0053 m_key.setSubsystemKey(L1TriggerKey::kRPC, iConfig.getParameter<std::string>("rpcKey"));
0054 m_key.setSubsystemKey(L1TriggerKey::kGMT, iConfig.getParameter<std::string>("gmtKey"));
0055 m_key.setSubsystemKey(L1TriggerKey::kRCT, iConfig.getParameter<std::string>("rctKey"));
0056 m_key.setSubsystemKey(L1TriggerKey::kGCT, iConfig.getParameter<std::string>("gctKey"));
0057 m_key.setSubsystemKey(L1TriggerKey::kGT, iConfig.getParameter<std::string>("gtKey"));
0058 m_key.setSubsystemKey(L1TriggerKey::kTSP0, iConfig.getParameter<std::string>("tsp0Key"));
0059
0060 if (label != "SubsystemKeysOnly") {
0061 typedef std::vector<edm::ParameterSet> ObjectKeys;
0062 ObjectKeys keys = iConfig.getParameter<ObjectKeys>("objectKeys");
0063
0064 for (ObjectKeys::const_iterator it = keys.begin(); it != keys.end(); ++it) {
0065
0066 std::string key = it->getParameter<std::string>("key");
0067 replace(key.begin(), key.end(), '?', ' ');
0068
0069 m_key.add(it->getParameter<std::string>("record"), it->getParameter<std::string>("type"), key);
0070 }
0071 }
0072 }
0073
0074 L1TriggerKeyDummyProd::~L1TriggerKeyDummyProd() {
0075
0076
0077 }
0078
0079
0080
0081
0082
0083
0084 L1TriggerKeyDummyProd::ReturnType L1TriggerKeyDummyProd::produce(const L1TriggerKeyRcd& iRecord) {
0085 return std::make_unique<L1TriggerKey>(m_key);
0086 }
0087
0088
0089