CMS 3D CMS Logo

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

#include <EDProducerBase.h>

Inheritance diagram for edm::one::EDProducerBase:
edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper edm::one::EDProducer< T > edm::one::EDProducer< edm::BeginLuminosityBlockProducer > edm::one::EDProducer< edm::BeginRunProducer > edm::one::EDProducer< edm::BeginRunProducer, edm::EndRunProducer > edm::one::EDProducer< edm::EndLuminosityBlockProducer > edm::one::EDProducer< edm::EndLuminosityBlockProducer, edm::one::WatchLuminosityBlocks > edm::one::EDProducer< edm::EndRunProducer > edm::one::EDProducer< edm::EndRunProducer, edm::EndLuminosityBlockProducer > edm::one::EDProducer< edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::one::WatchRuns, edm::one::WatchLuminosityBlocks > edm::one::EDProducer< edm::one::SharedResources > edm::one::EDProducer< edm::one::SharedResources, edm::one::WatchRuns > edm::one::EDProducer< edm::one::WatchLuminosityBlocks, edm::EndLuminosityBlockProducer > edm::one::EDProducer< edm::one::WatchRuns, edm::BeginLuminosityBlockProducer, edm::EndRunProducer > edm::one::EDProducer< edm::one::WatchRuns, edm::EndLuminosityBlockProducer, edm::EndRunProducer > edm::one::EDProducer< edm::one::WatchRuns, edm::one::WatchLuminosityBlocks, edm::one::SharedResources, edm::EndLuminosityBlockProducer > edm::one::EDProducer< EndRunProducer, one::WatchLuminosityBlocks > edm::one::EDProducer< EndRunProducer, one::WatchLuminosityBlocks, one::SharedResources > edm::one::EDProducer< one::WatchRuns, EndRunProducer > edm::one::EDProducer<>

Public Types

typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 

Public Member Functions

 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducerBase ()
 
- 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 ()
 
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, std::unordered_multimap< std::string, edm::ProductResolverIndex > const &iIndicies, std::string const &moduleLabel)
 
virtual ~ProducerBase () noexcept(false)
 
- 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
 
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
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
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 ()
 
virtual SharedResourcesAcquirer createAcquirer ()
 
void doBeginJob ()
 
void doBeginLuminosityBlock (LuminosityBlockPrincipal const &lbp, EventSetup const &c, ModuleCallingContext const *)
 
virtual void doBeginLuminosityBlock_ (LuminosityBlock const &lbp, EventSetup const &c)
 
virtual void doBeginLuminosityBlockProduce_ (LuminosityBlock &lbp, EventSetup const &c)
 
void doBeginRun (RunPrincipal const &rp, EventSetup const &c, ModuleCallingContext const *)
 
virtual void doBeginRun_ (Run const &rp, EventSetup const &c)
 
virtual void doBeginRunProduce_ (Run &rp, EventSetup const &c)
 
void doEndJob ()
 
void doEndLuminosityBlock (LuminosityBlockPrincipal const &lbp, EventSetup const &c, ModuleCallingContext const *)
 
virtual void doEndLuminosityBlock_ (LuminosityBlock const &lbp, EventSetup const &c)
 
virtual void doEndLuminosityBlockProduce_ (LuminosityBlock &lbp, EventSetup const &c)
 
void doEndRun (RunPrincipal const &rp, EventSetup const &c, ModuleCallingContext const *)
 
virtual void doEndRun_ (Run const &rp, EventSetup const &c)
 
virtual void doEndRunProduce_ (Run &rp, EventSetup const &c)
 
bool doEvent (EventPrincipal const &ep, EventSetup const &c, ActivityRegistry *, ModuleCallingContext const *)
 
void doPreallocate (PreallocationConfiguration const &)
 
void doRegisterThinnedAssociations (ProductRegistry const &, ThinnedAssociationsHelper &)
 
void doRespondToCloseInputFile (FileBlock const &fb)
 
void doRespondToOpenInputFile (FileBlock const &fb)
 
virtual void endJob ()
 
void preActionBeforeRunEventAsync (WaitingTask *iTask, ModuleCallingContext const &iModuleCallingContext, Principal const &iPrincipal) const
 
virtual void preallocThreads (unsigned int)
 
virtual void produce (Event &, EventSetup const &)=0
 
void registerProductsAndCallbacks (EDProducerBase *module, ProductRegistry *reg)
 
void setModuleDescription (ModuleDescription const &md)
 
SharedResourcesAcquirersharedResourcesAcquirer ()
 
std::string workerType () const
 

Private Attributes

ModuleDescription moduleDescription_
 
std::vector< BranchIDpreviousParentage_
 
ParentageID previousParentageId_
 
SharedResourcesAcquirer resourcesAcquirer_
 

Friends

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 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 47 of file EDProducerBase.h.

Member Typedef Documentation

Definition at line 53 of file EDProducerBase.h.

Constructor & Destructor Documentation

EDProducerBase::EDProducerBase ( )

Definition at line 41 of file EDProducerBase.cc.

41  :
42  ProducerBase(),
ParentageID previousParentageId_
std::vector< BranchID > previousParentage_
ModuleDescription moduleDescription_
EDProducerBase::~EDProducerBase ( )
virtual

Definition at line 47 of file EDProducerBase.cc.

48  {
49  }

Member Function Documentation

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

Definition at line 166 of file EDProducerBase.cc.

References edm::one::kBaseType().

166  {
167  return kBaseType;
168  }
static const std::string kBaseType("EDAnalyzer")
virtual void edm::one::EDProducerBase::beginJob ( void  )
inlineprivatevirtual
SharedResourcesAcquirer EDProducerBase::createAcquirer ( )
privatevirtual

Definition at line 64 of file EDProducerBase.cc.

Referenced by doBeginJob().

64  {
66  std::vector<std::shared_ptr<SerialTaskQueue>>(1, std::make_shared<SerialTaskQueue>())};
67  }
void EDProducerBase::doBeginJob ( )
private

Definition at line 70 of file EDProducerBase.cc.

References beginJob(), createAcquirer(), and resourcesAcquirer_.

70  {
72 
73  this->beginJob();
74  }
SharedResourcesAcquirer resourcesAcquirer_
virtual SharedResourcesAcquirer createAcquirer()
void EDProducerBase::doBeginLuminosityBlock ( LuminosityBlockPrincipal const &  lbp,
EventSetup const &  c,
ModuleCallingContext const *  mcc 
)
private

Definition at line 110 of file EDProducerBase.cc.

References edm::ProducerBase::commit_(), doBeginLuminosityBlock_(), doBeginLuminosityBlockProduce_(), moduleDescription_, and edm::LuminosityBlock::setConsumer().

111  {
112  LuminosityBlock lb(lbp, moduleDescription_, mcc);
113  lb.setConsumer(this);
114  LuminosityBlock const& cnstLb = lb;
115  this->doBeginLuminosityBlock_(cnstLb, c);
117  commit_(lb);
118  }
virtual void doBeginLuminosityBlock_(LuminosityBlock const &lbp, EventSetup const &c)
virtual void doBeginLuminosityBlockProduce_(LuminosityBlock &lbp, EventSetup const &c)
void commit_(P &iPrincipal)
Definition: ProducerBase.h:92
ModuleDescription moduleDescription_
void EDProducerBase::doBeginLuminosityBlock_ ( LuminosityBlock const &  lbp,
EventSetup const &  c 
)
privatevirtual

Definition at line 143 of file EDProducerBase.cc.

Referenced by doBeginLuminosityBlock().

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

Definition at line 148 of file EDProducerBase.cc.

Referenced by doBeginLuminosityBlock().

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

Definition at line 88 of file EDProducerBase.cc.

References edm::ProducerBase::commit_(), doBeginRun_(), doBeginRunProduce_(), moduleDescription_, alignCSCRings::r, and edm::Run::setConsumer().

89  {
90  Run r(rp, moduleDescription_, mcc);
91  r.setConsumer(this);
92  Run const& cnstR = r;
93  this->doBeginRun_(cnstR, c);
94  this->doBeginRunProduce_(r,c);
95  commit_(r);
96  }
virtual void doBeginRunProduce_(Run &rp, EventSetup const &c)
void commit_(P &iPrincipal)
Definition: ProducerBase.h:92
virtual void doBeginRun_(Run const &rp, EventSetup const &c)
ModuleDescription moduleDescription_
void EDProducerBase::doBeginRun_ ( Run const &  rp,
EventSetup const &  c 
)
privatevirtual

Definition at line 141 of file EDProducerBase.cc.

Referenced by doBeginRun().

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

Definition at line 146 of file EDProducerBase.cc.

Referenced by doBeginRun().

146 {}
void EDProducerBase::doEndJob ( )
private

Definition at line 77 of file EDProducerBase.cc.

References endJob().

77  {
78  this->endJob();
79  }
void EDProducerBase::doEndLuminosityBlock ( LuminosityBlockPrincipal const &  lbp,
EventSetup const &  c,
ModuleCallingContext const *  mcc 
)
private

Definition at line 121 of file EDProducerBase.cc.

References edm::ProducerBase::commit_(), doEndLuminosityBlock_(), doEndLuminosityBlockProduce_(), moduleDescription_, and edm::LuminosityBlock::setConsumer().

122  {
123  LuminosityBlock lb(lbp, moduleDescription_, mcc);
124  lb.setConsumer(this);
125  LuminosityBlock const& cnstLb = lb;
126  this->doEndLuminosityBlock_(cnstLb, c);
127  this->doEndLuminosityBlockProduce_(lb, c);
128  commit_(lb);
129  }
virtual void doEndLuminosityBlock_(LuminosityBlock const &lbp, EventSetup const &c)
virtual void doEndLuminosityBlockProduce_(LuminosityBlock &lbp, EventSetup const &c)
void commit_(P &iPrincipal)
Definition: ProducerBase.h:92
ModuleDescription moduleDescription_
void EDProducerBase::doEndLuminosityBlock_ ( LuminosityBlock const &  lbp,
EventSetup const &  c 
)
privatevirtual

Definition at line 144 of file EDProducerBase.cc.

Referenced by doEndLuminosityBlock().

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

Definition at line 149 of file EDProducerBase.cc.

Referenced by doEndLuminosityBlock().

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

Definition at line 99 of file EDProducerBase.cc.

References edm::ProducerBase::commit_(), doEndRun_(), doEndRunProduce_(), moduleDescription_, alignCSCRings::r, and edm::Run::setConsumer().

100  {
101  Run r(rp, moduleDescription_, mcc);
102  r.setConsumer(this);
103  Run const& cnstR = r;
104  this->doEndRun_(cnstR, c);
105  this->doEndRunProduce_(r, c);
106  commit_(r);
107  }
virtual void doEndRunProduce_(Run &rp, EventSetup const &c)
virtual void doEndRun_(Run const &rp, EventSetup const &c)
void commit_(P &iPrincipal)
Definition: ProducerBase.h:92
ModuleDescription moduleDescription_
void EDProducerBase::doEndRun_ ( Run const &  rp,
EventSetup const &  c 
)
privatevirtual

Definition at line 142 of file EDProducerBase.cc.

Referenced by doEndRun().

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

Definition at line 147 of file EDProducerBase.cc.

Referenced by doEndRun().

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

Definition at line 52 of file EDProducerBase.cc.

References edm::ProducerBase::commit_(), MillePedeFileConverter_cfg::e, moduleDescription_, previousParentage_, previousParentageId_, produce(), resourcesAcquirer_, edm::Event::setConsumer(), and edm::Event::setSharedResourcesAcquirer().

54  {
55  Event e(ep, moduleDescription_, mcc);
56  e.setConsumer(this);
57  e.setSharedResourcesAcquirer(&resourcesAcquirer_);
58  EventSignalsSentry sentry(act,mcc);
59  this->produce(e, c);
61  return true;
62  }
ParentageID previousParentageId_
SharedResourcesAcquirer resourcesAcquirer_
void commit_(P &iPrincipal)
Definition: ProducerBase.h:92
std::vector< BranchID > previousParentage_
ModuleDescription moduleDescription_
virtual void produce(Event &, EventSetup const &)=0
void EDProducerBase::doPreallocate ( PreallocationConfiguration const &  iPrealloc)
private

Definition at line 82 of file EDProducerBase.cc.

References edm::PreallocationConfiguration::numberOfThreads(), and preallocThreads().

82  {
83  auto const nThreads = iPrealloc.numberOfThreads();
84  preallocThreads(nThreads);
85  }
virtual void preallocThreads(unsigned int)
void edm::one::EDProducerBase::doRegisterThinnedAssociations ( ProductRegistry const &  ,
ThinnedAssociationsHelper  
)
inlineprivate

Definition at line 89 of file EDProducerBase.h.

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

Definition at line 137 of file EDProducerBase.cc.

137  {
138  //respondToCloseInputFile(fb);
139  }
void EDProducerBase::doRespondToOpenInputFile ( FileBlock const &  fb)
private

Definition at line 132 of file EDProducerBase.cc.

132  {
133  //respondToOpenInputFile(fb);
134  }
virtual void edm::one::EDProducerBase::endJob ( void  )
inlineprivatevirtual
void EDProducerBase::fillDescriptions ( ConfigurationDescriptions descriptions)
static

Definition at line 152 of file EDProducerBase.cc.

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

152  {
154  desc.setUnknown();
155  descriptions.addDefault(desc);
156  }
ModuleDescription const& edm::one::EDProducerBase::moduleDescription ( ) const
inline

Definition at line 64 of file EDProducerBase.h.

References EnergyCorrector::c.

Referenced by HLTPrescaleRecorder::beginRun().

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

Definition at line 71 of file EDProducerBase.h.

References benchmark_cfg::fb.

71 {}
virtual void edm::one::EDProducerBase::preallocThreads ( unsigned int  )
inlineprivatevirtual

Reimplemented in ExternalLHEProducer.

Definition at line 105 of file EDProducerBase.h.

Referenced by doPreallocate().

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

Definition at line 159 of file EDProducerBase.cc.

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

159  {
160  edmodule_mightGet_config(iConfig);
161  }
void edmodule_mightGet_config(ConfigurationDescriptions &iDesc)
virtual void edm::one::EDProducerBase::produce ( Event ,
EventSetup const &   
)
privatepure virtual
void edm::one::EDProducerBase::registerProductsAndCallbacks ( EDProducerBase module,
ProductRegistry reg 
)
inlineprivate

Definition at line 92 of file EDProducerBase.h.

92  {
94  }
void registerProducts(ProducerBase *, ProductRegistry *, ModuleDescription const &)
Definition: ProducerBase.cc:60
ModuleDescription moduleDescription_
void edm::one::EDProducerBase::setModuleDescription ( ModuleDescription const &  md)
inlineprivate

Definition at line 119 of file EDProducerBase.h.

119  {
120  moduleDescription_ = md;
121  }
ModuleDescription moduleDescription_
SharedResourcesAcquirer& edm::one::EDProducerBase::sharedResourcesAcquirer ( )
inlineprivate

Definition at line 97 of file EDProducerBase.h.

97  {
98  return resourcesAcquirer_;
99  }
SharedResourcesAcquirer resourcesAcquirer_
std::string edm::one::EDProducerBase::workerType ( ) const
inlineprivate

Definition at line 95 of file EDProducerBase.h.

95 {return "WorkerT<EDProducer>";}

Friends And Related Function Documentation

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

Definition at line 51 of file EDProducerBase.h.

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

Definition at line 52 of file EDProducerBase.h.

Member Data Documentation

ModuleDescription edm::one::EDProducerBase::moduleDescription_
private
std::vector<BranchID> edm::one::EDProducerBase::previousParentage_
private

Definition at line 123 of file EDProducerBase.h.

Referenced by doEvent().

ParentageID edm::one::EDProducerBase::previousParentageId_
private

Definition at line 124 of file EDProducerBase.h.

Referenced by doEvent().

SharedResourcesAcquirer edm::one::EDProducerBase::resourcesAcquirer_
private

Definition at line 126 of file EDProducerBase.h.

Referenced by doBeginJob(), and doEvent().