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 {
38  return m_streamModules[0]->transformPrefetch_(iTransformIndex);
39  }
40  template <>
42  edm::BranchDescription const& iBranch) const {
43  return m_streamModules[0]->transformIndex_(iBranch);
44  }
45  template <>
47  size_t iTransformIndex,
48  EventPrincipal const& iEvent,
50  ModuleCallingContext const* iMCC,
51  ServiceWeakToken const& iToken) {
53  m_streamModules[iEvent.streamID()]->transformAsync_(iTask, iTransformIndex, ev, iToken);
54  }
55 
56  //
57  // constants, enums and typedefs
58  //
59 
60  //
61  // static data member definitions
62  //
63 
64  //
65  // constructors and destructor
66  //
68 
70  ActivityRegistry* act,
71  ModuleCallingContext const* mcc) {
72  EventPrincipal const& ep = info.principal();
73  assert(ep.streamID() < m_streamModules.size());
74  auto mod = m_streamModules[ep.streamID()];
75  Event e(ep, moduleDescription(), mcc);
76  e.setConsumer(mod);
77  e.setProducer(mod, &mod->previousParentage_, &mod->gotBranchIDsFromAcquire_);
78  EventSignalsSentry sentry(act, mcc);
79  ESParentContext parentC(mcc);
80  const EventSetup c{
81  info, static_cast<unsigned int>(Transition::Event), mod->esGetTokenIndices(Transition::Event), parentC};
82  mod->produce(e, c);
83  commit(e, &mod->previousParentageId_);
84  return true;
85  }
86 
88  ActivityRegistry* act,
89  ModuleCallingContext const* mcc,
91  EventPrincipal const& ep = info.principal();
92  assert(ep.streamID() < m_streamModules.size());
93  auto mod = m_streamModules[ep.streamID()];
94  Event e(ep, moduleDescription(), mcc);
95  e.setConsumer(mod);
96  e.setProducerForAcquire(mod, nullptr, mod->gotBranchIDsFromAcquire_);
97  EventAcquireSignalsSentry sentry(act, mcc);
98  ESParentContext parentC(mcc);
99  const EventSetup c{
100  info, static_cast<unsigned int>(Transition::Event), mod->esGetTokenIndices(Transition::Event), parentC};
101  mod->doAcquire_(e, c, holder);
102  }
103 
105  } // namespace stream
106 } // 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 const *, ServiceWeakToken const &)
size_t transformIndex_(edm::BranchDescription const &iBranch) const
bool doEvent(EventTransitionInfo const &, ActivityRegistry *, ModuleCallingContext const *)
ProductResolverIndex transformPrefetch_(size_t iTransformIndex) const
HLT enums.
T mod(const T &a, const T &b)
Definition: ecalDccMap.h:4