11 : m_writeL1TriggerKeyExt(iConfig.getParameter<
bool>(
"writeL1TriggerKeyExt")),
12 m_writeConfigData(iConfig.getParameter<
bool>(
"writeConfigData")),
13 m_overwriteKeys(iConfig.getParameter<
bool>(
"overwriteKeys")),
14 m_logTransactions(iConfig.getParameter<
bool>(
"logTransactions")),
15 m_newL1TriggerKeyListExt(iConfig.getParameter<
bool>(
"newL1TriggerKeyListExt")) {
33 edm::LogError(
"L1-O2O") <<
"Problem getting last L1TriggerKeyListExt";
46 bool triggerKeyOK =
true;
72 throw cond::Exception(
"L1CondDBPayloadWriter: TSC key " + key->
tscKey() +
" already in L1TriggerKeyListExt");
78 L1TriggerKeyExt::RecordToKey::const_iterator it = key->
recordToKeyMap().begin();
81 for (; it !=
end; ++it) {
84 edm::LogVerbatim(
"L1-O2O") <<
"L1CondDBPayloadWriter: null object key for " << it->first
85 <<
"; skipping this record.";
90 if (!oldKeyList.
token(it->first, it->second).empty()) {
91 edm::LogVerbatim(
"L1-O2O") <<
"*** Overwriting payload: object key for " << it->first <<
": " 94 edm::LogVerbatim(
"L1-O2O") <<
"object key for " << it->first <<
": " << it->second;
102 throwException =
true;
107 if (!token.empty()) {
116 throw cond::Exception(
"L1CondDBPayloadWriter: subsystem key " + it->second +
" for " + it->first +
117 " already in L1TriggerKeyListExt");
121 edm::LogVerbatim(
"L1-O2O") <<
"L1CondDBPayloadWriter: object key " << it->second <<
" for " << it->first
122 <<
" already in L1TriggerKeyListExt";
134 if (throwException) {
persistency::Exception Exception
void analyze(const edm::Event &, const edm::EventSetup &) override
bool fillLastTriggerKeyList(L1TriggerKeyListExt &output)
static const std::string kNullKey
char const * what() const override
bool m_newL1TriggerKeyListExt
void writeKeyList(L1TriggerKeyListExt *keyList, edm::RunNumber_t sinceRun=0, bool logTransactions=false)
const RecordToKey & recordToKeyMap() const
l1t::DataWriterExt m_writer
bool m_writeL1TriggerKeyExt
L1CondDBPayloadWriterExt(const edm::ParameterSet &)
std::string writePayload(const edm::EventSetup &setup, const std::string &recordType)
bool addKey(const std::string &tscKey, const std::string &payloadToken, bool overwriteKey=false)
~L1CondDBPayloadWriterExt() override
const std::string & tscKey() const
std::string token(const std::string &tscKey) const
void throwException(const std::string &message, const std::string &methodName)