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
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
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~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)
 
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
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) 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 ()
 
bool hasAcquire () const
 
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 ( )
override

Definition at line 47 of file EDProducerBase.cc.

48  {
49  }

Member Function Documentation

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

Definition at line 171 of file EDProducerBase.cc.

References edm::one::kBaseType().

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

Definition at line 65 of file EDProducerBase.cc.

Referenced by doBeginJob().

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

Definition at line 71 of file EDProducerBase.cc.

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

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

Definition at line 113 of file EDProducerBase.cc.

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

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

Definition at line 148 of file EDProducerBase.cc.

Referenced by doBeginLuminosityBlock().

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

Definition at line 153 of file EDProducerBase.cc.

Referenced by doBeginLuminosityBlock().

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

Definition at line 89 of file EDProducerBase.cc.

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

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

Definition at line 146 of file EDProducerBase.cc.

Referenced by doBeginRun().

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

Definition at line 151 of file EDProducerBase.cc.

Referenced by doBeginRun().

151 {}
void EDProducerBase::doEndJob ( )
private

Definition at line 78 of file EDProducerBase.cc.

References endJob().

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

Definition at line 125 of file EDProducerBase.cc.

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

126  {
127  LuminosityBlock lb(lbp, moduleDescription_, mcc);
128  lb.setConsumer(this);
129  LuminosityBlock const& cnstLb = lb;
130  this->doEndLuminosityBlock_(cnstLb, c);
131  lb.setProducer(this);
132  this->doEndLuminosityBlockProduce_(lb, c);
133  commit_(lb);
134  }
virtual void doEndLuminosityBlock_(LuminosityBlock const &lbp, EventSetup const &c)
virtual void doEndLuminosityBlockProduce_(LuminosityBlock &lbp, EventSetup const &c)
void commit_(P &iPrincipal)
Definition: ProducerBase.h:107
ModuleDescription moduleDescription_
void EDProducerBase::doEndLuminosityBlock_ ( LuminosityBlock const &  lbp,
EventSetup const &  c 
)
privatevirtual

Definition at line 149 of file EDProducerBase.cc.

Referenced by doEndLuminosityBlock().

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

Definition at line 154 of file EDProducerBase.cc.

Referenced by doEndLuminosityBlock().

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

Definition at line 101 of file EDProducerBase.cc.

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

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

Definition at line 147 of file EDProducerBase.cc.

Referenced by doEndRun().

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

Definition at line 152 of file EDProducerBase.cc.

Referenced by doEndRun().

152 {}
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(), edm::Event::setProducer(), and edm::Event::setSharedResourcesAcquirer().

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

Definition at line 83 of file EDProducerBase.cc.

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

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

Definition at line 94 of file EDProducerBase.h.

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

Definition at line 142 of file EDProducerBase.cc.

142  {
143  //respondToCloseInputFile(fb);
144  }
void EDProducerBase::doRespondToOpenInputFile ( FileBlock const &  fb)
private

Definition at line 137 of file EDProducerBase.cc.

137  {
138  //respondToOpenInputFile(fb);
139  }
virtual void edm::one::EDProducerBase::endJob ( void  )
inlineprivatevirtual
void EDProducerBase::fillDescriptions ( ConfigurationDescriptions descriptions)
static

Definition at line 157 of file EDProducerBase.cc.

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

157  {
159  desc.setUnknown();
160  descriptions.addDefault(desc);
161  }
bool edm::one::EDProducerBase::hasAcquire ( ) const
inlineprivate

Definition at line 122 of file EDProducerBase.h.

122 { return false; }
ModuleDescription const& edm::one::EDProducerBase::moduleDescription ( ) const
inline
void edm::one::EDProducerBase::preActionBeforeRunEventAsync ( WaitingTask iTask,
ModuleCallingContext const &  iModuleCallingContext,
Principal const &  iPrincipal 
) const
inlineprivate

Definition at line 76 of file EDProducerBase.h.

References benchmark_cfg::fb.

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

Reimplemented in ExternalLHEProducer.

Definition at line 110 of file EDProducerBase.h.

Referenced by doPreallocate().

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

Definition at line 164 of file EDProducerBase.cc.

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

164  {
165  edmodule_mightGet_config(iConfig);
166  }
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 97 of file EDProducerBase.h.

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

Definition at line 126 of file EDProducerBase.h.

126  {
127  moduleDescription_ = md;
128  }
ModuleDescription moduleDescription_
SharedResourcesAcquirer& edm::one::EDProducerBase::sharedResourcesAcquirer ( )
inlineprivate

Definition at line 102 of file EDProducerBase.h.

102  {
103  return resourcesAcquirer_;
104  }
SharedResourcesAcquirer resourcesAcquirer_
virtual bool edm::one::EDProducerBase::wantsGlobalLuminosityBlocks ( ) const
pure virtual
virtual bool edm::one::EDProducerBase::wantsGlobalRuns ( ) const
pure virtual
bool edm::one::EDProducerBase::wantsStreamLuminosityBlocks ( ) const
inline

Definition at line 69 of file EDProducerBase.h.

References EnergyCorrector::c.

69 {return false;};
bool edm::one::EDProducerBase::wantsStreamRuns ( ) const
inline

Definition at line 68 of file EDProducerBase.h.

68 {return false;}
std::string edm::one::EDProducerBase::workerType ( ) const
inlineprivate

Definition at line 100 of file EDProducerBase.h.

100 {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 130 of file EDProducerBase.h.

Referenced by doEvent().

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

Definition at line 131 of file EDProducerBase.h.

Referenced by doEvent().

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

Definition at line 133 of file EDProducerBase.h.

Referenced by doBeginJob(), and doEvent().