CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Friends
edm::global::EDProducerBase Class Referenceabstract

#include <EDProducerBase.h>

Inheritance diagram for edm::global::EDProducerBase:
edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper edm::global::EDProducer< T > edm::global::EDProducer< edm::BeginLuminosityBlockProducer > edm::global::EDProducer< edm::BeginRunProducer > edm::global::EDProducer< edm::EndLuminosityBlockProducer > edm::global::EDProducer< edm::EndLuminosityBlockProducer, edm::LuminosityBlockCache< Sums > > edm::global::EDProducer< edm::ExternalWork > edm::global::EDProducer< edm::LuminosityBlockCache< pr::Cache > > edm::global::EDProducer< edm::RunCache< ConvertParticle > > edm::global::EDProducer< edm::RunCache< GEMROMapping > > edm::global::EDProducer< edm::RunCache< IDto3Charge > > edm::global::EDProducer< edm::StreamCache< CSCTriggerPrimitivesBuilder > > edm::global::EDProducer< edm::StreamCache< LumiCacheInfoHolder >, edm::RunCache< DynamicWeightChoice >, edm::RunSummaryCache< CounterMap >, edm::EndRunProducer > edm::global::EDProducer<>

Public Types

typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex >>
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 

Public Member Functions

 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual bool wantsGlobalLuminosityBlocks () const =0
 
virtual bool wantsGlobalRuns () const =0
 
virtual bool wantsStreamLuminosityBlocks () const =0
 
virtual bool wantsStreamRuns () const =0
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
 ~ProducerBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Static Public Member Functions

static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Private Member Functions

virtual void beginJob ()
 
void doAcquire (EventPrincipal const &, EventSetupImpl const &, ActivityRegistry *, ModuleCallingContext const *, WaitingTaskWithArenaHolder &)
 
virtual void doAcquire_ (StreamID, Event const &, edm::EventSetup const &, WaitingTaskWithArenaHolder &)
 
void doBeginJob ()
 
void doBeginLuminosityBlock (LuminosityBlockPrincipal const &lbp, EventSetupImpl const &c, ModuleCallingContext const *)
 
virtual void doBeginLuminosityBlock_ (LuminosityBlock const &lbp, EventSetup const &c)
 
virtual void doBeginLuminosityBlockProduce_ (LuminosityBlock &lbp, EventSetup const &c)
 
virtual void doBeginLuminosityBlockSummary_ (LuminosityBlock const &rp, EventSetup const &c)
 
void doBeginRun (RunPrincipal const &rp, EventSetupImpl const &c, ModuleCallingContext const *)
 
virtual void doBeginRun_ (Run const &rp, EventSetup const &c)
 
virtual void doBeginRunProduce_ (Run &rp, EventSetup const &c)
 
virtual void doBeginRunSummary_ (Run const &rp, EventSetup const &c)
 
void doBeginStream (StreamID id)
 
virtual void doBeginStream_ (StreamID id)
 
void doEndJob ()
 
void doEndLuminosityBlock (LuminosityBlockPrincipal const &lbp, EventSetupImpl const &c, ModuleCallingContext const *)
 
virtual void doEndLuminosityBlock_ (LuminosityBlock const &lb, EventSetup const &c)
 
virtual void doEndLuminosityBlockProduce_ (LuminosityBlock &lbp, EventSetup const &c)
 
virtual void doEndLuminosityBlockSummary_ (LuminosityBlock const &lb, EventSetup const &c)
 
void doEndRun (RunPrincipal const &rp, EventSetupImpl const &c, ModuleCallingContext const *)
 
virtual void doEndRun_ (Run const &rp, EventSetup const &c)
 
virtual void doEndRunProduce_ (Run &rp, EventSetup const &c)
 
virtual void doEndRunSummary_ (Run const &rp, EventSetup const &c)
 
void doEndStream (StreamID id)
 
virtual void doEndStream_ (StreamID id)
 
bool doEvent (EventPrincipal const &, EventSetupImpl const &, ActivityRegistry *, ModuleCallingContext const *)
 
void doPreallocate (PreallocationConfiguration const &)
 
void doRegisterThinnedAssociations (ProductRegistry const &, ThinnedAssociationsHelper &)
 
void doRespondToCloseInputFile (FileBlock const &fb)
 
void doRespondToOpenInputFile (FileBlock const &fb)
 
void doStreamBeginLuminosityBlock (StreamID id, LuminosityBlockPrincipal const &ep, EventSetupImpl const &c, ModuleCallingContext const *)
 
virtual void doStreamBeginLuminosityBlock_ (StreamID id, LuminosityBlock const &lbp, EventSetup const &c)
 
void doStreamBeginRun (StreamID id, RunPrincipal const &ep, EventSetupImpl const &c, ModuleCallingContext const *)
 
virtual void doStreamBeginRun_ (StreamID id, Run const &rp, EventSetup const &c)
 
void doStreamEndLuminosityBlock (StreamID id, LuminosityBlockPrincipal const &ep, EventSetupImpl const &c, ModuleCallingContext const *)
 
virtual void doStreamEndLuminosityBlock_ (StreamID id, LuminosityBlock const &lbp, EventSetup const &c)
 
virtual void doStreamEndLuminosityBlockSummary_ (StreamID id, LuminosityBlock const &lbp, EventSetup const &c)
 
void doStreamEndRun (StreamID id, RunPrincipal const &ep, EventSetupImpl const &c, ModuleCallingContext const *)
 
virtual void doStreamEndRun_ (StreamID id, Run const &rp, EventSetup const &c)
 
virtual void doStreamEndRunSummary_ (StreamID id, Run const &rp, EventSetup const &c)
 
virtual void endJob ()
 
virtual bool hasAccumulator () const
 
virtual bool hasAcquire () const
 
void preActionBeforeRunEventAsync (WaitingTask *iTask, ModuleCallingContext const &iModuleCallingContext, Principal const &iPrincipal) const
 
virtual void preallocate (PreallocationConfiguration const &)
 
virtual void preallocLumis (unsigned int)
 
virtual void preallocStreams (unsigned int)
 
virtual void produce (StreamID, Event &, EventSetup const &) const =0
 
void registerProductsAndCallbacks (EDProducerBase *module, ProductRegistry *reg)
 
void setModuleDescription (ModuleDescription const &md)
 
std::string workerType () const
 

Private Attributes

std::unique_ptr< std::vector< BranchID >[]> gotBranchIDsFromAcquire_
 
ModuleDescription moduleDescription_
 
std::unique_ptr< ParentageID[]> previousParentageIds_
 
std::unique_ptr< std::vector< BranchID >[]> previousParentages_
 

Friends

class edm::GlobalSchedule
 
template<typename T >
class edm::maker::ModuleHolderT
 
template<typename T >
class edm::WorkerT
 

Additional Inherited Members

- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

Definition at line 51 of file EDProducerBase.h.

Member Typedef Documentation

Definition at line 57 of file EDProducerBase.h.

Constructor & Destructor Documentation

EDProducerBase::EDProducerBase ( )

Definition at line 44 of file EDProducerBase.cc.

45  : ProducerBase(),
ModuleDescription moduleDescription_
std::unique_ptr< ParentageID[]> previousParentageIds_
std::unique_ptr< std::vector< BranchID >[]> previousParentages_
std::unique_ptr< std::vector< BranchID >[]> gotBranchIDsFromAcquire_
EDProducerBase::~EDProducerBase ( )
override

Definition at line 51 of file EDProducerBase.cc.

51 {}

Member Function Documentation

const std::string & EDProducerBase::baseType ( )
static

Definition at line 254 of file EDProducerBase.cc.

References edm::global::kBaseType().

254 { return kBaseType; }
static const std::string kBaseType("EDAnalyzer")
virtual void edm::global::EDProducerBase::beginJob ( void  )
inlineprivatevirtual
void EDProducerBase::doAcquire ( EventPrincipal const &  ep,
EventSetupImpl const &  ci,
ActivityRegistry act,
ModuleCallingContext const *  mcc,
WaitingTaskWithArenaHolder holder 
)
private

Definition at line 70 of file EDProducerBase.cc.

References EnergyCorrector::c, doAcquire_(), MillePedeFileConverter_cfg::e, edm::EDConsumerBase::esGetTokenIndices(), edm::Event, gotBranchIDsFromAcquire_, moduleDescription_, edm::Event::setConsumer(), edm::Event::setProducerForAcquire(), edm::Event::streamID(), and edm::StreamID::value().

74  {
75  Event e(ep, moduleDescription_, mcc);
76  e.setConsumer(this);
77  const auto streamIndex = e.streamID().value();
78  e.setProducerForAcquire(this, nullptr, gotBranchIDsFromAcquire_[streamIndex]);
79  EventAcquireSignalsSentry sentry(act, mcc);
80  const EventSetup c{ci, static_cast<unsigned int>(Transition::Event), esGetTokenIndices(Transition::Event)};
81  this->doAcquire_(e.streamID(), e, c, holder);
82  }
ModuleDescription moduleDescription_
virtual void doAcquire_(StreamID, Event const &, edm::EventSetup const &, WaitingTaskWithArenaHolder &)
std::unique_ptr< std::vector< BranchID >[]> gotBranchIDsFromAcquire_
ESProxyIndex const * esGetTokenIndices(edm::Transition iTrans) const
void EDProducerBase::doAcquire_ ( StreamID  ,
Event const &  ,
edm::EventSetup const &  ,
WaitingTaskWithArenaHolder  
)
privatevirtual

Definition at line 242 of file EDProducerBase.cc.

Referenced by doAcquire().

242 {}
void EDProducerBase::doBeginJob ( )
private

Definition at line 96 of file EDProducerBase.cc.

References beginJob().

96 { this->beginJob(); }
void EDProducerBase::doBeginLuminosityBlock ( LuminosityBlockPrincipal const &  lbp,
EventSetupImpl const &  c,
ModuleCallingContext const *  mcc 
)
private

Definition at line 124 of file EDProducerBase.cc.

References edm::BeginLuminosityBlock, EnergyCorrector::c, edm::ProducerBase::commit_(), doBeginLuminosityBlock_(), doBeginLuminosityBlockProduce_(), doBeginLuminosityBlockSummary_(), edm::EDConsumerBase::esGetTokenIndices(), moduleDescription_, edm::LuminosityBlock::setConsumer(), and edm::LuminosityBlock::setProducer().

126  {
127  LuminosityBlock lb(lbp, moduleDescription_, mcc, false);
128  lb.setConsumer(this);
129  LuminosityBlock const& cnstLb = lb;
130  const EventSetup c{ci,
131  static_cast<unsigned int>(Transition::BeginLuminosityBlock),
133  this->doBeginLuminosityBlock_(cnstLb, c);
134  this->doBeginLuminosityBlockSummary_(cnstLb, c);
135  lb.setProducer(this);
137  commit_(lb);
138  }
ModuleDescription moduleDescription_
virtual void doBeginLuminosityBlockProduce_(LuminosityBlock &lbp, EventSetup const &c)
virtual void doBeginLuminosityBlockSummary_(LuminosityBlock const &rp, EventSetup const &c)
void commit_(P &iPrincipal)
Definition: ProducerBase.h:111
virtual void doBeginLuminosityBlock_(LuminosityBlock const &lbp, EventSetup const &c)
ESProxyIndex const * esGetTokenIndices(edm::Transition iTrans) const
void EDProducerBase::doBeginLuminosityBlock_ ( LuminosityBlock const &  lbp,
EventSetup const &  c 
)
privatevirtual

Definition at line 232 of file EDProducerBase.cc.

Referenced by doBeginLuminosityBlock().

232 {}
void EDProducerBase::doBeginLuminosityBlockProduce_ ( LuminosityBlock lbp,
EventSetup const &  c 
)
privatevirtual

Definition at line 239 of file EDProducerBase.cc.

Referenced by doBeginLuminosityBlock().

239 {}
void EDProducerBase::doBeginLuminosityBlockSummary_ ( LuminosityBlock const &  rp,
EventSetup const &  c 
)
privatevirtual

Definition at line 234 of file EDProducerBase.cc.

Referenced by doBeginLuminosityBlock().

234 {}
void EDProducerBase::doBeginRun ( RunPrincipal const &  rp,
EventSetupImpl const &  c,
ModuleCallingContext const *  mcc 
)
private

Definition at line 100 of file EDProducerBase.cc.

References edm::BeginRun, EnergyCorrector::c, edm::ProducerBase::commit_(), doBeginRun_(), doBeginRunProduce_(), doBeginRunSummary_(), edm::EDConsumerBase::esGetTokenIndices(), moduleDescription_, alignCSCRings::r, edm::Run::setConsumer(), and edm::Run::setProducer().

100  {
101  Run r(rp, moduleDescription_, mcc, false);
102  r.setConsumer(this);
103  Run const& cnstR = r;
104  const EventSetup c{ci, static_cast<unsigned int>(Transition::BeginRun), esGetTokenIndices(Transition::BeginRun)};
105  this->doBeginRun_(cnstR, c);
106  this->doBeginRunSummary_(cnstR, c);
107  r.setProducer(this);
108  this->doBeginRunProduce_(r, c);
109  commit_(r);
110  }
ModuleDescription moduleDescription_
virtual void doBeginRun_(Run const &rp, EventSetup const &c)
virtual void doBeginRunProduce_(Run &rp, EventSetup const &c)
virtual void doBeginRunSummary_(Run const &rp, EventSetup const &c)
void commit_(P &iPrincipal)
Definition: ProducerBase.h:111
ESProxyIndex const * esGetTokenIndices(edm::Transition iTrans) const
void EDProducerBase::doBeginRun_ ( Run const &  rp,
EventSetup const &  c 
)
privatevirtual

Definition at line 227 of file EDProducerBase.cc.

Referenced by doBeginRun().

227 {}
void EDProducerBase::doBeginRunProduce_ ( Run rp,
EventSetup const &  c 
)
privatevirtual

Definition at line 237 of file EDProducerBase.cc.

Referenced by doBeginRun().

237 {}
void EDProducerBase::doBeginRunSummary_ ( Run const &  rp,
EventSetup const &  c 
)
privatevirtual

Definition at line 229 of file EDProducerBase.cc.

Referenced by doBeginRun().

229 {}
void EDProducerBase::doBeginStream ( StreamID  id)
private

Definition at line 156 of file EDProducerBase.cc.

References doBeginStream_().

156 { doBeginStream_(id); }
virtual void doBeginStream_(StreamID id)
void EDProducerBase::doBeginStream_ ( StreamID  id)
privatevirtual

Definition at line 216 of file EDProducerBase.cc.

Referenced by doBeginStream().

216 {}
void EDProducerBase::doEndJob ( )
private

Definition at line 98 of file EDProducerBase.cc.

References endJob().

98 { this->endJob(); }
void EDProducerBase::doEndLuminosityBlock ( LuminosityBlockPrincipal const &  lbp,
EventSetupImpl const &  c,
ModuleCallingContext const *  mcc 
)
private

Definition at line 140 of file EDProducerBase.cc.

References EnergyCorrector::c, edm::ProducerBase::commit_(), doEndLuminosityBlock_(), doEndLuminosityBlockProduce_(), doEndLuminosityBlockSummary_(), edm::EndLuminosityBlock, edm::EDConsumerBase::esGetTokenIndices(), moduleDescription_, edm::LuminosityBlock::setConsumer(), and edm::LuminosityBlock::setProducer().

142  {
143  LuminosityBlock lb(lbp, moduleDescription_, mcc, true);
144  lb.setConsumer(this);
145  lb.setProducer(this);
146  LuminosityBlock const& cnstLb = lb;
147  const EventSetup c{ci,
148  static_cast<unsigned int>(Transition::EndLuminosityBlock),
150  this->doEndLuminosityBlockProduce_(lb, c);
151  this->doEndLuminosityBlockSummary_(cnstLb, c);
152  this->doEndLuminosityBlock_(cnstLb, c);
153  commit_(lb);
154  }
ModuleDescription moduleDescription_
virtual void doEndLuminosityBlockProduce_(LuminosityBlock &lbp, EventSetup const &c)
virtual void doEndLuminosityBlockSummary_(LuminosityBlock const &lb, EventSetup const &c)
virtual void doEndLuminosityBlock_(LuminosityBlock const &lb, EventSetup const &c)
void commit_(P &iPrincipal)
Definition: ProducerBase.h:111
ESProxyIndex const * esGetTokenIndices(edm::Transition iTrans) const
void EDProducerBase::doEndLuminosityBlock_ ( LuminosityBlock const &  lb,
EventSetup const &  c 
)
privatevirtual

Definition at line 233 of file EDProducerBase.cc.

Referenced by doEndLuminosityBlock().

233 {}
void EDProducerBase::doEndLuminosityBlockProduce_ ( LuminosityBlock lbp,
EventSetup const &  c 
)
privatevirtual

Definition at line 240 of file EDProducerBase.cc.

Referenced by doEndLuminosityBlock().

240 {}
void EDProducerBase::doEndLuminosityBlockSummary_ ( LuminosityBlock const &  lb,
EventSetup const &  c 
)
privatevirtual

Definition at line 235 of file EDProducerBase.cc.

Referenced by doEndLuminosityBlock().

235 {}
void EDProducerBase::doEndRun ( RunPrincipal const &  rp,
EventSetupImpl const &  c,
ModuleCallingContext const *  mcc 
)
private

Definition at line 112 of file EDProducerBase.cc.

References EnergyCorrector::c, edm::ProducerBase::commit_(), doEndRun_(), doEndRunProduce_(), doEndRunSummary_(), edm::EndRun, edm::EDConsumerBase::esGetTokenIndices(), moduleDescription_, alignCSCRings::r, edm::Run::setConsumer(), and edm::Run::setProducer().

112  {
113  Run r(rp, moduleDescription_, mcc, true);
114  r.setConsumer(this);
115  r.setProducer(this);
116  Run const& cnstR = r;
117  const EventSetup c{ci, static_cast<unsigned int>(Transition::EndRun), esGetTokenIndices(Transition::EndRun)};
118  this->doEndRunProduce_(r, c);
119  this->doEndRunSummary_(r, c);
120  this->doEndRun_(cnstR, c);
121  commit_(r);
122  }
ModuleDescription moduleDescription_
virtual void doEndRunSummary_(Run const &rp, EventSetup const &c)
virtual void doEndRun_(Run const &rp, EventSetup const &c)
void commit_(P &iPrincipal)
Definition: ProducerBase.h:111
virtual void doEndRunProduce_(Run &rp, EventSetup const &c)
ESProxyIndex const * esGetTokenIndices(edm::Transition iTrans) const
void EDProducerBase::doEndRun_ ( Run const &  rp,
EventSetup const &  c 
)
privatevirtual

Definition at line 228 of file EDProducerBase.cc.

Referenced by doEndRun().

228 {}
void EDProducerBase::doEndRunProduce_ ( Run rp,
EventSetup const &  c 
)
privatevirtual

Definition at line 238 of file EDProducerBase.cc.

Referenced by doEndRun().

238 {}
void EDProducerBase::doEndRunSummary_ ( Run const &  rp,
EventSetup const &  c 
)
privatevirtual

Definition at line 230 of file EDProducerBase.cc.

Referenced by doEndRun().

230 {}
void EDProducerBase::doEndStream ( StreamID  id)
private

Definition at line 157 of file EDProducerBase.cc.

References doEndStream_().

157 { doEndStream_(id); }
virtual void doEndStream_(StreamID id)
void EDProducerBase::doEndStream_ ( StreamID  id)
privatevirtual

Definition at line 217 of file EDProducerBase.cc.

Referenced by doEndStream().

217 {}
bool EDProducerBase::doEvent ( EventPrincipal const &  ep,
EventSetupImpl const &  c,
ActivityRegistry act,
ModuleCallingContext const *  mcc 
)
private

Definition at line 53 of file EDProducerBase.cc.

References EnergyCorrector::c, edm::ProducerBase::commit_(), MillePedeFileConverter_cfg::e, edm::EDConsumerBase::esGetTokenIndices(), edm::Event, gotBranchIDsFromAcquire_, hasAcquire(), moduleDescription_, previousParentageIds_, previousParentages_, produce(), edm::Event::setConsumer(), edm::Event::setProducer(), edm::Event::streamID(), and edm::StreamID::value().

56  {
57  Event e(ep, moduleDescription_, mcc);
58  e.setConsumer(this);
59  const auto streamIndex = e.streamID().value();
60  e.setProducer(
61  this, &previousParentages_[streamIndex], hasAcquire() ? &gotBranchIDsFromAcquire_[streamIndex] : nullptr);
62  EventSignalsSentry sentry(act, mcc);
63  this->produce(e.streamID(),
64  e,
65  EventSetup{c, static_cast<unsigned int>(Transition::Event), esGetTokenIndices(Transition::Event)});
66  commit_(e, &previousParentageIds_[streamIndex]);
67  return true;
68  }
ModuleDescription moduleDescription_
std::unique_ptr< ParentageID[]> previousParentageIds_
virtual void produce(StreamID, Event &, EventSetup const &) const =0
virtual bool hasAcquire() const
std::unique_ptr< std::vector< BranchID >[]> previousParentages_
std::unique_ptr< std::vector< BranchID >[]> gotBranchIDsFromAcquire_
void commit_(P &iPrincipal)
Definition: ProducerBase.h:111
ESProxyIndex const * esGetTokenIndices(edm::Transition iTrans) const
void EDProducerBase::doPreallocate ( PreallocationConfiguration const &  iPrealloc)
private

Definition at line 84 of file EDProducerBase.cc.

References gotBranchIDsFromAcquire_, hasAcquire(), edm::PreallocationConfiguration::numberOfLuminosityBlocks(), edm::PreallocationConfiguration::numberOfStreams(), preallocate(), preallocLumis(), preallocStreams(), previousParentageIds_, and previousParentages_.

84  {
85  auto const nStreams = iPrealloc.numberOfStreams();
86  previousParentages_.reset(new std::vector<BranchID>[nStreams]);
87  if (hasAcquire()) {
88  gotBranchIDsFromAcquire_.reset(new std::vector<BranchID>[nStreams]);
89  }
90  previousParentageIds_.reset(new ParentageID[nStreams]);
91  preallocStreams(nStreams);
92  preallocLumis(iPrealloc.numberOfLuminosityBlocks());
93  preallocate(iPrealloc);
94  }
virtual void preallocate(PreallocationConfiguration const &)
std::unique_ptr< ParentageID[]> previousParentageIds_
virtual bool hasAcquire() const
virtual void preallocStreams(unsigned int)
std::unique_ptr< std::vector< BranchID >[]> previousParentages_
virtual void preallocLumis(unsigned int)
std::unique_ptr< std::vector< BranchID >[]> gotBranchIDsFromAcquire_
Hash< ParentageType > ParentageID
Definition: ParentageID.h:9
void edm::global::EDProducerBase::doRegisterThinnedAssociations ( ProductRegistry const &  ,
ThinnedAssociationsHelper  
)
inlineprivate

Definition at line 112 of file EDProducerBase.h.

112 {}
void EDProducerBase::doRespondToCloseInputFile ( FileBlock const &  fb)
private

Definition at line 209 of file EDProducerBase.cc.

209  {
210  //respondToCloseInputFile(fb);
211  }
void EDProducerBase::doRespondToOpenInputFile ( FileBlock const &  fb)
private

Definition at line 205 of file EDProducerBase.cc.

205  {
206  //respondToOpenInputFile(fb);
207  }
void EDProducerBase::doStreamBeginLuminosityBlock ( StreamID  id,
LuminosityBlockPrincipal const &  ep,
EventSetupImpl const &  c,
ModuleCallingContext const *  mcc 
)
private

Definition at line 179 of file EDProducerBase.cc.

References edm::BeginLuminosityBlock, EnergyCorrector::c, doStreamBeginLuminosityBlock_(), edm::EDConsumerBase::esGetTokenIndices(), moduleDescription_, and edm::LuminosityBlock::setConsumer().

182  {
183  LuminosityBlock lb(lbp, moduleDescription_, mcc, false);
184  lb.setConsumer(this);
186  lb,
187  EventSetup{c,
188  static_cast<unsigned int>(Transition::BeginLuminosityBlock),
190  }
ModuleDescription moduleDescription_
virtual void doStreamBeginLuminosityBlock_(StreamID id, LuminosityBlock const &lbp, EventSetup const &c)
ESProxyIndex const * esGetTokenIndices(edm::Transition iTrans) const
void EDProducerBase::doStreamBeginLuminosityBlock_ ( StreamID  id,
LuminosityBlock const &  lbp,
EventSetup const &  c 
)
privatevirtual

Definition at line 221 of file EDProducerBase.cc.

Referenced by doStreamBeginLuminosityBlock().

221 {}
void EDProducerBase::doStreamBeginRun ( StreamID  id,
RunPrincipal const &  ep,
EventSetupImpl const &  c,
ModuleCallingContext const *  mcc 
)
private

Definition at line 158 of file EDProducerBase.cc.

References edm::BeginRun, EnergyCorrector::c, doStreamBeginRun_(), edm::EDConsumerBase::esGetTokenIndices(), moduleDescription_, alignCSCRings::r, and edm::Run::setConsumer().

161  {
162  Run r(rp, moduleDescription_, mcc, false);
163  r.setConsumer(this);
164  this->doStreamBeginRun_(
165  id,
166  r,
168  }
ModuleDescription moduleDescription_
virtual void doStreamBeginRun_(StreamID id, Run const &rp, EventSetup const &c)
ESProxyIndex const * esGetTokenIndices(edm::Transition iTrans) const
void EDProducerBase::doStreamBeginRun_ ( StreamID  id,
Run const &  rp,
EventSetup const &  c 
)
privatevirtual

Definition at line 218 of file EDProducerBase.cc.

Referenced by doStreamBeginRun().

218 {}
void EDProducerBase::doStreamEndLuminosityBlock ( StreamID  id,
LuminosityBlockPrincipal const &  ep,
EventSetupImpl const &  c,
ModuleCallingContext const *  mcc 
)
private

Definition at line 192 of file EDProducerBase.cc.

References EnergyCorrector::c, doStreamEndLuminosityBlock_(), doStreamEndLuminosityBlockSummary_(), edm::EndLuminosityBlock, edm::EDConsumerBase::esGetTokenIndices(), moduleDescription_, and edm::LuminosityBlock::setConsumer().

195  {
196  LuminosityBlock lb(lbp, moduleDescription_, mcc, true);
197  lb.setConsumer(this);
198  const EventSetup c{ci,
199  static_cast<unsigned int>(Transition::EndLuminosityBlock),
201  this->doStreamEndLuminosityBlock_(id, lb, c);
202  this->doStreamEndLuminosityBlockSummary_(id, lb, c);
203  }
ModuleDescription moduleDescription_
virtual void doStreamEndLuminosityBlock_(StreamID id, LuminosityBlock const &lbp, EventSetup const &c)
virtual void doStreamEndLuminosityBlockSummary_(StreamID id, LuminosityBlock const &lbp, EventSetup const &c)
ESProxyIndex const * esGetTokenIndices(edm::Transition iTrans) const
void EDProducerBase::doStreamEndLuminosityBlock_ ( StreamID  id,
LuminosityBlock const &  lbp,
EventSetup const &  c 
)
privatevirtual

Definition at line 222 of file EDProducerBase.cc.

Referenced by doStreamEndLuminosityBlock().

222 {}
void EDProducerBase::doStreamEndLuminosityBlockSummary_ ( StreamID  id,
LuminosityBlock const &  lbp,
EventSetup const &  c 
)
privatevirtual

Definition at line 223 of file EDProducerBase.cc.

Referenced by doStreamEndLuminosityBlock().

225  {}
void EDProducerBase::doStreamEndRun ( StreamID  id,
RunPrincipal const &  ep,
EventSetupImpl const &  c,
ModuleCallingContext const *  mcc 
)
private

Definition at line 169 of file EDProducerBase.cc.

References EnergyCorrector::c, doStreamEndRun_(), doStreamEndRunSummary_(), edm::EndRun, edm::EDConsumerBase::esGetTokenIndices(), moduleDescription_, alignCSCRings::r, and edm::Run::setConsumer().

172  {
173  Run r(rp, moduleDescription_, mcc, true);
174  r.setConsumer(this);
175  const EventSetup c{ci, static_cast<unsigned int>(Transition::EndRun), esGetTokenIndices(Transition::EndRun)};
176  this->doStreamEndRun_(id, r, c);
177  this->doStreamEndRunSummary_(id, r, c);
178  }
ModuleDescription moduleDescription_
virtual void doStreamEndRun_(StreamID id, Run const &rp, EventSetup const &c)
virtual void doStreamEndRunSummary_(StreamID id, Run const &rp, EventSetup const &c)
ESProxyIndex const * esGetTokenIndices(edm::Transition iTrans) const
void EDProducerBase::doStreamEndRun_ ( StreamID  id,
Run const &  rp,
EventSetup const &  c 
)
privatevirtual

Definition at line 219 of file EDProducerBase.cc.

Referenced by doStreamEndRun().

219 {}
void EDProducerBase::doStreamEndRunSummary_ ( StreamID  id,
Run const &  rp,
EventSetup const &  c 
)
privatevirtual

Definition at line 220 of file EDProducerBase.cc.

Referenced by doStreamEndRun().

220 {}
virtual void edm::global::EDProducerBase::endJob ( void  )
inlineprivatevirtual
void EDProducerBase::fillDescriptions ( ConfigurationDescriptions descriptions)
static

Definition at line 244 of file EDProducerBase.cc.

References edm::ConfigurationDescriptions::addDefault(), and edm::ParameterSetDescription::setUnknown().

244  {
246  desc.setUnknown();
247  descriptions.addDefault(desc);
248  }
virtual bool edm::global::EDProducerBase::hasAccumulator ( ) const
inlineprivatevirtual

Definition at line 154 of file EDProducerBase.h.

154 { return false; }
virtual bool edm::global::EDProducerBase::hasAcquire ( ) const
inlineprivatevirtual

Definition at line 156 of file EDProducerBase.h.

Referenced by doEvent(), and doPreallocate().

156 { return false; }
ModuleDescription const& edm::global::EDProducerBase::moduleDescription ( ) const
inline

Definition at line 69 of file EDProducerBase.h.

References EnergyCorrector::c, and benchmark_cfg::fb.

Referenced by edm::LogErrorHarvester::LogErrorHarvester().

69 { return moduleDescription_; }
ModuleDescription moduleDescription_
void edm::global::EDProducerBase::preActionBeforeRunEventAsync ( WaitingTask iTask,
ModuleCallingContext const &  iModuleCallingContext,
Principal const &  iPrincipal 
) const
inlineprivate

Definition at line 121 of file EDProducerBase.h.

123  {}
void EDProducerBase::preallocate ( PreallocationConfiguration const &  )
privatevirtual

Definition at line 215 of file EDProducerBase.cc.

Referenced by doPreallocate().

215 {}
void EDProducerBase::preallocLumis ( unsigned  int)
privatevirtual

Definition at line 214 of file EDProducerBase.cc.

Referenced by doPreallocate().

214 {}
void EDProducerBase::preallocStreams ( unsigned  int)
privatevirtual

Definition at line 213 of file EDProducerBase.cc.

Referenced by doPreallocate().

213 {}
void EDProducerBase::prevalidate ( ConfigurationDescriptions descriptions)
static

Definition at line 250 of file EDProducerBase.cc.

References edm::edmodule_mightGet_config(), edm::global::kBaseType(), and AlCaHLTBitMon_QueryRunRegistry::string.

250 { edmodule_mightGet_config(iConfig); }
void edmodule_mightGet_config(ConfigurationDescriptions &iDesc)
virtual void edm::global::EDProducerBase::produce ( StreamID  ,
Event ,
EventSetup const &   
) const
privatepure virtual
void edm::global::EDProducerBase::registerProductsAndCallbacks ( EDProducerBase module,
ProductRegistry reg 
)
inlineprivate

Definition at line 114 of file EDProducerBase.h.

114  {
115  registerProducts(module, reg, moduleDescription_);
116  }
ModuleDescription moduleDescription_
void registerProducts(ProducerBase *, ProductRegistry *, ModuleDescription const &)
Definition: ProducerBase.cc:56
void edm::global::EDProducerBase::setModuleDescription ( ModuleDescription const &  md)
inlineprivate

Definition at line 160 of file EDProducerBase.h.

160 { moduleDescription_ = md; }
ModuleDescription moduleDescription_
virtual bool edm::global::EDProducerBase::wantsGlobalLuminosityBlocks ( ) const
pure virtual
virtual bool edm::global::EDProducerBase::wantsGlobalRuns ( ) const
pure virtual
virtual bool edm::global::EDProducerBase::wantsStreamLuminosityBlocks ( ) const
pure virtual
virtual bool edm::global::EDProducerBase::wantsStreamRuns ( ) const
pure virtual
std::string edm::global::EDProducerBase::workerType ( ) const
inlineprivate

Definition at line 117 of file EDProducerBase.h.

117 { return "WorkerT<EDProducer>"; }

Friends And Related Function Documentation

friend class edm::GlobalSchedule
friend

Definition at line 59 of file EDProducerBase.h.

template<typename T >
friend class edm::maker::ModuleHolderT
friend

Definition at line 54 of file EDProducerBase.h.

template<typename T >
friend class edm::WorkerT
friend

Definition at line 56 of file EDProducerBase.h.

Member Data Documentation

std::unique_ptr<std::vector<BranchID>[]> edm::global::EDProducerBase::gotBranchIDsFromAcquire_
private

Definition at line 163 of file EDProducerBase.h.

Referenced by doAcquire(), doEvent(), and doPreallocate().

ModuleDescription edm::global::EDProducerBase::moduleDescription_
private
std::unique_ptr<ParentageID[]> edm::global::EDProducerBase::previousParentageIds_
private

Definition at line 164 of file EDProducerBase.h.

Referenced by doEvent(), and doPreallocate().

std::unique_ptr<std::vector<BranchID>[]> edm::global::EDProducerBase::previousParentages_
private

Definition at line 162 of file EDProducerBase.h.

Referenced by doEvent(), and doPreallocate().