14 : m_tscKey( iConfig.getParameter<
std::
string> (
"tscKey") ),
15 m_rsKey( iConfig.getParameter<
std::
string> (
"rsKey") ),
16 m_ignoreTriggerKey( iConfig.getParameter<
bool> (
"ignoreTriggerKey") ),
17 m_logKeys( iConfig.getParameter<
bool>(
"logKeys" ) ),
18 m_logTransactions( iConfig.getParameter<
bool>(
"logTransactions" ) ),
19 m_forceUpdate( iConfig.getParameter<
bool>(
"forceUpdate" ) )
22 typedef std::vector<edm::ParameterSet> ToSave;
24 for (ToSave::const_iterator it = toSave.begin (); it != toSave.end (); it++)
53 <<
"Problem getting last L1TriggerKeyListExt" ;
56 unsigned long long run = iEvent.
id().
run() ;
60 bool triggerKeyIOVUpdated =
true ;
63 std::stringstream ss ;
66 bool logRecords =
true ;
72 if( !
m_tscKey.empty() && !m_rsKey.empty() )
75 <<
"Object key for L1TriggerKeyExt@L1TriggerKeyExtRcd: " 83 triggerKeyIOVUpdated =
95 replace( tmpKey.begin(), tmpKey.end(),
' ',
'?' ) ;
96 log +=
" tscKey:rsKey=" + tmpKey ;
113 std::vector<std::string >::const_iterator
115 std::vector<std::string >::const_iterator
118 for( ; recordTypeItr != recordTypeEnd ; ++recordTypeItr )
120 recordTypeToKeyMap.insert(
121 std::make_pair( *recordTypeItr, m_Key ) ) ;
132 L1TriggerKeyExt::RecordToKey::const_iterator itr =
133 recordTypeToKeyMap.begin() ;
134 L1TriggerKeyExt::RecordToKey::const_iterator
end =
135 recordTypeToKeyMap.end() ;
137 for( ; itr !=
end ; ++itr )
143 0, recordType.find_first_of(
"@") ) ;
150 replace( tmpKey.begin(), tmpKey.end(),
' ',
'?' ) ;
158 <<
"L1CondDBIOVWriterExt: null object key for " 159 << recordType <<
"; skipping this record." ;
166 << recordType <<
": " << objectKey ;
170 if( payloadToken.empty() )
173 <<
"L1CondDBIOVWriterExt: empty payload token for " +
174 recordType +
", key " + objectKey ;
176 throwException =
true ;
196 throw cond::Exception(
"L1CondDBIOVWriterExt: empty payload tokens" ) ;
persistency::Exception Exception
void readObject(const std::string &payloadToken, T &outputObject)
T getParameter(std::string const &) const
bool fillLastTriggerKeyList(L1TriggerKeyListExt &output)
static const std::string kNullKey
def replace(string, replacements)
L1CondDBIOVWriterExt(const edm::ParameterSet &)
const RecordToKey & recordToKeyMap() const
bool updateIOV(const std::string &esRecordName, const std::string &payloadToken, edm::RunNumber_t sinceRun, bool logTransactions=false)
void analyze(const edm::Event &, const edm::EventSetup &) override
std::vector< std::string > m_recordTypes
~L1CondDBIOVWriterExt() override
std::map< std::string, std::string > RecordToKey
std::string m_tscKey
l1t::DataWriter m_writer ;
l1t::DataWriterExt m_writer
std::string token(const std::string &tscKey) const
void throwException(const std::string &message, const std::string &methodName)