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::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< 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)
 
 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
std::vector< ConsumesInfoconsumesInfo () const
 
 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 (std::string const &iProcessName, std::string const &iModuleLabel, bool iPrint, std::vector< char const * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) 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 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 doPostForkReacquireResources (unsigned int iChildIndex, unsigned int iNumberOfChildren)
 
void doPreallocate (PreallocationConfiguration const &)
 
void doPreForkReleaseResources ()
 
void doRegisterThinnedAssociations (ProductRegistry const &, ThinnedAssociationsHelper &)
 
void doRespondToCloseInputFile (FileBlock const &fb)
 
void doRespondToOpenInputFile (FileBlock const &fb)
 
virtual void endJob ()
 
virtual void postForkReacquireResources (unsigned int, unsigned int)
 
virtual void preForkReleaseResources ()
 
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::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 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 174 of file EDProducerBase.cc.

References edm::one::kBaseType().

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

Definition at line 69 of file EDProducerBase.cc.

Referenced by doBeginJob().

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

Definition at line 74 of file EDProducerBase.cc.

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

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

Definition at line 108 of file EDProducerBase.cc.

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

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

Definition at line 151 of file EDProducerBase.cc.

Referenced by doBeginLuminosityBlock().

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

Definition at line 156 of file EDProducerBase.cc.

Referenced by doBeginLuminosityBlock().

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

Definition at line 86 of file EDProducerBase.cc.

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

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

Definition at line 149 of file EDProducerBase.cc.

Referenced by doBeginRun().

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

Definition at line 154 of file EDProducerBase.cc.

Referenced by doBeginRun().

154 {}
void EDProducerBase::doEndJob ( )
private

Definition at line 81 of file EDProducerBase.cc.

References endJob().

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

Definition at line 119 of file EDProducerBase.cc.

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

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

Definition at line 152 of file EDProducerBase.cc.

Referenced by doEndLuminosityBlock().

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

Definition at line 157 of file EDProducerBase.cc.

Referenced by doEndLuminosityBlock().

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

Definition at line 97 of file EDProducerBase.cc.

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

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

Definition at line 150 of file EDProducerBase.cc.

Referenced by doEndRun().

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

Definition at line 155 of file EDProducerBase.cc.

Referenced by doEndRun().

155 {}
bool EDProducerBase::doEvent ( EventPrincipal const &  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_, edm::Event::setConsumer(), and edm::Event::setSharedResourcesAcquirer().

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  e.setSharedResourcesAcquirer(&resourcesAcquirer_);
61  EventSignalsSentry sentry(act,mcc);
62  this->produce(e, c);
63  }
65  }
66  return true;
67  }
ParentageID previousParentageId_
SharedResourcesAcquirer resourcesAcquirer_
void commit_(P &iPrincipal)
Definition: ProducerBase.h:64
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 145 of file EDProducerBase.cc.

References postForkReacquireResources().

145  {
146  postForkReacquireResources(iChildIndex, iNumberOfChildren);
147  }
virtual void postForkReacquireResources(unsigned int, unsigned int)
void edm::one::EDProducerBase::doPreallocate ( PreallocationConfiguration const &  )
inlineprivate

Definition at line 70 of file EDProducerBase.h.

70 {}
void EDProducerBase::doPreForkReleaseResources ( )
private

Definition at line 140 of file EDProducerBase.cc.

References preForkReleaseResources().

140  {
142  }
virtual void preForkReleaseResources()
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 135 of file EDProducerBase.cc.

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

Definition at line 130 of file EDProducerBase.cc.

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

Definition at line 160 of file EDProducerBase.cc.

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

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

Definition at line 64 of file EDProducerBase.h.

References moduleDescription_.

Referenced by HLTPrescaleRecorder::beginRun().

64 { return moduleDescription_; }
ModuleDescription moduleDescription_
virtual void edm::one::EDProducerBase::postForkReacquireResources ( unsigned  int,
unsigned  int 
)
inlineprivatevirtual

Definition at line 102 of file EDProducerBase.h.

Referenced by doPostForkReacquireResources().

102 {}
virtual void edm::one::EDProducerBase::preForkReleaseResources ( )
inlineprivatevirtual

Definition at line 101 of file EDProducerBase.h.

Referenced by doPreForkReleaseResources().

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

Definition at line 167 of file EDProducerBase.cc.

References edm::edmodule_mightGet_config().

167  {
168  edmodule_mightGet_config(iConfig);
169  }
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.

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

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

References moduleDescription_.

116  {
117  moduleDescription_ = md;
118  }
ModuleDescription moduleDescription_
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::mutex edm::one::EDProducerBase::mutex_
private

Definition at line 124 of file EDProducerBase.h.

Referenced by doEvent().

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

Definition at line 120 of file EDProducerBase.h.

Referenced by doEvent().

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

Definition at line 121 of file EDProducerBase.h.

Referenced by doEvent().

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

Definition at line 123 of file EDProducerBase.h.

Referenced by doBeginJob(), and doEvent().