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")) {
71 edm::LogError(
"L1-O2O") <<
"Problem getting last L1TriggerKeyList";
84 bool triggerKeyOK =
true;
90 triggerKeyOK = oldKeyList.token(
key->tscKey()).
empty();
98 edm::LogVerbatim(
"L1-O2O") <<
"Object key for L1TriggerKeyRcd@L1TriggerKey: " <<
key->tscKey();
110 throw cond::Exception(
"L1CondDBPayloadWriter: TSC key " +
key->tscKey() +
" already in L1TriggerKeyList");
116 L1TriggerKey::RecordToKey::const_iterator it =
key->recordToKeyMap().begin();
117 L1TriggerKey::RecordToKey::const_iterator
end =
key->recordToKeyMap().end();
119 for (; it !=
end; ++it) {
122 edm::LogVerbatim(
"L1-O2O") <<
"L1CondDBPayloadWriter: null object key for " << it->first
123 <<
"; skipping this record.";
126 if (oldKeyList.token(it->first, it->second).empty() ||
m_overwriteKeys) {
128 if (!oldKeyList.token(it->first, it->second).empty()) {
129 edm::LogVerbatim(
"L1-O2O") <<
"*** Overwriting payload: object key for " << it->first <<
": "
132 edm::LogVerbatim(
"L1-O2O") <<
"object key for " << it->first <<
": " << it->second;
145 if (!
token.empty()) {
154 throw cond::Exception(
"L1CondDBPayloadWriter: subsystem key " + it->second +
" for " + it->first +
155 " already in L1TriggerKeyList");
159 edm::LogVerbatim(
"L1-O2O") <<
"L1CondDBPayloadWriter: object key " << it->second <<
" for " << it->first
160 <<
" 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)