CMS 3D CMS Logo

DelayedReader.cc
Go to the documentation of this file.
6 
7 #include <mutex>
8 #include <cassert>
9 /*----------------------------------------------------------------------
10 
11 
12 ----------------------------------------------------------------------*/
13 
14 
15 namespace edm {
17 
18  std::unique_ptr<WrapperBase>
20  EDProductGetter const* ep,
21  ModuleCallingContext const* mcc) {
22 
23  auto preSignal = preEventReadFromSourceSignal();
24  if(mcc and preSignal) {
25  preSignal->emit(*(mcc->getStreamContext()),*mcc);
26  }
27  auto postSignal = postEventReadFromSourceSignal();
28 
29  auto sentryCall = [&postSignal]( ModuleCallingContext const* iContext) {
30  if(postSignal) {
31  postSignal->emit(*(iContext->getStreamContext()),*iContext);
32  }
33  };
34  std::unique_ptr<ModuleCallingContext const, decltype(sentryCall)> sentry(mcc, sentryCall);
35 
36  return getProduct_(k, ep);
37  }
38 
39  std::pair<SharedResourcesAcquirer*, std::recursive_mutex*>
41  return std::pair<SharedResourcesAcquirer*, std::recursive_mutex*>(nullptr, nullptr);
42  }
43 }
std::unique_ptr< WrapperBase > getProduct(BranchKey const &k, EDProductGetter const *ep, ModuleCallingContext const *mcc=nullptr)
StreamContext const * getStreamContext() const
virtual ~DelayedReader()
virtual std::unique_ptr< WrapperBase > getProduct_(BranchKey const &k, EDProductGetter const *ep)=0
virtual signalslot::Signal< void(StreamContext const &, ModuleCallingContext const &)> const * postEventReadFromSourceSignal() const =0
virtual signalslot::Signal< void(StreamContext const &, ModuleCallingContext const &)> const * preEventReadFromSourceSignal() const =0
int k[5][pyjets_maxn]
HLT enums.
virtual std::pair< SharedResourcesAcquirer *, std::recursive_mutex * > sharedResources_() const