50 : m_tscKey(iConfig.getParameter<
std::
string>(
"tscKey")),
51 m_ignoreTriggerKey(iConfig.getParameter<
bool>(
"ignoreTriggerKey")),
52 m_logKeys(iConfig.getParameter<
bool>(
"logKeys")),
53 m_logTransactions(iConfig.getParameter<
bool>(
"logTransactions")),
54 m_forceUpdate(iConfig.getParameter<
bool>(
"forceUpdate")) {
56 typedef std::vector<edm::ParameterSet> ToSave;
58 for (ToSave::const_iterator
it = toSave.begin();
it != toSave.end();
it++) {
83 edm::LogError(
"L1-O2O") <<
"Problem getting last L1TriggerKeyList";
86 unsigned long long run =
iEvent.id().run();
90 bool triggerKeyIOVUpdated =
true;
96 bool logRecords =
true;
113 recordTypeToKeyMap =
key.recordToKeyMap();
118 replace(tmpKey.begin(), tmpKey.end(),
' ',
'?');
119 log +=
" tscKey=" + tmpKey;
127 recordTypeToKeyMap = esKey->recordToKeyMap();
130 std::vector<std::string>::const_iterator recordTypeItr =
m_recordTypes.begin();
131 std::vector<std::string>::const_iterator recordTypeEnd =
m_recordTypes.end();
133 for (; recordTypeItr != recordTypeEnd; ++recordTypeItr) {
134 recordTypeToKeyMap.insert(std::make_pair(*recordTypeItr,
m_tscKey));
144 L1TriggerKey::RecordToKey::const_iterator itr = recordTypeToKeyMap.begin();
145 L1TriggerKey::RecordToKey::const_iterator
end = recordTypeToKeyMap.end();
147 for (; itr !=
end; ++itr) {
157 replace(tmpKey.begin(), tmpKey.end(),
' ',
'?');
163 edm::LogVerbatim(
"L1-O2O") <<
"L1CondDBIOVWriter: null object key for " << recordType
164 <<
"; skipping this record.";
167 edm::LogVerbatim(
"L1-O2O") <<
"Object key for " << recordType <<
": " << objectKey;
170 if (payloadToken.empty()) {
171 edm::LogVerbatim(
"L1-O2O") <<
"L1CondDBIOVWriter: empty payload token for " + recordType +
", key " +
persistency::Exception Exception
Log< level::Info, true > LogVerbatim
std::vector< std::string > m_recordTypes
T getParameter(std::string const &) const
std::map< std::string, std::string > RecordToKey
static const std::string kNullKey
def replace(string, replacements)
edm::ESGetToken< L1TriggerKey, L1TriggerKeyRcd > l1TriggerKeyToken_
std::string token(const std::string &tscKey) const
Log< level::Error, false > LogError
~L1CondDBIOVWriter() override
key
prepare the HTCondor submission files and eventually submit them
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
bool fillLastTriggerKeyList(L1TriggerKeyList &output)
L1CondDBIOVWriter(const edm::ParameterSet &)
void readObject(const std::string &payloadToken, T &outputObject)
void analyze(const edm::Event &, const edm::EventSetup &) override
bool updateIOV(const std::string &esRecordName, const std::string &payloadToken, edm::RunNumber_t sinceRun, bool logTransactions=false)
void throwException(const std::string &message, const std::string &methodName)