14 : m_tscKey(iConfig.getParameter<
std::
string>(
"tscKey")),
15 m_rsKey(iConfig.getParameter<
std::
string>(
"rsKey")),
16 m_ignoreTriggerKey(iConfig.getParameter<
bool>(
"ignoreTriggerKey")),
17 m_logKeys(iConfig.getParameter<
bool>(
"logKeys")),
18 m_logTransactions(iConfig.getParameter<
bool>(
"logTransactions")),
19 m_forceUpdate(iConfig.getParameter<
bool>(
"forceUpdate")) {
21 typedef std::vector<edm::ParameterSet> ToSave;
23 for (ToSave::const_iterator it = toSave.begin(); it != toSave.end(); it++) {
44 edm::LogError(
"L1-O2O") <<
"Problem getting last L1TriggerKeyListExt";
47 unsigned long long run =
iEvent.id().run();
51 bool triggerKeyIOVUpdated =
true;
57 bool logRecords =
true;
77 recordTypeToKeyMap =
key.recordToKeyMap();
82 replace(tmpKey.begin(), tmpKey.end(),
' ',
'?');
83 log +=
" tscKey:rsKey=" + tmpKey;
92 recordTypeToKeyMap = esKey->recordToKeyMap();
95 std::vector<std::string>::const_iterator recordTypeItr =
m_recordTypes.begin();
96 std::vector<std::string>::const_iterator recordTypeEnd =
m_recordTypes.end();
98 for (; recordTypeItr != recordTypeEnd; ++recordTypeItr) {
99 recordTypeToKeyMap.insert(std::make_pair(*recordTypeItr, m_Key));
109 L1TriggerKeyExt::RecordToKey::const_iterator itr = recordTypeToKeyMap.begin();
110 L1TriggerKeyExt::RecordToKey::const_iterator
end = recordTypeToKeyMap.end();
112 for (; itr !=
end; ++itr) {
122 replace(tmpKey.begin(), tmpKey.end(),
' ',
'?');
128 edm::LogVerbatim(
"L1-O2O") <<
"L1CondDBIOVWriterExt: null object key for " << recordType
129 <<
"; skipping this record.";
132 edm::LogVerbatim(
"L1-O2O") <<
"Object key for " << recordType <<
": " << objectKey;
135 if (payloadToken.empty()) {
136 edm::LogVerbatim(
"L1-O2O") <<
"L1CondDBIOVWriterExt: empty payload token for " + recordType +
", key " +
persistency::Exception Exception
void readObject(const std::string &payloadToken, T &outputObject)
Log< level::Info, true > LogVerbatim
bool fillLastTriggerKeyList(L1TriggerKeyListExt &output)
T getParameter(std::string const &) const
static const std::string kNullKey
def replace(string, replacements)
L1CondDBIOVWriterExt(const edm::ParameterSet &)
Log< level::Error, false > LogError
bool updateIOV(const std::string &esRecordName, const std::string &payloadToken, edm::RunNumber_t sinceRun, bool logTransactions=false)
void analyze(const edm::Event &, const edm::EventSetup &) override
std::vector< std::string > m_recordTypes
edm::ESGetToken< L1TriggerKeyExt, L1TriggerKeyExtRcd > l1TriggerKeyExtToken_
~L1CondDBIOVWriterExt() override
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
std::map< std::string, std::string > RecordToKey
std::string m_tscKey
l1t::DataWriter m_writer ;
std::string token(const std::string &tscKey) const
l1t::DataWriterExt m_writer
void throwException(const std::string &message, const std::string &methodName)