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
28 
29 using namespace edm::stream;
30 namespace edm {
31  namespace stream {
32 
33  //
34  // constants, enums and typedefs
35  //
36 
37  //
38  // static data member definitions
39  //
40 
41  //
42  // constructors and destructor
43  //
45 
47  EventSetupImpl const& ci,
48  ActivityRegistry* act,
49  ModuleCallingContext const* mcc) {
50  assert(ep.streamID() < m_streamModules.size());
51  auto mod = m_streamModules[ep.streamID()];
52  Event e(ep, moduleDescription(), mcc);
53  e.setConsumer(mod);
54  e.setProducer(mod, &mod->previousParentage_, &mod->gotBranchIDsFromAcquire_);
55  EventSignalsSentry sentry(act, mcc);
56  const EventSetup c{ci, static_cast<unsigned int>(Transition::Event), mod->esGetTokenIndices(Transition::Event)};
57  mod->produce(e, c);
58  commit(e, &mod->previousParentageId_);
59  return true;
60  }
61 
63  EventSetupImpl const& ci,
64  ActivityRegistry* act,
65  ModuleCallingContext const* mcc,
67  assert(ep.streamID() < m_streamModules.size());
68  auto mod = m_streamModules[ep.streamID()];
69  Event e(ep, moduleDescription(), mcc);
70  e.setConsumer(mod);
71  e.setProducerForAcquire(mod, nullptr, mod->gotBranchIDsFromAcquire_);
72  EventAcquireSignalsSentry sentry(act, mcc);
73  const EventSetup c{ci, static_cast<unsigned int>(Transition::Event), mod->esGetTokenIndices(Transition::Event)};
74  mod->doAcquire_(e, c, holder);
75  }
76 
78  } // namespace stream
79 } // namespace edm
void setProducerForAcquire(ProducerBase const *iProd, std::vector< BranchID > *previousParentage, std::vector< BranchID > &gotBranchIDsFromAcquire)
Definition: Event.cc:81
void setConsumer(EDConsumerBase const *iConsumer)
Definition: Event.cc:37
bool doEvent(EventPrincipal const &, EventSetupImpl const &, ActivityRegistry *, ModuleCallingContext const *)
StreamID streamID() const
void setProducer(ProducerBase const *iProd, std::vector< BranchID > *previousParentage, std::vector< BranchID > *gotBranchIDsFromAcquire=0)
Definition: Event.cc:55
void doAcquire(EventPrincipal const &, EventSetupImpl const &, ActivityRegistry *, ModuleCallingContext const *, WaitingTaskWithArenaHolder &)
HLT enums.
T mod(const T &a, const T &b)
Definition: ecalDccMap.h:4