48 : m_writeL1TriggerKey(iConfig.getParameter<
bool>(
"writeL1TriggerKey")),
49 m_writeConfigData(iConfig.getParameter<
bool>(
"writeConfigData")),
50 m_overwriteKeys(iConfig.getParameter<
bool>(
"overwriteKeys")),
51 m_logTransactions(iConfig.getParameter<
bool>(
"logTransactions")),
52 m_newL1TriggerKeyList(iConfig.getParameter<
bool>(
"newL1TriggerKeyList")) {
74 edm::LogError(
"L1-O2O") <<
"Problem getting last L1TriggerKeyList";
87 bool triggerKeyOK =
true;
113 throw cond::Exception(
"L1CondDBPayloadWriter: TSC key " + key->
tscKey() +
" already in L1TriggerKeyList");
119 L1TriggerKey::RecordToKey::const_iterator it = key->
recordToKeyMap().begin();
122 for (; it !=
end; ++it) {
125 edm::LogVerbatim(
"L1-O2O") <<
"L1CondDBPayloadWriter: null object key for " << it->first
126 <<
"; skipping this record.";
131 if (!oldKeyList.
token(it->first, it->second).empty()) {
132 edm::LogVerbatim(
"L1-O2O") <<
"*** Overwriting payload: object key for " << it->first <<
": " 135 edm::LogVerbatim(
"L1-O2O") <<
"object key for " << it->first <<
": " << it->second;
143 throwException =
true;
148 if (!token.empty()) {
157 throw cond::Exception(
"L1CondDBPayloadWriter: subsystem key " + it->second +
" for " + it->first +
158 " already in L1TriggerKeyList");
162 edm::LogVerbatim(
"L1-O2O") <<
"L1CondDBPayloadWriter: object key " << it->second <<
" for " << it->first
163 <<
" already in L1TriggerKeyList";
175 if (throwException) {
persistency::Exception Exception
static const std::string kNullKey
~L1CondDBPayloadWriter() override
char const * what() const override
const RecordToKey & recordToKeyMap() const
std::string writePayload(const edm::EventSetup &setup, const std::string &recordType)
void writeKeyList(L1TriggerKeyList *keyList, edm::RunNumber_t sinceRun=0, bool logTransactions=false)
bool fillLastTriggerKeyList(L1TriggerKeyList &output)
void analyze(const edm::Event &, const edm::EventSetup &) override
L1CondDBPayloadWriter(const edm::ParameterSet &)
std::string token(const std::string &tscKey) const
const std::string & tscKey() const
bool m_newL1TriggerKeyList
bool addKey(const std::string &tscKey, const std::string &payloadToken, bool overwriteKey=false)
void throwException(const std::string &message, const std::string &methodName)