51 : m_tscKey( iConfig.getParameter<
std::
string> (
"tscKey") ),
52 m_ignoreTriggerKey( iConfig.getParameter<bool> (
"ignoreTriggerKey") ),
53 m_logKeys( iConfig.getParameter<bool>(
"logKeys" ) ),
54 m_logTransactions( iConfig.getParameter<bool>(
"logTransactions" ) ),
55 m_forceUpdate( iConfig.getParameter<bool>(
"forceUpdate" ) )
58 typedef std::vector<edm::ParameterSet> ToSave;
60 for (ToSave::const_iterator it = toSave.begin (); it != toSave.end (); it++)
94 <<
"Problem getting last L1TriggerKeyList" ;
97 unsigned long long run = iEvent.
id().
run() ;
101 bool triggerKeyIOVUpdated =
true ;
104 std::stringstream ss ;
107 bool logRecords =
true ;
114 <<
"Object key for L1TriggerKey@L1TriggerKeyRcd: " 122 triggerKeyIOVUpdated =
134 replace( tmpKey.begin(), tmpKey.end(),
' ',
'?' ) ;
135 log +=
" tscKey=" + tmpKey ;
152 std::vector<std::string >::const_iterator
154 std::vector<std::string >::const_iterator
157 for( ; recordTypeItr != recordTypeEnd ; ++recordTypeItr )
159 recordTypeToKeyMap.insert(
160 std::make_pair( *recordTypeItr,
m_tscKey ) ) ;
171 L1TriggerKey::RecordToKey::const_iterator itr =
172 recordTypeToKeyMap.begin() ;
173 L1TriggerKey::RecordToKey::const_iterator
end =
174 recordTypeToKeyMap.end() ;
176 for( ; itr !=
end ; ++itr )
182 0, recordType.find_first_of(
"@") ) ;
189 replace( tmpKey.begin(), tmpKey.end(),
' ',
'?' ) ;
197 <<
"L1CondDBIOVWriter: null object key for " 198 << recordType <<
"; skipping this record." ;
205 << recordType <<
": " << objectKey ;
209 if( payloadToken.empty() )
212 <<
"L1CondDBIOVWriter: empty payload token for " +
213 recordType +
", key " + objectKey ;
215 throwException =
true ;
persistency::Exception Exception
T getParameter(std::string const &) const
std::map< std::string, std::string > RecordToKey
static const std::string kNullKey
def replace(string, replacements)
std::vector< std::string > m_recordTypes
virtual void analyze(const edm::Event &, const edm::EventSetup &)
const RecordToKey & recordToKeyMap() const
bool fillLastTriggerKeyList(L1TriggerKeyList &output)
L1CondDBIOVWriter(const edm::ParameterSet &)
void readObject(const std::string &payloadToken, T &outputObject)
std::string token(const std::string &tscKey) const
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)