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  iRecord.activityRegistry()->preESModuleSignal_.emit(iRecord.key(), context);
43  struct EndGuard {
44  EndGuard(EventSetupRecordImpl const& iRecord, ESModuleCallingContext const& iContext)
45  : record_{iRecord}, context_{iContext} {}
46  ~EndGuard() { record_.activityRegistry()->postESModuleSignal_.emit(record_.key(), context_); }
47  EventSetupRecordImpl const& record_;
48  ESModuleCallingContext const& context_;
49  } guardAR(iRecord, context);
50  try {
51  convertException::wrap([&] { prefetch(iKey, EventSetupRecordDetails(&iRecord)); });
52  } catch (cms::Exception& iException) {
53  iException.addContext(fmt::format(
54  "Retrieving data product {} '{}' in record {}", iKey.type().name(), iKey.name().value(), iRecord.key().name()));
55  exceptionContext(iException, context);
56  throw;
57  }
58 }
59 
60 //
61 // const member functions
62 //
63 
64 //
65 // static member functions
66 //
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