CMS 3D CMS Logo

EDProducerAdaptorBase.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: FWCore/Framework
4 // Class : edm::stream::EDProducerAdaptorBase
5 //
6 // Implementation:
7 // [Notes on implementation]
8 //
9 // Original Author: Chris Jones
10 // Created: Fri, 02 Aug 2013 21:43:44 GMT
11 //
12 
13 // system include files
14 
15 // user include files
30 
31 using namespace edm::stream;
32 namespace edm {
33  namespace stream {
34 
35  template <>
37  size_t iTransformIndex) const noexcept {
38  return m_streamModules[0]->transformPrefetch_(iTransformIndex);
39  }
40  template <>
42  edm::BranchDescription const& iBranch) const noexcept {
43  return m_streamModules[0]->transformIndex_(iBranch);
44  }
45  template <>
47  WaitingTaskHolder iTask,
48  size_t iTransformIndex,
49  EventPrincipal const& iEvent,
50  ActivityRegistry* iAct,
52  ServiceWeakToken const& iToken) noexcept {
54  m_streamModules[iEvent.streamID()]->transformAsync_(iTask, iTransformIndex, ev, iAct, iToken);
55  }
56 
57  //
58  // constants, enums and typedefs
59  //
60 
61  //
62  // static data member definitions
63  //
64 
65  //
66  // constructors and destructor
67  //
69 
71  ActivityRegistry* act,
72  ModuleCallingContext const* mcc) {
73  EventPrincipal const& ep = info.principal();
74  assert(ep.streamID() < m_streamModules.size());
75  auto mod = m_streamModules[ep.streamID()];
76  Event e(ep, moduleDescription(), mcc);
77  e.setConsumer(mod);
78  e.setProducer(mod, &mod->previousParentage_, &mod->gotBranchIDsFromAcquire_);
79  EventSignalsSentry sentry(act, mcc);
80  ESParentContext parentC(mcc);
81  const EventSetup c{
82  info, static_cast<unsigned int>(Transition::Event), mod->esGetTokenIndices(Transition::Event), parentC};
83  mod->produce(e, c);
84  commit(e, &mod->previousParentageId_);
85  return true;
86  }
87 
89  ActivityRegistry* act,
90  ModuleCallingContext const* mcc,
92  EventPrincipal const& ep = info.principal();
93  assert(ep.streamID() < m_streamModules.size());
94  auto mod = m_streamModules[ep.streamID()];
95  Event e(ep, moduleDescription(), mcc);
96  e.setConsumer(mod);
97  e.setProducerForAcquire(mod, nullptr, mod->gotBranchIDsFromAcquire_);
98  EventAcquireSignalsSentry sentry(act, mcc);
99  ESParentContext parentC(mcc);
100  const EventSetup c{
101  info, static_cast<unsigned int>(Transition::Event), mod->esGetTokenIndices(Transition::Event), parentC};
102  mod->doAcquire_(e, c, holder);
103  }
104 
106  } // namespace stream
107 } // namespace edm
static const TGPicture * info(bool iBackgroundIsBlack)
unsigned int ProductResolverIndex
void doAcquire(EventTransitionInfo const &, ActivityRegistry *, ModuleCallingContext const *, WaitingTaskWithArenaHolder &)
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t stream
assert(be >=bs)
int iEvent
Definition: GenABIO.cc:224
void doTransformAsync(WaitingTaskHolder iTask, size_t iTransformIndex, EventPrincipal const &iEvent, ActivityRegistry *, ModuleCallingContext, ServiceWeakToken const &) noexcept
ProductResolverIndex transformPrefetch_(size_t iTransformIndex) const noexcept
bool doEvent(EventTransitionInfo const &, ActivityRegistry *, ModuleCallingContext const *)
size_t transformIndex_(edm::BranchDescription const &iBranch) const noexcept
HLT enums.
T mod(const T &a, const T &b)
Definition: ecalDccMap.h:4