CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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  //
36  // constants, enums and typedefs
37  //
38 
39  //
40  // static data member definitions
41  //
42 
43  //
44  // constructors and destructor
45  //
47 
49  ActivityRegistry* act,
50  ModuleCallingContext const* mcc) {
51  EventPrincipal const& ep = info.principal();
52  assert(ep.streamID() < m_streamModules.size());
53  auto mod = m_streamModules[ep.streamID()];
54  Event e(ep, moduleDescription(), mcc);
55  e.setConsumer(mod);
56  e.setProducer(mod, &mod->previousParentage_, &mod->gotBranchIDsFromAcquire_);
57  EventSignalsSentry sentry(act, mcc);
58  ESParentContext parentC(mcc);
59  const EventSetup c{
60  info, static_cast<unsigned int>(Transition::Event), mod->esGetTokenIndices(Transition::Event), parentC, false};
61  mod->produce(e, c);
62  commit(e, &mod->previousParentageId_);
63  return true;
64  }
65 
67  ActivityRegistry* act,
68  ModuleCallingContext const* mcc,
70  EventPrincipal const& ep = info.principal();
71  assert(ep.streamID() < m_streamModules.size());
72  auto mod = m_streamModules[ep.streamID()];
73  Event e(ep, moduleDescription(), mcc);
74  e.setConsumer(mod);
75  e.setProducerForAcquire(mod, nullptr, mod->gotBranchIDsFromAcquire_);
76  EventAcquireSignalsSentry sentry(act, mcc);
77  ESParentContext parentC(mcc);
78  const EventSetup c{
79  info, static_cast<unsigned int>(Transition::Event), mod->esGetTokenIndices(Transition::Event), parentC, false};
80  mod->doAcquire_(e, c, holder);
81  }
82 
84  } // namespace stream
85 } // namespace edm
void setProducerForAcquire(ProducerBase const *iProd, std::vector< BranchID > *previousParentage, std::vector< BranchID > &gotBranchIDsFromAcquire)
Definition: Event.cc:94
static const TGPicture * info(bool iBackgroundIsBlack)
const edm::EventSetup & c
EventPrincipal & principal()
void doAcquire(EventTransitionInfo const &, ActivityRegistry *, ModuleCallingContext const *, WaitingTaskWithArenaHolder &)
void setConsumer(EDConsumerBase const *iConsumer)
Definition: Event.cc:39
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t stream
assert(be >=bs)
void setProducer(ProducerBase const *iProd, std::vector< BranchID > *previousParentage, std::vector< BranchID > *gotBranchIDsFromAcquire=nullptr)
Definition: Event.cc:68
StreamID streamID() const
bool doEvent(EventTransitionInfo const &, ActivityRegistry *, ModuleCallingContext const *)
T mod(const T &a, const T &b)
Definition: ecalDccMap.h:4