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++) {
43 edm::LogError(
"L1-O2O") <<
"Problem getting last L1TriggerKeyListExt";
46 unsigned long long run = iEvent.
id().
run();
50 bool triggerKeyIOVUpdated =
true;
56 bool logRecords =
true;
61 if (!
m_tscKey.empty() && !m_rsKey.empty()) {
81 replace(tmpKey.begin(), tmpKey.end(),
' ',
'?');
82 log +=
" tscKey:rsKey=" + tmpKey;
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 " +
139 throwException =
true;
151 if (throwException) {
persistency::Exception Exception
void readObject(const std::string &payloadToken, T &outputObject)
T getParameter(std::string const &) const
bool fillLastTriggerKeyList(L1TriggerKeyListExt &output)
static const std::string kNullKey
def replace(string, replacements)
L1CondDBIOVWriterExt(const edm::ParameterSet &)
const RecordToKey & recordToKeyMap() const
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
~L1CondDBIOVWriterExt() override
std::map< std::string, std::string > RecordToKey
std::string m_tscKey
l1t::DataWriter m_writer ;
l1t::DataWriterExt m_writer
std::string token(const std::string &tscKey) const
void throwException(const std::string &message, const std::string &methodName)