CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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::EndRunProducer, edm::one::SharedResources > edm::one::EDProducer< edm::one::SharedResources > edm::one::EDProducer< edm::one::SharedResources, edm::one::WatchRuns > edm::one::EDProducer< edm::one::SharedResources, edm::one::WatchRuns, edm::one::WatchLuminosityBlocks > 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< EndRunProducer, one::WatchLuminosityBlocks > edm::one::EDProducer< one::WatchRuns, EndRunProducer >

Public Types

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

Public Member Functions

 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducerBase ()
 
- Public Member Functions inherited from edm::ProducerBase
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription
const &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

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 &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 &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 &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 &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 &ep, EventSetup const &c, ActivityRegistry *, ModuleCallingContext const *)
 
void doPostForkReacquireResources (unsigned int iChildIndex, unsigned int iNumberOfChildren)
 
void doPreallocate (PreallocationConfiguration const &)
 
void doPreForkReleaseResources ()
 
void doRespondToCloseInputFile (FileBlock const &fb)
 
void doRespondToOpenInputFile (FileBlock const &fb)
 
virtual void endJob ()
 
virtual void produce (Event &, EventSetup const &)=0
 
void registerProductsAndCallbacks (EDProducerBase *module, ProductRegistry *reg)
 
void setModuleDescription (ModuleDescription const &md)
 
std::string workerType () const
 

Private Attributes

ModuleDescription moduleDescription_
 
std::mutex mutex_
 
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::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
- 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 44 of file EDProducerBase.h.

Member Typedef Documentation

Definition at line 50 of file EDProducerBase.h.

Constructor & Destructor Documentation

EDProducerBase::EDProducerBase ( )

Definition at line 40 of file EDProducerBase.cc.

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

Definition at line 46 of file EDProducerBase.cc.

47  {
48  }

Member Function Documentation

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

Definition at line 173 of file EDProducerBase.cc.

References edm::one::kBaseType().

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

Definition at line 68 of file EDProducerBase.cc.

Referenced by doBeginJob().

68  {
69  return SharedResourcesAcquirer{};
70  }
void EDProducerBase::doBeginJob ( )
private

Definition at line 73 of file EDProducerBase.cc.

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

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

Definition at line 107 of file EDProducerBase.cc.

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

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

Definition at line 150 of file EDProducerBase.cc.

Referenced by doBeginLuminosityBlock().

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

Definition at line 155 of file EDProducerBase.cc.

Referenced by doBeginLuminosityBlock().

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

Definition at line 85 of file EDProducerBase.cc.

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

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

Definition at line 148 of file EDProducerBase.cc.

Referenced by doBeginRun().

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

Definition at line 153 of file EDProducerBase.cc.

Referenced by doBeginRun().

153 {}
void EDProducerBase::doEndJob ( )
private

Definition at line 80 of file EDProducerBase.cc.

References endJob().

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

Definition at line 118 of file EDProducerBase.cc.

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

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

Definition at line 151 of file EDProducerBase.cc.

Referenced by doEndLuminosityBlock().

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

Definition at line 156 of file EDProducerBase.cc.

Referenced by doEndLuminosityBlock().

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

Definition at line 96 of file EDProducerBase.cc.

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

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

Definition at line 149 of file EDProducerBase.cc.

Referenced by doEndRun().

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

Definition at line 154 of file EDProducerBase.cc.

Referenced by doEndRun().

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

Definition at line 51 of file EDProducerBase.cc.

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

53  {
54  Event e(ep, moduleDescription_, mcc);
55  e.setConsumer(this);
56  {
57  std::lock_guard<std::mutex> guard(mutex_);
58  {
59  std::lock_guard<SharedResourcesAcquirer> guard(resourcesAcquirer_);
60  EventSignalsSentry sentry(act,mcc);
61  this->produce(e, c);
62  }
64  }
65  return true;
66  }
ParentageID previousParentageId_
SharedResourcesAcquirer resourcesAcquirer_
void commit_(P &iPrincipal)
Definition: ProducerBase.h:65
std::vector< BranchID > previousParentage_
ModuleDescription moduleDescription_
virtual void produce(Event &, EventSetup const &)=0
void EDProducerBase::doPostForkReacquireResources ( unsigned int  iChildIndex,
unsigned int  iNumberOfChildren 
)
private

Definition at line 144 of file EDProducerBase.cc.

144  {
145  //postForkReacquireResources(iChildIndex, iNumberOfChildren);
146  }
void edm::one::EDProducerBase::doPreallocate ( PreallocationConfiguration const &  )
inlineprivate

Definition at line 67 of file EDProducerBase.h.

67 {}
void EDProducerBase::doPreForkReleaseResources ( )
private

Definition at line 139 of file EDProducerBase.cc.

139  {
140  //preForkReleaseResources();
141  }
void EDProducerBase::doRespondToCloseInputFile ( FileBlock const &  fb)
private

Definition at line 134 of file EDProducerBase.cc.

134  {
135  //respondToCloseInputFile(fb);
136  }
void EDProducerBase::doRespondToOpenInputFile ( FileBlock const &  fb)
private

Definition at line 129 of file EDProducerBase.cc.

129  {
130  //respondToOpenInputFile(fb);
131  }
virtual void edm::one::EDProducerBase::endJob ( void  )
inlineprivatevirtual
void EDProducerBase::fillDescriptions ( ConfigurationDescriptions descriptions)
static

Definition at line 159 of file EDProducerBase.cc.

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

159  {
161  desc.setUnknown();
162  descriptions.addDefault(desc);
163  }
ModuleDescription const& edm::one::EDProducerBase::moduleDescription ( ) const
inline

Definition at line 61 of file EDProducerBase.h.

References moduleDescription_.

Referenced by edm::MixingModule::pileAllWorkers(), and edm::DataMixingModule::pileWorker().

61 { return moduleDescription_; }
ModuleDescription moduleDescription_
void EDProducerBase::prevalidate ( ConfigurationDescriptions descriptions)
static

Definition at line 166 of file EDProducerBase.cc.

References edm::edmodule_mightGet_config().

166  {
167  edmodule_mightGet_config(iConfig);
168  }
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 87 of file EDProducerBase.h.

References moduleDescription_, and edm::ProducerBase::registerProducts().

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

Definition at line 108 of file EDProducerBase.h.

References moduleDescription_.

108  {
109  moduleDescription_ = md;
110  }
ModuleDescription moduleDescription_
std::string edm::one::EDProducerBase::workerType ( ) const
inlineprivate

Definition at line 90 of file EDProducerBase.h.

90 {return "WorkerT<EDProducer>";}

Friends And Related Function Documentation

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

Definition at line 48 of file EDProducerBase.h.

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

Definition at line 49 of file EDProducerBase.h.

Member Data Documentation

ModuleDescription edm::one::EDProducerBase::moduleDescription_
private
std::mutex edm::one::EDProducerBase::mutex_
private

Definition at line 116 of file EDProducerBase.h.

Referenced by doEvent().

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

Definition at line 112 of file EDProducerBase.h.

Referenced by doEvent().

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

Definition at line 113 of file EDProducerBase.h.

Referenced by doEvent().

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

Definition at line 115 of file EDProducerBase.h.

Referenced by doBeginJob(), and doEvent().