49 : m_tscKey( iConfig.getParameter<std::
string> (
"tscKey") ),
50 m_ignoreTriggerKey( iConfig.getParameter<bool> (
"ignoreTriggerKey") ),
51 m_logKeys( iConfig.getParameter<bool>(
"logKeys" ) ),
52 m_logTransactions( iConfig.getParameter<bool>(
"logTransactions" ) ),
53 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++)
89 if( !dataWriter.fillLastTriggerKeyList( keyList ) )
92 <<
"Problem getting last L1TriggerKeyList" ;
95 unsigned long long run = iEvent.
id().
run() ;
99 bool triggerKeyIOVUpdated =
true ;
102 std::stringstream ss ;
105 bool logRecords =
true ;
112 <<
"Object key for L1TriggerKey@L1TriggerKeyRcd: "
120 triggerKeyIOVUpdated =
132 replace( tmpKey.begin(), tmpKey.end(),
' ',
'?' ) ;
133 log +=
" tscKey=" + tmpKey ;
145 recordTypeToKeyMap = esKey->recordToKeyMap() ;
150 std::vector<std::string >::const_iterator
152 std::vector<std::string >::const_iterator
155 for( ; recordTypeItr != recordTypeEnd ; ++recordTypeItr )
157 recordTypeToKeyMap.insert(
158 std::make_pair( *recordTypeItr,
m_tscKey ) ) ;
169 L1TriggerKey::RecordToKey::const_iterator itr =
170 recordTypeToKeyMap.begin() ;
171 L1TriggerKey::RecordToKey::const_iterator
end =
172 recordTypeToKeyMap.end() ;
174 for( ; itr !=
end ; ++itr )
180 0, recordType.find_first_of(
"@") ) ;
187 replace( tmpKey.begin(), tmpKey.end(),
' ',
'?' ) ;
195 <<
"L1CondDBIOVWriter: null object key for "
196 << recordType <<
"; skipping this record." ;
203 << recordType <<
": " << objectKey ;
205 std::string payloadToken = keyList.token( recordType,
207 if( payloadToken.empty() )
210 <<
"L1CondDBIOVWriter: empty payload token for " +
211 recordType +
", key " + objectKey ;
T getParameter(std::string const &) const
std::map< std::string, std::string > RecordToKey
static const std::string kNullKey
std::vector< std::string > m_recordTypes
virtual void analyze(const edm::Event &, const edm::EventSetup &)
const RecordToKey & recordToKeyMap() const
L1CondDBIOVWriter(const edm::ParameterSet &)
void readObject(const std::string &payloadToken, T &outputObject)
volatile std::atomic< bool > shutdown_flag false
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)