CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes | Static Private Attributes | Friends
edm::LuminosityBlock Class Reference

#include <LuminosityBlock.h>

Inheritance diagram for edm::LuminosityBlock:
edm::LuminosityBlockBase

Public Types

typedef unsigned long CacheIdentifier_t
 

Public Member Functions

CacheIdentifier_t cacheIdentifier () const
 
template<typename PROD , typename... Args>
void emplace (EDPutTokenT< PROD > token, Args &&...args)
 puts a new product More...
 
template<typename PROD , typename... Args>
void emplace (EDPutToken token, Args &&...args)
 
template<typename PROD >
PROD const & get (EDGetTokenT< PROD > token) const (false)
 
void getAllStableProvenance (std::vector< StableProvenance const * > &provenances) const
 
template<typename PROD >
bool getByLabel (std::string const &label, Handle< PROD > &result) const
 
template<typename PROD >
bool getByLabel (std::string const &label, std::string const &productInstanceName, Handle< PROD > &result) const
 
template<typename PROD >
bool getByLabel (InputTag const &tag, Handle< PROD > &result) const
 same as above, but using the InputTag class More...
 
template<typename PROD >
bool getByToken (EDGetToken token, Handle< PROD > &result) const
 
template<typename PROD >
bool getByToken (EDGetTokenT< PROD > token, Handle< PROD > &result) const
 
template<typename PROD >
Handle< PRODgetHandle (EDGetTokenT< PROD > token) const
 
template<typename PROD >
void getManyByType (std::vector< Handle< PROD >> &results) const
 
Provenance getProvenance (BranchID const &theID) const
 
Run const & getRun () const
 
LuminosityBlockIndex index () const
 
void labelsForToken (EDGetToken const &iToken, ProductLabels &oLabels) const
 
 LuminosityBlock (LuminosityBlockPrincipal const &lbp, ModuleDescription const &md, ModuleCallingContext const *, bool isAtEnd)
 
LuminosityBlockAuxiliary const & luminosityBlockAuxiliary () const override
 
ModuleCallingContext const * moduleCallingContext () const
 
ProcessHistory const & processHistory () const
 
ProcessHistoryID const & processHistoryID () const
 
template<typename PROD >
void put (std::unique_ptr< PROD > product)
 Put a new product. More...
 
template<typename PROD >
void put (std::unique_ptr< PROD > product, std::string const &productInstanceName)
 Put a new product with a 'product instance name'. More...
 
template<typename PROD >
void put (EDPutToken token, std::unique_ptr< PROD > product)
 
template<typename PROD >
void put (EDPutTokenT< PROD > token, std::unique_ptr< PROD > product)
 
void setConsumer (EDConsumerBase const *iConsumer)
 
void setProducer (ProducerBase const *iProducer)
 
void setSharedResourcesAcquirer (SharedResourcesAcquirer *iResourceAcquirer)
 
 ~LuminosityBlock () override
 
- Public Member Functions inherited from edm::LuminosityBlockBase
Timestamp const & beginTime () const
 
Timestamp const & endTime () const
 
template<typename PROD >
bool getByLabel (InputTag const &tag, Handle< PROD > &result) const
 same as above, but using the InputTag class More...
 
template<class T >
bool getByLabel (const InputTag &tag, Handle< T > &result) const
 
LuminosityBlockID id () const
 
LuminosityBlockNumber_t luminosityBlock () const
 
 LuminosityBlockBase ()
 
RunNumber_t run () const
 
virtual ~LuminosityBlockBase ()
 

Private Types

typedef std::vector< edm::propagate_const< std::unique_ptr< WrapperBase > > > ProductPtrVec
 

Private Member Functions

void commit_ (std::vector< edm::ProductResolverIndex > const &iShouldPut)
 
template<typename PROD , typename... Args>
void emplaceImpl (EDPutToken::value_type token, Args &&...args)
 
BasicHandle getByLabelImpl (std::type_info const &iWrapperType, std::type_info const &iProductType, InputTag const &iTag) const override
 
LuminosityBlockPrincipal const & luminosityBlockPrincipal () const
 
template<typename PROD >
void putImpl (EDPutToken::value_type token, std::unique_ptr< PROD > product)
 
ProductPtrVecputProducts ()
 
ProductPtrVec const & putProducts () const
 

Private Attributes

LuminosityBlockAuxiliary const & aux_
 
ModuleCallingContext const * moduleCallingContext_
 
PrincipalGetAdapter provRecorder_
 
ProductPtrVec putProducts_
 
std::shared_ptr< Run const > const run_
 

Static Private Attributes

static const std::string emptyString_
 

Friends

class ProducerBase
 
class RawInputSource
 
template<typename T >
class stream::ProducingModuleAdaptorBase
 

Detailed Description

Definition at line 47 of file LuminosityBlock.h.

Member Typedef Documentation

If you are caching data from the LuminosityBlock, you should also keep this number. If this number changes then you know that the data you have cached is invalid. The value of '0' will never be returned so you can use that to denote that you have not yet checked the value.

Definition at line 68 of file LuminosityBlock.h.

typedef std::vector<edm::propagate_const<std::unique_ptr<WrapperBase> > > edm::LuminosityBlock::ProductPtrVec
private

Definition at line 156 of file LuminosityBlock.h.

Constructor & Destructor Documentation

LuminosityBlock::LuminosityBlock ( LuminosityBlockPrincipal const &  lbp,
ModuleDescription const &  md,
ModuleCallingContext const *  moduleCallingContext,
bool  isAtEnd 
)

Definition at line 12 of file LuminosityBlock.cc.

16  : provRecorder_(lbp, md, isAtEnd),
17  aux_(lbp.aux()),
18  run_(new Run(lbp.runPrincipal(), md, moduleCallingContext, false)),
std::shared_ptr< Run const > const run_
ModuleCallingContext const * moduleCallingContext() const
LuminosityBlockAuxiliary const & aux_
ModuleCallingContext const * moduleCallingContext_
PrincipalGetAdapter provRecorder_
LuminosityBlock::~LuminosityBlock ( )
override

Definition at line 21 of file LuminosityBlock.cc.

21 {}

Member Function Documentation

LuminosityBlock::CacheIdentifier_t LuminosityBlock::cacheIdentifier ( ) const

Definition at line 25 of file LuminosityBlock.cc.

References edm::Principal::cacheIdentifier(), and luminosityBlockPrincipal().

25  {
27  }
LuminosityBlockPrincipal const & luminosityBlockPrincipal() const
CacheIdentifier_t cacheIdentifier() const
Definition: Principal.h:184
void LuminosityBlock::commit_ ( std::vector< edm::ProductResolverIndex > const &  iShouldPut)
private

Definition at line 59 of file LuminosityBlock.cc.

References edm::get_underlying_safe(), mps_fire::i, index(), edm::isEndTransition(), luminosityBlockPrincipal(), eostools::move(), AlCaHLTBitMon_ParallelJobs::p, edm::PrincipalGetAdapter::principal(), provRecorder_, edm::LuminosityBlockPrincipal::put(), putProducts(), edm::PrincipalGetAdapter::putTokenIndexToProductResolverIndex(), and edm::PrincipalGetAdapter::transition().

Referenced by edm::stream::ProducingModuleAdaptorBase< EDProducerBase >::commit().

59  {
60  LuminosityBlockPrincipal const& lbp = luminosityBlockPrincipal();
61  size_t nPut = 0;
62  for (size_t i = 0; i < putProducts().size(); ++i) {
63  auto& p = get_underlying_safe(putProducts()[i]);
64  if (p) {
66  ++nPut;
67  }
68  }
69 
70  auto sz = iShouldPut.size();
71  if (sz != 0 and sz != nPut) {
72  //some were missed
73  auto& p = provRecorder_.principal();
74  for (auto index : iShouldPut) {
75  auto resolver = p.getProductResolverByIndex(index);
76  if (not resolver->productResolved() and isEndTransition(provRecorder_.transition()) ==
77  resolver->branchDescription().availableOnlyAtEndTransition()) {
78  resolver->putProduct(std::unique_ptr<WrapperBase>());
79  }
80  }
81  }
82 
83  // the cleanup is all or none
84  putProducts().clear();
85  }
Transition transition() const
Principal const & principal() const
LuminosityBlockIndex index() const
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex() const
LuminosityBlockPrincipal const & luminosityBlockPrincipal() const
constexpr bool isEndTransition(Transition iValue)
Definition: Transition.h:25
std::shared_ptr< T > & get_underlying_safe(propagate_const< std::shared_ptr< T >> &iP)
ProductPtrVec & putProducts()
PrincipalGetAdapter provRecorder_
def move(src, dest)
Definition: eostools.py:511
template<typename PROD , typename... Args>
void LuminosityBlock::emplace ( EDPutTokenT< PROD token,
Args &&...  args 
)

puts a new product

Definition at line 235 of file LuminosityBlock.h.

References writedatasetfile::args, edm::EDPutTokenT< T >::index(), edm::EDPutTokenT< T >::isUninitialized(), PROD, edm::principal_get_adapter_detail::throwOnPutOfUninitializedToken(), and UNLIKELY.

Referenced by ConditionDumperInEdm::endLuminosityBlockProduce(), one::dqmimplementation::DQMLumisEDProducer::endLuminosityBlockProduce(), and RawPCCProducer::globalEndLuminosityBlockProduce().

235  {
236  if (UNLIKELY(token.isUninitialized())) {
238  }
239  emplaceImpl<PROD>(token.index(), std::forward<Args>(args)...);
240  }
void throwOnPutOfUninitializedToken(char const *principalType, std::type_info const &productType)
#define PROD(A, B)
#define UNLIKELY(x)
Definition: Likely.h:21
template<typename PROD , typename... Args>
void LuminosityBlock::emplace ( EDPutToken  token,
Args &&...  args 
)

Definition at line 243 of file LuminosityBlock.h.

References writedatasetfile::args, edm::EDPutToken::index(), edm::EDPutToken::isUninitialized(), PROD, edm::principal_get_adapter_detail::throwOnPutOfUninitializedToken(), edm::principal_get_adapter_detail::throwOnPutOfWrongType(), and UNLIKELY.

243  {
244  if (UNLIKELY(token.isUninitialized())) {
246  }
247  if (UNLIKELY(provRecorder_.getTypeIDForPutTokenIndex(token.index()) != TypeID{typeid(PROD)})) {
250  }
251 
252  emplaceImpl(token.index(), std::forward<Args>(args)...);
253  }
void throwOnPutOfUninitializedToken(char const *principalType, std::type_info const &productType)
TypeID const & getTypeIDForPutTokenIndex(EDPutToken::value_type index) const
void throwOnPutOfWrongType(std::type_info const &wrongType, TypeID const &rightType)
void emplaceImpl(EDPutToken::value_type token, Args &&...args)
PrincipalGetAdapter provRecorder_
#define PROD(A, B)
#define UNLIKELY(x)
Definition: Likely.h:21
template<typename PROD , typename... Args>
void LuminosityBlock::emplaceImpl ( EDPutToken::value_type  token,
Args &&...  args 
)
private

Definition at line 256 of file LuminosityBlock.h.

References writedatasetfile::args, eostools::move(), findQualityFiles::size, and relativeConstraints::value.

256  {
257  assert(index < putProducts().size());
258 
259  std::unique_ptr<Wrapper<PROD>> wp(new Wrapper<PROD>(WrapperBase::Emplace{}, std::forward<Args>(args)...));
260 
261  // The following will call post_insert if T has such a function,
262  // and do nothing if T has no such function.
263  std::conditional_t<detail::has_postinsert<PROD>::value, DoPostInsert<PROD>, DoNotPostInsert<PROD>> maybe_inserter;
264  maybe_inserter(&(wp->bareProduct()));
265 
266  putProducts()[index] = std::move(wp);
267  }
size
Write out results.
LuminosityBlockIndex index() const
ProductPtrVec & putProducts()
def move(src, dest)
Definition: eostools.py:511
template<typename PROD >
PROD const & LuminosityBlock::get ( EDGetTokenT< PROD token) const

Definition at line 345 of file LuminosityBlock.h.

References eostools::move(), edm::PRODUCT_TYPE, edm::principal_get_adapter_detail::throwOnPrematureRead(), and UNLIKELY.

Referenced by Options.Options::__getitem__(), betterConfigParser.BetterConfigParser::__updateDict(), rrapi.RRApi::columns(), rrapi.RRApi::count(), rrapi.RRApi::data(), betterConfigParser.BetterConfigParser::getCompares(), betterConfigParser.BetterConfigParser::getGeneral(), betterConfigParser.BetterConfigParser::getResultingSection(), rrapi.RRApi::report(), rrapi.RRApi::reports(), rrapi.RRApi::tables(), rrapi.RRApi::tags(), rrapi.RRApi::templates(), and rrapi.RRApi::workspaces().

345  {
346  if
348  principal_get_adapter_detail::throwOnPrematureRead("Lumi", TypeID(typeid(PROD)), token);
349  }
350  BasicHandle bh = provRecorder_.getByToken_(TypeID(typeid(PROD)), PRODUCT_TYPE, token, moduleCallingContext_);
351  return *convert_handle<PROD>(std::move(bh));
352  }
BasicHandle getByToken_(TypeID const &id, KindOfType kindOfType, EDGetToken token, ModuleCallingContext const *mcc) const
ModuleCallingContext const * moduleCallingContext_
PrincipalGetAdapter provRecorder_
#define PROD(A, B)
void throwOnPrematureRead(char const *principalType, TypeID const &productType, std::string const &moduleLabel, std::string const &productInstanceName)
#define UNLIKELY(x)
Definition: Likely.h:21
def move(src, dest)
Definition: eostools.py:511
void LuminosityBlock::getAllStableProvenance ( std::vector< StableProvenance const * > &  provenances) const

Definition at line 55 of file LuminosityBlock.cc.

References edm::Principal::getAllStableProvenance(), and luminosityBlockPrincipal().

55  {
57  }
LuminosityBlockPrincipal const & luminosityBlockPrincipal() const
void getAllStableProvenance(std::vector< StableProvenance const * > &provenances) const
Definition: Principal.cc:830
template<typename PROD >
bool LuminosityBlock::getByLabel ( std::string const &  label,
Handle< PROD > &  result 
) const

Definition at line 270 of file LuminosityBlock.h.

Referenced by pat::PATTriggerProducer::beginLuminosityBlock(), LumiCalculator::endLuminosityBlock(), LogErrorEventFilter::globalBeginLuminosityBlock(), and edm::service::RandomNumberGeneratorService::readFromLuminosityBlock().

270  {
271  return getByLabel(label, emptyString_, result);
272  }
static const std::string emptyString_
bool getByLabel(std::string const &label, Handle< PROD > &result) const
char const * label
template<typename PROD >
bool LuminosityBlock::getByLabel ( std::string const &  label,
std::string const &  productInstanceName,
Handle< PROD > &  result 
) const

Definition at line 275 of file LuminosityBlock.h.

References edm::HandleBase::clear(), edm::HandleBase::failedToGet(), eostools::move(), and edm::principal_get_adapter_detail::throwOnPrematureRead().

277  {
279  principal_get_adapter_detail::throwOnPrematureRead("Lumi", TypeID(typeid(PROD)), label, productInstanceName);
280  }
281  result.clear();
282  BasicHandle bh = provRecorder_.getByLabel_(
283  TypeID(typeid(PROD)), label, productInstanceName, emptyString_, moduleCallingContext_);
284  result = convert_handle<PROD>(std::move(bh)); // throws on conversion error
285  if (result.failedToGet()) {
286  return false;
287  }
288  return true;
289  }
BasicHandle getByLabel_(TypeID const &tid, InputTag const &tag, ModuleCallingContext const *mcc) const
static const std::string emptyString_
char const * label
ModuleCallingContext const * moduleCallingContext_
PrincipalGetAdapter provRecorder_
#define PROD(A, B)
void throwOnPrematureRead(char const *principalType, TypeID const &productType, std::string const &moduleLabel, std::string const &productInstanceName)
def move(src, dest)
Definition: eostools.py:511
template<typename PROD >
bool LuminosityBlock::getByLabel ( InputTag const &  tag,
Handle< PROD > &  result 
) const

same as above, but using the InputTag class

Definition at line 293 of file LuminosityBlock.h.

References edm::HandleBase::clear(), edm::HandleBase::failedToGet(), edm::InputTag::instance(), edm::InputTag::label(), eostools::move(), and edm::principal_get_adapter_detail::throwOnPrematureRead().

293  {
295  principal_get_adapter_detail::throwOnPrematureRead("Lumi", TypeID(typeid(PROD)), tag.label(), tag.instance());
296  }
297  result.clear();
298  BasicHandle bh = provRecorder_.getByLabel_(TypeID(typeid(PROD)), tag, moduleCallingContext_);
299  result = convert_handle<PROD>(std::move(bh)); // throws on conversion error
300  if (result.failedToGet()) {
301  return false;
302  }
303  return true;
304  }
BasicHandle getByLabel_(TypeID const &tid, InputTag const &tag, ModuleCallingContext const *mcc) const
ModuleCallingContext const * moduleCallingContext_
PrincipalGetAdapter provRecorder_
#define PROD(A, B)
void throwOnPrematureRead(char const *principalType, TypeID const &productType, std::string const &moduleLabel, std::string const &productInstanceName)
def move(src, dest)
Definition: eostools.py:511
BasicHandle LuminosityBlock::getByLabelImpl ( std::type_info const &  iWrapperType,
std::type_info const &  iProductType,
InputTag const &  iTag 
) const
overrideprivate

Definition at line 93 of file LuminosityBlock.cc.

References edm::PrincipalGetAdapter::getByLabel_(), h, moduleCallingContext_, and provRecorder_.

95  {
96  BasicHandle h = provRecorder_.getByLabel_(TypeID(iProductType), iTag, moduleCallingContext_);
97  return h;
98  }
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
BasicHandle getByLabel_(TypeID const &tid, InputTag const &tag, ModuleCallingContext const *mcc) const
ModuleCallingContext const * moduleCallingContext_
PrincipalGetAdapter provRecorder_
template<typename PROD >
bool LuminosityBlock::getByToken ( EDGetToken  token,
Handle< PROD > &  result 
) const

Definition at line 307 of file LuminosityBlock.h.

References edm::HandleBase::clear(), edm::HandleBase::failedToGet(), eostools::move(), edm::PRODUCT_TYPE, and edm::principal_get_adapter_detail::throwOnPrematureRead().

Referenced by EventHeader::analyze(), TrackCount::analyze(), IsoTrig::analyze(), L1GtAnalyzer::analyzeConditionsInLumiBlock(), HLTPrescaleRecorder::beginLuminosityBlock(), pat::PATTriggerEventProducer::beginLuminosityBlock(), BrilClient::dqmEndLuminosityBlock(), GenFilterEfficiencyAnalyzer::endLuminosityBlock(), MillePedeFileExtractor::endLuminosityBlock(), DQMLumiMonitor::endLuminosityBlock(), GenXSecAnalyzer::endLuminosityBlock(), CorrPCCProducer::endLuminosityBlock(), VertexHistogramMaker::fill(), DigiLumiCorrHistogramMaker::fill(), EDMtoMEConverter::Tokens< T >::getData(), GetLumi::getRawValue(), RawPCCProducer::globalEndLuminosityBlockProduce(), AlcaBeamSpotManager::readLumi(), SiPixelStatusManager::readLumi(), and GenWeightsTableProducer::streamBeginLuminosityBlock().

307  {
309  principal_get_adapter_detail::throwOnPrematureRead("Lumi", TypeID(typeid(PROD)), token);
310  }
311  result.clear();
312  BasicHandle bh = provRecorder_.getByToken_(TypeID(typeid(PROD)), PRODUCT_TYPE, token, moduleCallingContext_);
313  result = convert_handle<PROD>(std::move(bh)); // throws on conversion error
314  if (result.failedToGet()) {
315  return false;
316  }
317  return true;
318  }
BasicHandle getByToken_(TypeID const &id, KindOfType kindOfType, EDGetToken token, ModuleCallingContext const *mcc) const
ModuleCallingContext const * moduleCallingContext_
PrincipalGetAdapter provRecorder_
#define PROD(A, B)
void throwOnPrematureRead(char const *principalType, TypeID const &productType, std::string const &moduleLabel, std::string const &productInstanceName)
def move(src, dest)
Definition: eostools.py:511
template<typename PROD >
bool LuminosityBlock::getByToken ( EDGetTokenT< PROD token,
Handle< PROD > &  result 
) const

Definition at line 321 of file LuminosityBlock.h.

References edm::HandleBase::clear(), edm::HandleBase::failedToGet(), eostools::move(), edm::PRODUCT_TYPE, and edm::principal_get_adapter_detail::throwOnPrematureRead().

321  {
323  principal_get_adapter_detail::throwOnPrematureRead("Lumi", TypeID(typeid(PROD)), token);
324  }
325  result.clear();
326  BasicHandle bh = provRecorder_.getByToken_(TypeID(typeid(PROD)), PRODUCT_TYPE, token, moduleCallingContext_);
327  result = convert_handle<PROD>(std::move(bh)); // throws on conversion error
328  if (result.failedToGet()) {
329  return false;
330  }
331  return true;
332  }
BasicHandle getByToken_(TypeID const &id, KindOfType kindOfType, EDGetToken token, ModuleCallingContext const *mcc) const
ModuleCallingContext const * moduleCallingContext_
PrincipalGetAdapter provRecorder_
#define PROD(A, B)
void throwOnPrematureRead(char const *principalType, TypeID const &productType, std::string const &moduleLabel, std::string const &productInstanceName)
def move(src, dest)
Definition: eostools.py:511
template<typename PROD >
Handle< PROD > LuminosityBlock::getHandle ( EDGetTokenT< PROD token) const

Definition at line 335 of file LuminosityBlock.h.

References eostools::move(), edm::PRODUCT_TYPE, edm::principal_get_adapter_detail::throwOnPrematureRead(), and UNLIKELY.

Referenced by edm::GetterOfProducts< trigger::HLTPrescaleTable >::fillHandles().

335  {
336  if
338  principal_get_adapter_detail::throwOnPrematureRead("Lumi", TypeID(typeid(PROD)), token);
339  }
340  BasicHandle bh = provRecorder_.getByToken_(TypeID(typeid(PROD)), PRODUCT_TYPE, token, moduleCallingContext_);
341  return convert_handle<PROD>(std::move(bh));
342  }
BasicHandle getByToken_(TypeID const &id, KindOfType kindOfType, EDGetToken token, ModuleCallingContext const *mcc) const
ModuleCallingContext const * moduleCallingContext_
PrincipalGetAdapter provRecorder_
#define PROD(A, B)
void throwOnPrematureRead(char const *principalType, TypeID const &productType, std::string const &moduleLabel, std::string const &productInstanceName)
#define UNLIKELY(x)
Definition: Likely.h:21
def move(src, dest)
Definition: eostools.py:511
template<typename PROD >
void LuminosityBlock::getManyByType ( std::vector< Handle< PROD >> &  results) const

Definition at line 355 of file LuminosityBlock.h.

References edm::principal_get_adapter_detail::throwOnPrematureRead().

355  {
358  }
360  }
void getManyByType(std::vector< Handle< PROD > > &results, ModuleCallingContext const *mcc) const
ModuleCallingContext const * moduleCallingContext_
PrincipalGetAdapter provRecorder_
#define PROD(A, B)
void throwOnPrematureRead(char const *principalType, TypeID const &productType, std::string const &moduleLabel, std::string const &productInstanceName)
Provenance LuminosityBlock::getProvenance ( BranchID const &  theID) const

Definition at line 51 of file LuminosityBlock.cc.

References edm::Principal::getProvenance(), luminosityBlockPrincipal(), and moduleCallingContext_.

51  {
53  }
LuminosityBlockPrincipal const & luminosityBlockPrincipal() const
Provenance getProvenance(BranchID const &bid, ModuleCallingContext const *mcc) const
Definition: Principal.cc:796
ModuleCallingContext const * moduleCallingContext_
Run const& edm::LuminosityBlock::getRun ( ) const
inline
LuminosityBlockIndex LuminosityBlock::index ( ) const
Returns
Reusable index which can be used to separate data for different simultaneous LuminosityBlocks.

Definition at line 23 of file LuminosityBlock.cc.

References edm::LuminosityBlockPrincipal::index(), and luminosityBlockPrincipal().

Referenced by TotemTimingDQMSource::analyze(), CTPPSDiamondDQMSource::analyze(), L1TSync_Offline::analyze(), CTPPSCommonDQMSource::analyzeCTPPSRecord(), edm::CosMuoGenProducer::beginLuminosityBlock(), edm::BeamHaloProducer::beginLuminosityBlock(), gen::Pythia6Gun::beginLuminosityBlock(), EcalDigiProducer::beginLuminosityBlock(), edm::GeneratorFilter< HAD, DEC >::beginLuminosityBlockProduce(), edm::HadronizerFilter< HAD, DEC >::beginLuminosityBlockProduce(), commit_(), ConditionDumperInEdm::endLuminosityBlockProduce(), LogErrorEventFilter::filter(), RandomEngineStateProducer::globalBeginLuminosityBlockProduce(), CTPPSCommonDQMSource::globalEndLuminosityBlock(), TotemTimingDQMSource::globalEndLuminosityBlock(), CTPPSDiamondDQMSource::globalEndLuminosityBlock(), LogErrorEventFilter::globalEndLuminosityBlock(), GenFilterEfficiencyProducer::globalEndLuminosityBlockProduce(), LogErrorEventFilter::globalEndLuminosityBlockProduce(), BeautifulSoup.PageElement::insert(), edm::service::RandomNumberGeneratorService::preBeginLumi(), SiPixelDigiToRaw::produce(), ConditionDumperInEdm::produce(), GenFilterEfficiencyProducer::produce(), and edm::service::RandomNumberGeneratorService::readFromLuminosityBlock().

23 { return luminosityBlockPrincipal().index(); }
LuminosityBlockPrincipal const & luminosityBlockPrincipal() const
LuminosityBlockIndex index() const
void edm::LuminosityBlock::labelsForToken ( EDGetToken const &  iToken,
ProductLabels oLabels 
) const
inline

Definition at line 138 of file LuminosityBlock.h.

References writedatasetfile::args, and PROD.

138  {
139  provRecorder_.labelsForToken(iToken, oLabels);
140  }
PrincipalGetAdapter provRecorder_
void labelsForToken(EDGetToken const &iToken, ProductLabels &oLabels) const
LuminosityBlockAuxiliary const& edm::LuminosityBlock::luminosityBlockAuxiliary ( ) const
inlineoverridevirtual

Implements edm::LuminosityBlockBase.

Definition at line 56 of file LuminosityBlock.h.

Referenced by PixelLumiDQM::beginLuminosityBlock(), edm::PileUp::beginLuminosityBlock(), and PixelLumiDQM::endLuminosityBlock().

56 { return aux_; }
LuminosityBlockAuxiliary const & aux_
LuminosityBlockPrincipal const & LuminosityBlock::luminosityBlockPrincipal ( ) const
private

Definition at line 47 of file LuminosityBlock.cc.

References edm::PrincipalGetAdapter::principal(), and provRecorder_.

Referenced by cacheIdentifier(), commit_(), getAllStableProvenance(), getProvenance(), index(), and processHistoryID().

47  {
48  return dynamic_cast<LuminosityBlockPrincipal const&>(provRecorder_.principal());
49  }
Principal const & principal() const
PrincipalGetAdapter provRecorder_
ModuleCallingContext const* edm::LuminosityBlock::moduleCallingContext ( ) const
inline

Definition at line 136 of file LuminosityBlock.h.

Referenced by edm::PileUp::beginLuminosityBlock(), and edm::PileUp::endLuminosityBlock().

136 { return moduleCallingContext_; }
ModuleCallingContext const * moduleCallingContext_
ProcessHistory const & LuminosityBlock::processHistory ( ) const

Definition at line 91 of file LuminosityBlock.cc.

References edm::PrincipalGetAdapter::processHistory(), and provRecorder_.

Referenced by gen::BaseHadronizer::generateLHE().

91 { return provRecorder_.processHistory(); }
ProcessHistory const & processHistory() const
PrincipalGetAdapter provRecorder_
ProcessHistoryID const & LuminosityBlock::processHistoryID ( ) const

Definition at line 87 of file LuminosityBlock.cc.

References luminosityBlockPrincipal(), and edm::Principal::processHistoryID().

87  {
89  }
LuminosityBlockPrincipal const & luminosityBlockPrincipal() const
ProcessHistoryID const & processHistoryID() const
Definition: Principal.h:142
template<typename PROD >
void edm::LuminosityBlock::put ( std::unique_ptr< PROD product)
inline

Put a new product.

Definition at line 107 of file LuminosityBlock.h.

References writedatasetfile::args, eostools::move(), PROD, put(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by dqmservices::DQMProtobufReader::beginLuminosityBlock(), edm::GeneratorFilter< HAD, DEC >::beginLuminosityBlockProduce(), edm::HadronizerFilter< HAD, DEC >::beginLuminosityBlockProduce(), LumiProducer::beginLuminosityBlockProduce(), AlcaBeamSpotFromDB::endLuminosityBlockProduce(), AlcaBeamSpotProducer::endLuminosityBlockProduce(), DQMEDHarvester::endLuminosityBlockProduce(), MillePedeFileConverter::endLuminosityBlockProduce(), AlcaPCCProducer::endLuminosityBlockProduce(), EventCountProducer::endLuminosityBlockProduce(), SiPixelStatusProducer::endLuminosityBlockProduce(), HLTPrescaleRecorder::endLuminosityBlockProduce(), edm::GeneratorFilter< HAD, DEC >::endLuminosityBlockProduce(), EDMtoMEConverter::endLuminosityBlockProduce(), edm::HadronizerFilter< HAD, DEC >::endLuminosityBlockProduce(), RandomEngineStateProducer::globalBeginLuminosityBlockProduce(), GenFilterEfficiencyProducer::globalEndLuminosityBlockProduce(), LogErrorEventFilter::globalEndLuminosityBlockProduce(), ExpressLumiProducer::writeEmptyProductForEntry(), ExpressLumiProducer::writeProductsForEntry(), and LumiProducer::writeProductsForEntry().

107  {
108  put<PROD>(std::move(product), std::string());
109  }
def move(src, dest)
Definition: eostools.py:511
template<typename PROD >
void LuminosityBlock::put ( std::unique_ptr< PROD product,
std::string const &  productInstanceName 
)

Put a new product with a 'product instance name'.

Definition at line 194 of file LuminosityBlock.h.

References eostools::move(), PROD, edm::principal_get_adapter_detail::throwOnPutOfNullProduct(), and UNLIKELY.

194  {
195  if (UNLIKELY(product.get() == nullptr)) { // null pointer is illegal
196  TypeID typeID(typeid(PROD));
197  principal_get_adapter_detail::throwOnPutOfNullProduct("LuminosityBlock", typeID, productInstanceName);
198  }
199  auto index = provRecorder_.getPutTokenIndex(TypeID(*product), productInstanceName);
200  putImpl(index, std::move(product));
201  }
LuminosityBlockIndex index() const
void putImpl(EDPutToken::value_type token, std::unique_ptr< PROD > product)
PrincipalGetAdapter provRecorder_
EDPutToken::value_type getPutTokenIndex(TypeID const &type, std::string const &productInstanceName) const
#define PROD(A, B)
#define UNLIKELY(x)
Definition: Likely.h:21
void throwOnPutOfNullProduct(char const *principalType, TypeID const &productType, std::string const &productInstanceName)
def move(src, dest)
Definition: eostools.py:511
template<typename PROD >
void LuminosityBlock::put ( EDPutToken  token,
std::unique_ptr< PROD product 
)

Definition at line 217 of file LuminosityBlock.h.

References edm::EDPutToken::index(), edm::EDPutToken::isUninitialized(), eostools::move(), PROD, edm::principal_get_adapter_detail::throwOnPutOfNullProduct(), edm::principal_get_adapter_detail::throwOnPutOfUninitializedToken(), edm::principal_get_adapter_detail::throwOnPutOfWrongType(), and UNLIKELY.

217  {
218  if (UNLIKELY(product.get() == 0)) { // null pointer is illegal
219  TypeID typeID(typeid(PROD));
221  "LuminosityBlock", typeID, provRecorder_.productInstanceLabel(token));
222  }
223  if (UNLIKELY(token.isUninitialized())) {
225  }
226  if (UNLIKELY(provRecorder_.getTypeIDForPutTokenIndex(token.index()) != TypeID{typeid(PROD)})) {
229  }
230 
231  putImpl(token.index(), std::move(product));
232  }
void throwOnPutOfUninitializedToken(char const *principalType, std::type_info const &productType)
TypeID const & getTypeIDForPutTokenIndex(EDPutToken::value_type index) const
void putImpl(EDPutToken::value_type token, std::unique_ptr< PROD > product)
void throwOnPutOfWrongType(std::type_info const &wrongType, TypeID const &rightType)
std::string const & productInstanceLabel(EDPutToken) const
PrincipalGetAdapter provRecorder_
#define PROD(A, B)
#define UNLIKELY(x)
Definition: Likely.h:21
void throwOnPutOfNullProduct(char const *principalType, TypeID const &productType, std::string const &productInstanceName)
def move(src, dest)
Definition: eostools.py:511
template<typename PROD >
void LuminosityBlock::put ( EDPutTokenT< PROD token,
std::unique_ptr< PROD product 
)

Definition at line 204 of file LuminosityBlock.h.

References edm::EDPutTokenT< T >::index(), edm::EDPutTokenT< T >::isUninitialized(), eostools::move(), PROD, edm::principal_get_adapter_detail::throwOnPutOfNullProduct(), edm::principal_get_adapter_detail::throwOnPutOfUninitializedToken(), and UNLIKELY.

204  {
205  if (UNLIKELY(product.get() == 0)) { // null pointer is illegal
206  TypeID typeID(typeid(PROD));
208  "LuminosityBlock", typeID, provRecorder_.productInstanceLabel(token));
209  }
210  if (UNLIKELY(token.isUninitialized())) {
212  }
213  putImpl(token.index(), std::move(product));
214  }
void throwOnPutOfUninitializedToken(char const *principalType, std::type_info const &productType)
void putImpl(EDPutToken::value_type token, std::unique_ptr< PROD > product)
std::string const & productInstanceLabel(EDPutToken) const
PrincipalGetAdapter provRecorder_
#define PROD(A, B)
#define UNLIKELY(x)
Definition: Likely.h:21
void throwOnPutOfNullProduct(char const *principalType, TypeID const &productType, std::string const &productInstanceName)
def move(src, dest)
Definition: eostools.py:511
template<typename PROD >
void LuminosityBlock::putImpl ( EDPutToken::value_type  token,
std::unique_ptr< PROD product 
)
private

Definition at line 181 of file LuminosityBlock.h.

References eostools::move(), findQualityFiles::size, and relativeConstraints::value.

181  {
182  // The following will call post_insert if T has such a function,
183  // and do nothing if T has no such function.
184  std::conditional_t<detail::has_postinsert<PROD>::value, DoPostInsert<PROD>, DoNotPostInsert<PROD>> maybe_inserter;
185  maybe_inserter(product.get());
186 
187  assert(index < putProducts().size());
188 
189  std::unique_ptr<Wrapper<PROD>> wp(new Wrapper<PROD>(std::move(product)));
190  putProducts()[index] = std::move(wp);
191  }
size
Write out results.
LuminosityBlockIndex index() const
ProductPtrVec & putProducts()
def move(src, dest)
Definition: eostools.py:511
ProductPtrVec& edm::LuminosityBlock::putProducts ( )
inlineprivate

Definition at line 157 of file LuminosityBlock.h.

Referenced by commit_().

157 { return putProducts_; }
ProductPtrVec putProducts_
ProductPtrVec const& edm::LuminosityBlock::putProducts ( ) const
inlineprivate

Definition at line 158 of file LuminosityBlock.h.

158 { return putProducts_; }
ProductPtrVec putProducts_
void LuminosityBlock::setConsumer ( EDConsumerBase const *  iConsumer)

Definition at line 29 of file LuminosityBlock.cc.

References provRecorder_, run_, and edm::PrincipalGetAdapter::setConsumer().

Referenced by edm::EDAnalyzer::doBeginLuminosityBlock(), edm::EDProducer::doBeginLuminosityBlock(), edm::EDFilter::doBeginLuminosityBlock(), edm::one::EDProducerBase::doBeginLuminosityBlock(), edm::one::EDFilterBase::doBeginLuminosityBlock(), edm::one::EDAnalyzerBase::doBeginLuminosityBlock(), edm::global::EDAnalyzerBase::doBeginLuminosityBlock(), edm::limited::EDProducerBase::doBeginLuminosityBlock(), edm::global::EDProducerBase::doBeginLuminosityBlock(), edm::limited::EDFilterBase::doBeginLuminosityBlock(), edm::global::EDFilterBase::doBeginLuminosityBlock(), edm::limited::EDAnalyzerBase::doBeginLuminosityBlock(), edm::stream::EDAnalyzerAdaptor< T >::doBeginLuminosityBlock(), edm::stream::ProducingModuleAdaptor< T, M, B >::doBeginLuminosityBlock(), edm::EDAnalyzer::doEndLuminosityBlock(), edm::EDProducer::doEndLuminosityBlock(), edm::EDFilter::doEndLuminosityBlock(), edm::one::EDProducerBase::doEndLuminosityBlock(), edm::one::EDFilterBase::doEndLuminosityBlock(), edm::one::EDAnalyzerBase::doEndLuminosityBlock(), edm::global::EDAnalyzerBase::doEndLuminosityBlock(), edm::limited::EDProducerBase::doEndLuminosityBlock(), edm::global::EDProducerBase::doEndLuminosityBlock(), edm::limited::EDFilterBase::doEndLuminosityBlock(), edm::global::EDFilterBase::doEndLuminosityBlock(), edm::limited::EDAnalyzerBase::doEndLuminosityBlock(), edm::stream::EDAnalyzerAdaptor< T >::doEndLuminosityBlock(), edm::stream::ProducingModuleAdaptor< T, M, B >::doEndLuminosityBlock(), edm::global::EDAnalyzerBase::doStreamBeginLuminosityBlock(), edm::limited::EDProducerBase::doStreamBeginLuminosityBlock(), edm::global::EDProducerBase::doStreamBeginLuminosityBlock(), edm::limited::EDFilterBase::doStreamBeginLuminosityBlock(), edm::global::EDFilterBase::doStreamBeginLuminosityBlock(), edm::limited::EDAnalyzerBase::doStreamBeginLuminosityBlock(), edm::global::EDAnalyzerBase::doStreamEndLuminosityBlock(), edm::limited::EDProducerBase::doStreamEndLuminosityBlock(), edm::global::EDProducerBase::doStreamEndLuminosityBlock(), edm::limited::EDFilterBase::doStreamEndLuminosityBlock(), edm::global::EDFilterBase::doStreamEndLuminosityBlock(), edm::limited::EDAnalyzerBase::doStreamEndLuminosityBlock(), edm::stream::EDAnalyzerAdaptorBase::doStreamEndLuminosityBlock(), and edm::stream::ProducingModuleAdaptorBase< T >::doStreamEndLuminosityBlock().

29  {
30  provRecorder_.setConsumer(iConsumer);
31  if (run_) {
32  const_cast<Run*>(run_.get())->setConsumer(iConsumer);
33  }
34  }
void setConsumer(EDConsumerBase const *iConsumer)
void setConsumer(EDConsumerBase const *iConsumer)
std::shared_ptr< Run const > const run_
PrincipalGetAdapter provRecorder_
void LuminosityBlock::setProducer ( ProducerBase const *  iProducer)

Definition at line 41 of file LuminosityBlock.cc.

References provRecorder_, putProducts_, edm::PrincipalGetAdapter::putTokenIndexToProductResolverIndex(), and edm::PrincipalGetAdapter::setProducer().

Referenced by edm::PuttableSourceBase::doBeginLumi(), edm::one::EDFilterBase::doBeginLuminosityBlock(), edm::one::EDProducerBase::doBeginLuminosityBlock(), edm::limited::EDProducerBase::doBeginLuminosityBlock(), edm::global::EDProducerBase::doBeginLuminosityBlock(), edm::limited::EDFilterBase::doBeginLuminosityBlock(), edm::global::EDFilterBase::doBeginLuminosityBlock(), edm::stream::ProducingModuleAdaptor< T, M, B >::doBeginLuminosityBlock(), edm::one::EDFilterBase::doEndLuminosityBlock(), edm::one::EDProducerBase::doEndLuminosityBlock(), edm::limited::EDProducerBase::doEndLuminosityBlock(), edm::global::EDProducerBase::doEndLuminosityBlock(), edm::limited::EDFilterBase::doEndLuminosityBlock(), edm::global::EDFilterBase::doEndLuminosityBlock(), and edm::stream::ProducingModuleAdaptor< T, M, B >::doEndLuminosityBlock().

41  {
42  provRecorder_.setProducer(iProducer);
43  //set appropriate size
45  }
ProductPtrVec putProducts_
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex() const
void setProducer(ProducerBase const *iProd)
PrincipalGetAdapter provRecorder_
void LuminosityBlock::setSharedResourcesAcquirer ( SharedResourcesAcquirer iResourceAcquirer)

Definition at line 36 of file LuminosityBlock.cc.

References provRecorder_, run_, and edm::PrincipalGetAdapter::setSharedResourcesAcquirer().

36  {
37  provRecorder_.setSharedResourcesAcquirer(iResourceAcquirer);
38  const_cast<Run*>(run_.get())->setSharedResourcesAcquirer(iResourceAcquirer);
39  }
void setSharedResourcesAcquirer(SharedResourcesAcquirer *iResourceAcquirer)
std::shared_ptr< Run const > const run_
void setSharedResourcesAcquirer(SharedResourcesAcquirer *iSra)
PrincipalGetAdapter provRecorder_

Friends And Related Function Documentation

friend class ProducerBase
friend

Definition at line 165 of file LuminosityBlock.h.

friend class RawInputSource
friend

Definition at line 164 of file LuminosityBlock.h.

template<typename T >
friend class stream::ProducingModuleAdaptorBase
friend

Definition at line 167 of file LuminosityBlock.h.

Member Data Documentation

LuminosityBlockAuxiliary const& edm::LuminosityBlock::aux_
private

Definition at line 173 of file LuminosityBlock.h.

std::string const LuminosityBlock::emptyString_
staticprivate

Definition at line 177 of file LuminosityBlock.h.

ModuleCallingContext const* edm::LuminosityBlock::moduleCallingContext_
private

Definition at line 175 of file LuminosityBlock.h.

Referenced by getByLabelImpl(), and getProvenance().

PrincipalGetAdapter edm::LuminosityBlock::provRecorder_
private
ProductPtrVec edm::LuminosityBlock::putProducts_
private

Definition at line 172 of file LuminosityBlock.h.

Referenced by setProducer().

std::shared_ptr<Run const> const edm::LuminosityBlock::run_
private

Definition at line 174 of file LuminosityBlock.h.

Referenced by setConsumer(), and setSharedResourcesAcquirer().