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++)
50 if( !dataWriter.fillLastTriggerKeyList( keyList ) )
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 ;
75 <<
"Object key for L1TriggerKeyExt@L1TriggerKeyExtRcd: "
83 triggerKeyIOVUpdated =
95 replace( tmpKey.begin(), tmpKey.end(),
' ',
'?' ) ;
96 log +=
" tscKey:rsKey=" + tmpKey ;
108 recordTypeToKeyMap = esKey->recordToKeyMap() ;
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 ;
168 std::string payloadToken = keyList.token( recordType,
170 if( payloadToken.empty() )
173 <<
"L1CondDBIOVWriterExt: empty payload token for " +
174 recordType +
", key " + objectKey ;
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
virtual void analyze(const edm::Event &, const edm::EventSetup &)
static const std::string kNullKey
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)
std::vector< std::string > m_recordTypes
string key
FastSim: produces sample of signal events, overlayed with premixed minbias events.
std::map< std::string, std::string > RecordToKey
std::string m_tscKey
l1t::DataWriter m_writer ;
l1t::DataWriterExt m_writer
volatile std::atomic< bool > shutdown_flag false
void throwException(const std::string &message, const std::string &methodName)