CMS 3D CMS Logo

ESSourceProductResolverBase.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: FWCore/Framework
4 // Class : __class__
5 //
6 // Implementation:
7 // [Notes on implementation]
8 //
9 // Original Author: __author__
10 // Created: __date__
11 //
12 
13 // system include files
14 #include <fmt/format.h>
15 
16 // user include files
22 
23 namespace edm {
24  void exceptionContext(cms::Exception&, ESModuleCallingContext const&);
25 }
26 
27 //
28 // member functions
29 //
30 
32  m_waitingList.add(std::move(iTask));
33  bool expected = false;
34  return m_prefetching.compare_exchange_strong(expected, true);
35 }
36 
39  edm::eventsetup::DataKey const& iKey,
40  edm::ESParentContext const& iParent) {
42  providerDescription(), reinterpret_cast<std::uintptr_t>(this), ESModuleCallingContext::State::kRunning, iParent);
43  iRecord.activityRegistry()->preESModuleSignal_.emit(iRecord.key(), context);
44  struct EndGuard {
45  EndGuard(EventSetupRecordImpl const& iRecord, ESModuleCallingContext const& iContext)
46  : record_{iRecord}, context_{iContext} {}
47  ~EndGuard() { record_.activityRegistry()->postESModuleSignal_.emit(record_.key(), context_); }
48  EventSetupRecordImpl const& record_;
49  ESModuleCallingContext const& context_;
50  } guardAR(iRecord, context);
51  try {
52  convertException::wrap([&] { prefetch(iKey, EventSetupRecordDetails(&iRecord)); });
53  } catch (cms::Exception& iException) {
54  iException.addContext(fmt::format(
55  "Retrieving data product {} '{}' in record {}", iKey.type().name(), iKey.name().value(), iRecord.key().name()));
56  exceptionContext(iException, context);
57  throw;
58  }
59 }
60 
61 //
62 // const member functions
63 //
64 
65 //
66 // static member functions
67 //
void exceptionContext(cms::Exception &, ESModuleCallingContext const &)
void doPrefetchAndSignals(edm::eventsetup::EventSetupRecordImpl const &, edm::eventsetup::DataKey const &iKey, edm::ESParentContext const &)
void emit(Args &&... args) const
Definition: Signal.h:48
void add(oneapi::tbb::task_group *, WaitingTask *)
Adds task to the waiting list.
const TypeTag & type() const
Definition: DataKey.h:52
EventSetupRecordKey const & key() const
void addContext(std::string const &context)
Definition: Exception.cc:169
PreESModule preESModuleSignal_
HLT enums.
auto wrap(F iFunc) -> decltype(iFunc())
const NameTag & name() const
Definition: DataKey.h:53
def move(src, dest)
Definition: eostools.py:511
ActivityRegistry const * activityRegistry() const noexcept
const char * value() const
Definition: DataKeyTags.h:39