44 : m_writeL1TriggerKey(iConfig.getParameter<bool>(
"writeL1TriggerKey")),
45 m_writeConfigData(iConfig.getParameter<bool>(
"writeConfigData")),
46 m_overwriteKeys(iConfig.getParameter<bool>(
"overwriteKeys")),
47 m_logTransactions(iConfig.getParameter<bool>(
"logTransactions")),
48 m_newL1TriggerKeyList(iConfig.getParameter<bool>(
"newL1TriggerKeyList")),
69 edm::LogError(
"L1-O2O") <<
"Problem getting last L1TriggerKeyList";
82 bool triggerKeyOK =
true;
88 triggerKeyOK = oldKeyList.token(
key->tscKey()).
empty();
96 edm::LogVerbatim(
"L1-O2O") <<
"Object key for L1TriggerKeyRcd@L1TriggerKey: " <<
key->tscKey();
108 throw cond::Exception(
"L1CondDBPayloadWriter: TSC key " +
key->tscKey() +
" already in L1TriggerKeyList");
114 L1TriggerKey::RecordToKey::const_iterator it =
key->recordToKeyMap().begin();
115 L1TriggerKey::RecordToKey::const_iterator
end =
key->recordToKeyMap().end();
117 for (; it !=
end; ++it) {
120 edm::LogVerbatim(
"L1-O2O") <<
"L1CondDBPayloadWriter: null object key for " << it->first
121 <<
"; skipping this record.";
124 if (oldKeyList.token(it->first, it->second).empty() ||
m_overwriteKeys) {
126 if (!oldKeyList.token(it->first, it->second).empty()) {
127 edm::LogVerbatim(
"L1-O2O") <<
"*** Overwriting payload: object key for " << it->first <<
": "
130 edm::LogVerbatim(
"L1-O2O") <<
"object key for " << it->first <<
": " << it->second;
143 if (!
token.empty()) {
152 throw cond::Exception(
"L1CondDBPayloadWriter: subsystem key " + it->second +
" for " + it->first +
153 " already in L1TriggerKeyList");
157 edm::LogVerbatim(
"L1-O2O") <<
"L1CondDBPayloadWriter: object key " << it->second <<
" for " << it->first
158 <<
" already in L1TriggerKeyList";
persistency::Exception Exception
Log< level::Info, true > LogVerbatim
static const std::string kNullKey
~L1CondDBPayloadWriter() override
Log< level::Error, false > LogError
tuple key
prepare the HTCondor submission files and eventually submit them
char const * what() const noexceptoverride
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 &)
bool m_newL1TriggerKeyList
edm::ESGetToken< L1TriggerKey, L1TriggerKeyRcd > l1TriggerKeyToken_
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
void throwException(const std::string &message, const std::string &methodName)