|
11 | 11 | // |
12 | 12 |
|
13 | 13 | // system include files |
| 14 | +#include <algorithm> |
14 | 15 | #include <cassert> |
| 16 | +#include <iterator> |
15 | 17 | #include <sstream> |
| 18 | +#include <utility> |
16 | 19 |
|
17 | 20 | // user include files |
18 | 21 | #include "FWCore/Framework/interface/EventSetupRecordImpl.h" |
19 | 22 | #include "FWCore/Framework/interface/DataProxy.h" |
20 | 23 | #include "FWCore/Framework/interface/ComponentDescription.h" |
21 | 24 | #include "FWCore/ServiceRegistry/interface/ESParentContext.h" |
22 | 25 |
|
23 | | -#include "FWCore/Concurrency/interface/WaitingTaskHolder.h" |
24 | 26 | #include "FWCore/Utilities/interface/ConvertException.h" |
25 | 27 | #include "FWCore/Utilities/interface/Exception.h" |
26 | 28 |
|
@@ -179,60 +181,6 @@ namespace edm { |
179 | 181 | } |
180 | 182 | } |
181 | 183 |
|
182 | | - const void* EventSetupRecordImpl::getFromProxy(DataKey const& iKey, |
183 | | - const ComponentDescription*& iDesc, |
184 | | - bool iTransientAccessOnly, |
185 | | - ESParentContext const& iParent, |
186 | | - EventSetupImpl const* iEventSetupImpl) const { |
187 | | - const DataProxy* proxy = this->find(iKey); |
188 | | - |
189 | | - const void* hold = nullptr; |
190 | | - |
191 | | - if (nullptr != proxy) { |
192 | | - try { |
193 | | - convertException::wrap([&]() { |
194 | | - hold = proxy->get(*this, iKey, iTransientAccessOnly, activityRegistry_, iEventSetupImpl, iParent); |
195 | | - iDesc = proxy->providerDescription(); |
196 | | - }); |
197 | | - } catch (cms::Exception& e) { |
198 | | - addTraceInfoToCmsException(e, iKey.name().value(), proxy->providerDescription(), iKey); |
199 | | - //NOTE: the above function can't do the 'throw' since it causes the C++ class type |
200 | | - // of the throw to be changed, a 'rethrow' does not have that problem |
201 | | - throw; |
202 | | - } |
203 | | - } |
204 | | - return hold; |
205 | | - } |
206 | | - |
207 | | - const void* EventSetupRecordImpl::getFromProxy(ESProxyIndex iProxyIndex, |
208 | | - bool iTransientAccessOnly, |
209 | | - const ComponentDescription*& iDesc, |
210 | | - DataKey const*& oGottenKey, |
211 | | - ESParentContext const& iParent, |
212 | | - EventSetupImpl const* iEventSetupImpl) const { |
213 | | - if (iProxyIndex.value() >= static_cast<ESProxyIndex::Value_t>(proxies_.size())) { |
214 | | - return nullptr; |
215 | | - } |
216 | | - |
217 | | - const DataProxy* proxy = proxies_[iProxyIndex.value()]; |
218 | | - assert(nullptr != proxy); |
219 | | - iDesc = proxy->providerDescription(); |
220 | | - |
221 | | - const void* hold = nullptr; |
222 | | - |
223 | | - auto const& key = keysForProxies_[iProxyIndex.value()]; |
224 | | - oGottenKey = &key; |
225 | | - try { |
226 | | - convertException::wrap([&]() { |
227 | | - hold = proxy->get(*this, key, iTransientAccessOnly, activityRegistry_, iEventSetupImpl, iParent); |
228 | | - }); |
229 | | - } catch (cms::Exception& e) { |
230 | | - addTraceInfoToCmsException(e, key.name().value(), proxy->providerDescription(), key); |
231 | | - throw; |
232 | | - } |
233 | | - return hold; |
234 | | - } |
235 | | - |
236 | 184 | void const* EventSetupRecordImpl::getFromProxyAfterPrefetch(ESProxyIndex iProxyIndex, |
237 | 185 | bool iTransientAccessOnly, |
238 | 186 | ComponentDescription const*& iDesc, |
@@ -298,27 +246,6 @@ namespace edm { |
298 | 246 | oToFill = keysForProxies_; |
299 | 247 | } |
300 | 248 |
|
301 | | - void EventSetupRecordImpl::validate(const ComponentDescription* iDesc, const ESInputTag& iTag) const { |
302 | | - if (iDesc && !iTag.module().empty()) { |
303 | | - bool matched = false; |
304 | | - if (iDesc->label_.empty()) { |
305 | | - matched = iDesc->type_ == iTag.module(); |
306 | | - } else { |
307 | | - matched = iDesc->label_ == iTag.module(); |
308 | | - } |
309 | | - if (!matched) { |
310 | | - throw cms::Exception("EventSetupWrongModule") |
311 | | - << "EventSetup data was retrieved using an ESInputTag with the values\n" |
312 | | - << " moduleLabel = '" << iTag.module() << "'\n" |
313 | | - << " dataLabel = '" << iTag.data() << "'\n" |
314 | | - << "but the data matching the C++ class type and dataLabel comes from module type=" << iDesc->type_ |
315 | | - << " label='" << iDesc->label_ << "'.\n Please either change the ESInputTag's 'module' label to be " |
316 | | - << (iDesc->label_.empty() ? iDesc->type_ : iDesc->label_) << "\n or add the EventSetup module " |
317 | | - << iTag.module() << " to the configuration."; |
318 | | - } |
319 | | - } |
320 | | - } |
321 | | - |
322 | 249 | void EventSetupRecordImpl::addTraceInfoToCmsException(cms::Exception& iException, |
323 | 250 | const char* iName, |
324 | 251 | const ComponentDescription* iDescription, |
|
0 commit comments