CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes | Static Private Attributes | Friends
edm::Run Class Reference

#include <Run.h>

Inheritance diagram for edm::Run:
edm::RunBase

Public Types

typedef PrincipalGetAdapter Base
 
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 noexcept(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 const & getProvenance (BranchID const &theID) const
 
StableProvenance const & getStableProvenance (BranchID const &theID) const
 
RunIndex index () const
 
void labelsForToken (EDGetToken const &iToken, ProductLabels &oLabels) const
 
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)
 
 Run (RunTransitionInfo const &, ModuleDescription const &, ModuleCallingContext const *, bool isAtEnd)
 
 Run (RunPrincipal const &, ModuleDescription const &, ModuleCallingContext const *, bool isAtEnd)
 
RunAuxiliary const & runAuxiliary () const override
 
void setConsumer (EDConsumerBase const *iConsumer)
 
void setProducer (ProducerBase const *iProducer)
 
void setSharedResourcesAcquirer (SharedResourcesAcquirer *iResourceAcquirer)
 
 ~Run () override
 
- Public Member Functions inherited from edm::RunBase
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<typename T >
bool getByLabel (InputTag const &tag, Handle< T > &result) const
 
RunID const & id () const
 
RunNumber_t run () const
 
 RunBase ()
 
virtual ~RunBase ()
 

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
 
template<typename PROD >
void putImpl (EDPutToken::value_type token, std::unique_ptr< PROD > product)
 
ProductPtrVecputProducts ()
 
ProductPtrVec const & putProducts () const
 
RunPrincipal const & runPrincipal () const
 

Private Attributes

RunAuxiliary const & aux_
 
ModuleCallingContext const * moduleCallingContext_
 
PrincipalGetAdapter provRecorder_
 
ProductPtrVec putProducts_
 
SharedResourcesAcquirersharedResourcesAcquirer_
 

Static Private Attributes

static const std::string emptyString_
 

Friends

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

Detailed Description

Definition at line 45 of file Run.h.

Member Typedef Documentation

Definition at line 60 of file Run.h.

typedef unsigned long edm::Run::CacheIdentifier_t

If you are caching data from the Run, 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 79 of file Run.h.

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

Definition at line 170 of file Run.h.

Constructor & Destructor Documentation

Run::Run ( RunTransitionInfo const &  info,
ModuleDescription const &  md,
ModuleCallingContext const *  mcc,
bool  isAtEnd 
)

Definition at line 13 of file Run.cc.

14  : Run(info.principal(), md, mcc, isAtEnd) {}
static const TGPicture * info(bool iBackgroundIsBlack)
Run(RunTransitionInfo const &, ModuleDescription const &, ModuleCallingContext const *, bool isAtEnd)
Definition: Run.cc:13
Run::Run ( RunPrincipal const &  rp,
ModuleDescription const &  md,
ModuleCallingContext const *  moduleCallingContext,
bool  isAtEnd 
)

Definition at line 16 of file Run.cc.

20  : provRecorder_(rp, md, isAtEnd), aux_(rp.aux()), moduleCallingContext_(moduleCallingContext) {}
RunAuxiliary const & aux_
Definition: Run.h:187
ModuleCallingContext const * moduleCallingContext() const
Definition: Run.h:150
ModuleCallingContext const * moduleCallingContext_
Definition: Run.h:188
PrincipalGetAdapter provRecorder_
Definition: Run.h:185
Run::~Run ( )
override

Definition at line 22 of file Run.cc.

22 {}

Member Function Documentation

Run::CacheIdentifier_t Run::cacheIdentifier ( ) const

Definition at line 24 of file Run.cc.

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

24 { return runPrincipal().cacheIdentifier(); }
CacheIdentifier_t cacheIdentifier() const
Definition: Principal.h:185
RunPrincipal const & runPrincipal() const
Definition: Run.cc:28
void Run::commit_ ( std::vector< edm::ProductResolverIndex > const &  iShouldPut)
private

Definition at line 83 of file Run.cc.

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

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

83  {
84  RunPrincipal const& rp = runPrincipal();
85  size_t nPut = 0;
86  for (size_t i = 0; i < putProducts().size(); ++i) {
87  auto& p = get_underlying_safe(putProducts()[i]);
88  if (p) {
90  ++nPut;
91  }
92  }
93 
94  auto sz = iShouldPut.size();
95  if (sz != 0 and sz != nPut) {
96  //some were missed
97  auto& p = provRecorder_.principal();
98  for (auto index : iShouldPut) {
99  auto resolver = p.getProductResolverByIndex(index);
100  if (not resolver->productResolved() and isEndTransition(provRecorder_.transition()) ==
101  resolver->branchDescription().availableOnlyAtEndTransition()) {
102  dynamic_cast<ProductPutterBase const*>(resolver)->putProduct(std::unique_ptr<WrapperBase>());
103  }
104  }
105  }
106 
107  // the cleanup is all or none
108  putProducts().clear();
109  }
Transition transition() const
Principal const & principal() const
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex() const
constexpr std::shared_ptr< T > & get_underlying_safe(propagate_const< std::shared_ptr< T >> &iP)
constexpr bool isEndTransition(Transition iValue)
Definition: Transition.h:37
def move
Definition: eostools.py:511
RunIndex index() const
Definition: Run.cc:26
RunPrincipal const & runPrincipal() const
Definition: Run.cc:28
ProductPtrVec & putProducts()
Definition: Run.h:171
PrincipalGetAdapter provRecorder_
Definition: Run.h:185
template<typename PROD , typename... Args>
void Run::emplace ( EDPutTokenT< PROD token,
Args &&...  args 
)

puts a new product

Definition at line 248 of file Run.h.

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

Referenced by ConditionDumperInEdm::endRunProduce(), ParameterSetBlobProducer::globalBeginRunProduce(), and DQMEDAnalyzer::globalEndRunProduce().

248  {
249  if (UNLIKELY(token.isUninitialized())) {
251  }
252  emplaceImpl<PROD>(token.index(), std::forward<Args>(args)...);
253  }
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 Run::emplace ( EDPutToken  token,
Args &&...  args 
)

Definition at line 256 of file Run.h.

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

256  {
257  if (UNLIKELY(token.isUninitialized())) {
259  }
260  if (UNLIKELY(provRecorder_.getTypeIDForPutTokenIndex(token.index()) != TypeID{typeid(PROD)})) {
263  }
264 
265  emplaceImpl(token.index(), std::forward<Args>(args)...);
266  }
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)
#define PROD(A, B)
void emplaceImpl(EDPutToken::value_type token, Args &&...args)
Definition: Run.h:269
#define UNLIKELY(x)
Definition: Likely.h:21
PrincipalGetAdapter provRecorder_
Definition: Run.h:185
template<typename PROD , typename... Args>
void Run::emplaceImpl ( EDPutToken::value_type  token,
Args &&...  args 
)
private

Definition at line 269 of file Run.h.

References writedatasetfile::args, cms::cuda::assert(), index(), eostools::move(), putProducts(), findQualityFiles::size, and relativeConstraints::value.

Referenced by emplace().

269  {
270  assert(index < putProducts().size());
271 
272  std::unique_ptr<Wrapper<PROD>> wp(new Wrapper<PROD>(WrapperBase::Emplace{}, std::forward<Args>(args)...));
273 
274  // The following will call post_insert if T has such a function,
275  // and do nothing if T has no such function.
276  std::conditional_t<detail::has_postinsert<PROD>::value, DoPostInsert<PROD>, DoNotPostInsert<PROD>> maybe_inserter;
277  maybe_inserter(&(wp->bareProduct()));
278 
279  putProducts()[index] = std::move(wp);
280  }
assert(be >=bs)
def move
Definition: eostools.py:511
RunIndex index() const
Definition: Run.cc:26
ProductPtrVec & putProducts()
Definition: Run.h:171
tuple size
Write out results.
template<typename PROD >
PROD const & Run::get ( EDGetTokenT< PROD token) const
noexcept

Definition at line 355 of file Run.h.

References edm::PrincipalGetAdapter::checkIfComplete(), edm::PrincipalGetAdapter::getByToken_(), moduleCallingContext_, eostools::move(), PROD, edm::PRODUCT_TYPE, provRecorder_, and edm::principal_get_adapter_detail::throwOnPrematureRead().

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

355  {
358  }
359  BasicHandle bh = provRecorder_.getByToken_(TypeID(typeid(PROD)), PRODUCT_TYPE, token, moduleCallingContext_);
360  return *convert_handle<PROD>(std::move(bh));
361  }
BasicHandle getByToken_(TypeID const &id, KindOfType kindOfType, EDGetToken token, ModuleCallingContext const *mcc) const
def move
Definition: eostools.py:511
#define PROD(A, B)
void throwOnPrematureRead(char const *principalType, TypeID const &productType, std::string const &moduleLabel, std::string const &productInstanceName)
ModuleCallingContext const * moduleCallingContext_
Definition: Run.h:188
PrincipalGetAdapter provRecorder_
Definition: Run.h:185
void Run::getAllStableProvenance ( std::vector< StableProvenance const * > &  provenances) const

Definition at line 36 of file Run.cc.

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

Referenced by GlobalHitsProdHistStripper::beginRun().

36  {
37  runPrincipal().getAllStableProvenance(provenances);
38  }
void getAllStableProvenance(std::vector< StableProvenance const * > &provenances) const
Definition: Principal.cc:879
RunPrincipal const & runPrincipal() const
Definition: Run.cc:28
template<typename PROD >
bool Run::getByLabel ( std::string const &  label,
Handle< PROD > &  result 
) const
template<typename PROD >
bool Run::getByLabel ( std::string const &  label,
std::string const &  productInstanceName,
Handle< PROD > &  result 
) const

Definition at line 288 of file Run.h.

References edm::PrincipalGetAdapter::checkIfComplete(), edm::HandleBase::clear(), emptyString_, edm::HandleBase::failedToGet(), edm::PrincipalGetAdapter::getByLabel_(), moduleCallingContext_, eostools::move(), PROD, provRecorder_, and edm::principal_get_adapter_detail::throwOnPrematureRead().

288  {
290  principal_get_adapter_detail::throwOnPrematureRead("Run", TypeID(typeid(PROD)), label, productInstanceName);
291  }
292  result.clear();
293  BasicHandle bh = provRecorder_.getByLabel_(
294  TypeID(typeid(PROD)), label, productInstanceName, emptyString_, moduleCallingContext_);
295  result = convert_handle<PROD>(std::move(bh)); // throws on conversion error
296  if (result.failedToGet()) {
297  return false;
298  }
299  return true;
300  }
static const std::string emptyString_
Definition: Run.h:192
BasicHandle getByLabel_(TypeID const &tid, InputTag const &tag, ModuleCallingContext const *mcc) const
char const * label
def move
Definition: eostools.py:511
#define PROD(A, B)
void throwOnPrematureRead(char const *principalType, TypeID const &productType, std::string const &moduleLabel, std::string const &productInstanceName)
ModuleCallingContext const * moduleCallingContext_
Definition: Run.h:188
PrincipalGetAdapter provRecorder_
Definition: Run.h:185
template<typename PROD >
bool Run::getByLabel ( InputTag const &  tag,
Handle< PROD > &  result 
) const

same as above, but using the InputTag class

Definition at line 304 of file Run.h.

References edm::PrincipalGetAdapter::checkIfComplete(), edm::HandleBase::clear(), edm::HandleBase::failedToGet(), edm::PrincipalGetAdapter::getByLabel_(), edm::InputTag::instance(), edm::InputTag::label(), moduleCallingContext_, eostools::move(), PROD, provRecorder_, and edm::principal_get_adapter_detail::throwOnPrematureRead().

304  {
306  principal_get_adapter_detail::throwOnPrematureRead("Run", TypeID(typeid(PROD)), tag.label(), tag.instance());
307  }
308  result.clear();
309  BasicHandle bh = provRecorder_.getByLabel_(TypeID(typeid(PROD)), tag, moduleCallingContext_);
310  result = convert_handle<PROD>(std::move(bh)); // throws on conversion error
311  if (result.failedToGet()) {
312  return false;
313  }
314  return true;
315  }
BasicHandle getByLabel_(TypeID const &tid, InputTag const &tag, ModuleCallingContext const *mcc) const
def move
Definition: eostools.py:511
#define PROD(A, B)
void throwOnPrematureRead(char const *principalType, TypeID const &productType, std::string const &moduleLabel, std::string const &productInstanceName)
ModuleCallingContext const * moduleCallingContext_
Definition: Run.h:188
PrincipalGetAdapter provRecorder_
Definition: Run.h:185
BasicHandle Run::getByLabelImpl ( std::type_info const &  iWrapperType,
std::type_info const &  iProductType,
InputTag const &  iTag 
) const
overrideprivatevirtual

Implements edm::RunBase.

Definition at line 115 of file Run.cc.

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

117  {
118  BasicHandle h = provRecorder_.getByLabel_(TypeID(iProductType), iTag, moduleCallingContext_);
119  return h;
120  }
BasicHandle getByLabel_(TypeID const &tid, InputTag const &tag, ModuleCallingContext const *mcc) const
ModuleCallingContext const * moduleCallingContext_
Definition: Run.h:188
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
PrincipalGetAdapter provRecorder_
Definition: Run.h:185
template<typename PROD >
bool Run::getByToken ( EDGetToken  token,
Handle< PROD > &  result 
) const

Definition at line 318 of file Run.h.

References edm::PrincipalGetAdapter::checkIfComplete(), edm::HandleBase::clear(), edm::HandleBase::failedToGet(), edm::PrincipalGetAdapter::getByToken_(), moduleCallingContext_, eostools::move(), PROD, edm::PRODUCT_TYPE, provRecorder_, and edm::principal_get_adapter_detail::throwOnPrematureRead().

Referenced by L1GtAnalyzer::analyzeConditionsInRunBlock(), L1GtAnalyzer::analyzeL1GtTriggerMenuLite(), GenParticles2HepMCConverter::beginRun(), HLTPrescaleRecorder::beginRun(), pat::PATTriggerEventProducer::beginRun(), RunHistogramManager::beginRun(), LheWeightValidation::dqmEndRun(), LHEWriter::endRun(), ExternalLHEAsciiDumper::endRun(), EDMtoMEConverter::Tokens< T >::getData(), AlignmentProducer::getTkFittedLasBeamCollection(), AlignmentProducerAsAnalyzer::getTkFittedLasBeamCollection(), AlignmentProducer::getTsosVectorCollection(), AlignmentProducerAsAnalyzer::getTsosVectorCollection(), GenXSecAnalyzer::globalEndRun(), PrescaleWeightProvider::initRun(), and L1GtUtils::retrieveL1GtTriggerMenuLite().

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

Definition at line 332 of file Run.h.

References edm::PrincipalGetAdapter::checkIfComplete(), edm::HandleBase::clear(), edm::HandleBase::failedToGet(), edm::PrincipalGetAdapter::getByToken_(), moduleCallingContext_, eostools::move(), PROD, edm::PRODUCT_TYPE, provRecorder_, and edm::principal_get_adapter_detail::throwOnPrematureRead().

332  {
335  }
336  result.clear();
337  BasicHandle bh = provRecorder_.getByToken_(TypeID(typeid(PROD)), PRODUCT_TYPE, token, moduleCallingContext_);
338  result = convert_handle<PROD>(std::move(bh)); // throws on conversion error
339  if (result.failedToGet()) {
340  return false;
341  }
342  return true;
343  }
BasicHandle getByToken_(TypeID const &id, KindOfType kindOfType, EDGetToken token, ModuleCallingContext const *mcc) const
def move
Definition: eostools.py:511
#define PROD(A, B)
void throwOnPrematureRead(char const *principalType, TypeID const &productType, std::string const &moduleLabel, std::string const &productInstanceName)
ModuleCallingContext const * moduleCallingContext_
Definition: Run.h:188
PrincipalGetAdapter provRecorder_
Definition: Run.h:185
template<typename PROD >
Handle< PROD > Run::getHandle ( EDGetTokenT< PROD token) const

Definition at line 346 of file Run.h.

References edm::PrincipalGetAdapter::checkIfComplete(), edm::PrincipalGetAdapter::getByToken_(), moduleCallingContext_, eostools::move(), PROD, edm::PRODUCT_TYPE, provRecorder_, and edm::principal_get_adapter_detail::throwOnPrematureRead().

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

346  {
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
def move
Definition: eostools.py:511
#define PROD(A, B)
void throwOnPrematureRead(char const *principalType, TypeID const &productType, std::string const &moduleLabel, std::string const &productInstanceName)
ModuleCallingContext const * moduleCallingContext_
Definition: Run.h:188
PrincipalGetAdapter provRecorder_
Definition: Run.h:185
template<typename PROD >
void Run::getManyByType ( std::vector< Handle< PROD >> &  results) const

Definition at line 364 of file Run.h.

References edm::PrincipalGetAdapter::checkIfComplete(), edm::PrincipalGetAdapter::getManyByType(), moduleCallingContext_, PROD, provRecorder_, bookConverter::results, and edm::principal_get_adapter_detail::throwOnPrematureRead().

Referenced by GlobalHitsProdHistStripper::endRun().

364  {
367  }
369  }
dictionary results
void getManyByType(std::vector< Handle< PROD > > &results, ModuleCallingContext const *mcc) const
#define PROD(A, B)
void throwOnPrematureRead(char const *principalType, TypeID const &productType, std::string const &moduleLabel, std::string const &productInstanceName)
ModuleCallingContext const * moduleCallingContext_
Definition: Run.h:188
PrincipalGetAdapter provRecorder_
Definition: Run.h:185
Provenance const & Run::getProvenance ( BranchID const &  theID) const

Definition at line 30 of file Run.cc.

References edm::Principal::getProvenance(), and runPrincipal().

30 { return runPrincipal().getProvenance(bid); }
RunPrincipal const & runPrincipal() const
Definition: Run.cc:28
Provenance const & getProvenance(BranchID const &bid) const
Definition: Principal.cc:837
StableProvenance const & Run::getStableProvenance ( BranchID const &  theID) const

Definition at line 32 of file Run.cc.

References edm::Principal::getStableProvenance(), and runPrincipal().

32  {
33  return runPrincipal().getStableProvenance(bid);
34  }
StableProvenance const & getStableProvenance(BranchID const &bid) const
Definition: Principal.cc:850
RunPrincipal const & runPrincipal() const
Definition: Run.cc:28
RunIndex Run::index ( ) const
Returns
Reusable index which can be used to separate data for different simultaneous Runs.

Definition at line 26 of file Run.cc.

References edm::RunPrincipal::index(), and runPrincipal().

Referenced by BeautifulSoup.PageElement::_invert(), EcalPhiSymRecHitProducerRun::accumulate(), HLTriggerJSONMonitoring::analyze(), commit_(), emplaceImpl(), ConditionDumperInEdm::endRunProduce(), AlCaHcalHEMuonFilter::filter(), AlCaHcalHBHEMuonFilter::filter(), AlCaHcalIsotrkFilter::filter(), LogErrorEventFilter::filter(), LogErrorEventFilter::globalBeginLuminosityBlock(), HLTriggerJSONMonitoring::globalBeginLuminosityBlockSummary(), EcalPhiSymRecHitProducerRun::globalBeginRunSummary(), GenXSecAnalyzer::globalEndLuminosityBlock(), LogErrorEventFilter::globalEndLuminosityBlock(), HLTriggerJSONMonitoring::globalEndLuminosityBlockSummary(), L1TriggerJSONMonitoring::globalEndLuminosityBlockSummary(), L1TStage2CaloLayer1::globalEndLuminosityBlockSummary(), AlCaHcalHEMuonFilter::globalEndRun(), AlCaHcalHBHEMuonFilter::globalEndRun(), AlCaHcalIsotrkFilter::globalEndRun(), AlCaDiJetsProducer::globalEndRun(), GenXSecAnalyzer::globalEndRun(), LogErrorEventFilter::globalEndRun(), edm::ConcurrentHadronizerFilter< HAD, DEC >::globalEndRunProduce(), edm::ConcurrentGeneratorFilter< HAD, DEC >::globalEndRunProduce(), L1TStage2CaloLayer1::globalEndRunSummary(), GEMDigiToRawModule::produce(), GEMRawToDigiModule::produce(), ConfigurableAPVCyclePhaseProducer::produce(), L1Comparator::produce(), AlCaDiJetsProducer::produce(), ConditionDumperInEdm::produce(), GenParticleProducer::produce(), GenPUProtonProducer::produce(), GenWeightsTableProducer::produce(), put(), putImpl(), HLTriggerJSONMonitoring::streamBeginLuminosityBlock(), EcalPhiSymRecHitProducerRun::streamBeginRun(), HLTriggerJSONMonitoring::streamEndLuminosityBlockSummary(), edm::ConcurrentHadronizerFilter< HAD, DEC >::streamEndRun(), and edm::ConcurrentGeneratorFilter< HAD, DEC >::streamEndRun().

26 { return runPrincipal().index(); }
RunPrincipal const & runPrincipal() const
Definition: Run.cc:28
RunIndex index() const
Definition: RunPrincipal.h:57
void edm::Run::labelsForToken ( EDGetToken const &  iToken,
ProductLabels oLabels 
) const
inline

Definition at line 152 of file Run.h.

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

152  {
153  provRecorder_.labelsForToken(iToken, oLabels);
154  }
void labelsForToken(EDGetToken const &iToken, ProductLabels &oLabels) const
PrincipalGetAdapter provRecorder_
Definition: Run.h:185
ModuleCallingContext const* edm::Run::moduleCallingContext ( ) const
inline

Definition at line 150 of file Run.h.

References moduleCallingContext_.

Referenced by edm::PileUp::beginRun(), and edm::PileUp::endRun().

150 { return moduleCallingContext_; }
ModuleCallingContext const * moduleCallingContext_
Definition: Run.h:188
ProcessHistory const & Run::processHistory ( ) const
ProcessHistoryID const & Run::processHistoryID ( ) const

Definition at line 111 of file Run.cc.

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

111 { return runPrincipal().processHistoryID(); }
ProcessHistoryID const & processHistoryID() const
Definition: Principal.h:142
RunPrincipal const & runPrincipal() const
Definition: Run.cc:28
template<typename PROD >
void edm::Run::put ( std::unique_ptr< PROD product)
inline
template<typename PROD >
void Run::put ( std::unique_ptr< PROD product,
std::string const &  productInstanceName 
)

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

Definition at line 209 of file Run.h.

References edm::PrincipalGetAdapter::getPutTokenIndex(), index(), eostools::move(), PROD, provRecorder_, putImpl(), edm::principal_get_adapter_detail::throwOnPutOfNullProduct(), and UNLIKELY.

209  {
210  if (UNLIKELY(product.get() == nullptr)) { // null pointer is illegal
211  TypeID typeID(typeid(PROD));
212  principal_get_adapter_detail::throwOnPutOfNullProduct("Run", typeID, productInstanceName);
213  }
214  auto index = provRecorder_.getPutTokenIndex(TypeID(*product), productInstanceName);
215  putImpl(index, std::move(product));
216  }
def move
Definition: eostools.py:511
RunIndex index() const
Definition: Run.cc:26
void putImpl(EDPutToken::value_type token, std::unique_ptr< PROD > product)
Definition: Run.h:196
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)
PrincipalGetAdapter provRecorder_
Definition: Run.h:185
template<typename PROD >
void Run::put ( EDPutToken  token,
std::unique_ptr< PROD product 
)

Definition at line 231 of file Run.h.

References edm::PrincipalGetAdapter::getTypeIDForPutTokenIndex(), edm::EDPutToken::index(), edm::EDPutToken::isUninitialized(), eostools::move(), PROD, edm::PrincipalGetAdapter::productInstanceLabel(), provRecorder_, putImpl(), edm::principal_get_adapter_detail::throwOnPutOfNullProduct(), edm::principal_get_adapter_detail::throwOnPutOfUninitializedToken(), edm::principal_get_adapter_detail::throwOnPutOfWrongType(), and UNLIKELY.

231  {
232  if (UNLIKELY(product.get() == 0)) { // null pointer is illegal
233  TypeID typeID(typeid(PROD));
235  }
236  if (UNLIKELY(token.isUninitialized())) {
238  }
239  if (UNLIKELY(provRecorder_.getTypeIDForPutTokenIndex(token.index()) != TypeID{typeid(PROD)})) {
242  }
243 
244  putImpl(token.index(), std::move(product));
245  }
void throwOnPutOfUninitializedToken(char const *principalType, std::type_info const &productType)
TypeID const & getTypeIDForPutTokenIndex(EDPutToken::value_type index) const
def move
Definition: eostools.py:511
void throwOnPutOfWrongType(std::type_info const &wrongType, TypeID const &rightType)
void putImpl(EDPutToken::value_type token, std::unique_ptr< PROD > product)
Definition: Run.h:196
std::string const & productInstanceLabel(EDPutToken) const
#define PROD(A, B)
#define UNLIKELY(x)
Definition: Likely.h:21
void throwOnPutOfNullProduct(char const *principalType, TypeID const &productType, std::string const &productInstanceName)
PrincipalGetAdapter provRecorder_
Definition: Run.h:185
template<typename PROD >
void Run::put ( EDPutTokenT< PROD token,
std::unique_ptr< PROD product 
)

Definition at line 219 of file Run.h.

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

219  {
220  if (UNLIKELY(product.get() == nullptr)) { // null pointer is illegal
221  TypeID typeID(typeid(PROD));
223  }
224  if (UNLIKELY(token.isUninitialized())) {
226  }
227  putImpl(token.index(), std::move(product));
228  }
void throwOnPutOfUninitializedToken(char const *principalType, std::type_info const &productType)
def move
Definition: eostools.py:511
void putImpl(EDPutToken::value_type token, std::unique_ptr< PROD > product)
Definition: Run.h:196
std::string const & productInstanceLabel(EDPutToken) const
#define PROD(A, B)
#define UNLIKELY(x)
Definition: Likely.h:21
void throwOnPutOfNullProduct(char const *principalType, TypeID const &productType, std::string const &productInstanceName)
PrincipalGetAdapter provRecorder_
Definition: Run.h:185
template<typename PROD >
void Run::putImpl ( EDPutToken::value_type  token,
std::unique_ptr< PROD product 
)
private

Definition at line 196 of file Run.h.

References cms::cuda::assert(), index(), eostools::move(), putProducts(), findQualityFiles::size, and relativeConstraints::value.

Referenced by put().

196  {
197  // The following will call post_insert if T has such a function,
198  // and do nothing if T has no such function.
199  std::conditional_t<detail::has_postinsert<PROD>::value, DoPostInsert<PROD>, DoNotPostInsert<PROD>> maybe_inserter;
200  maybe_inserter(product.get());
201 
202  assert(index < putProducts().size());
203 
204  std::unique_ptr<Wrapper<PROD>> wp(new Wrapper<PROD>(std::move(product)));
205  putProducts()[index] = std::move(wp);
206  }
assert(be >=bs)
def move
Definition: eostools.py:511
RunIndex index() const
Definition: Run.cc:26
ProductPtrVec & putProducts()
Definition: Run.h:171
tuple size
Write out results.
ProductPtrVec& edm::Run::putProducts ( )
inlineprivate

Definition at line 171 of file Run.h.

References putProducts_.

Referenced by commit_(), emplaceImpl(), and putImpl().

171 { return putProducts_; }
ProductPtrVec putProducts_
Definition: Run.h:186
ProductPtrVec const& edm::Run::putProducts ( ) const
inlineprivate

Definition at line 172 of file Run.h.

References putProducts_.

172 { return putProducts_; }
ProductPtrVec putProducts_
Definition: Run.h:186
RunAuxiliary const& edm::Run::runAuxiliary ( ) const
inlineoverridevirtual
RunPrincipal const & Run::runPrincipal ( ) const
private

Definition at line 28 of file Run.cc.

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

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

28 { return dynamic_cast<RunPrincipal const&>(provRecorder_.principal()); }
Principal const & principal() const
PrincipalGetAdapter provRecorder_
Definition: Run.h:185
void edm::Run::setConsumer ( EDConsumerBase const *  iConsumer)
inline

Definition at line 52 of file Run.h.

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

Referenced by edm::EDAnalyzer::doBeginRun(), edm::EDProducer::doBeginRun(), edm::EDFilter::doBeginRun(), edm::one::EDProducerBase::doBeginRun(), edm::one::EDFilterBase::doBeginRun(), edm::one::EDAnalyzerBase::doBeginRun(), edm::EDLooperBase::doBeginRun(), edm::global::EDAnalyzerBase::doBeginRun(), edm::global::EDProducerBase::doBeginRun(), edm::limited::EDProducerBase::doBeginRun(), edm::global::EDFilterBase::doBeginRun(), edm::limited::EDFilterBase::doBeginRun(), edm::limited::EDAnalyzerBase::doBeginRun(), edm::stream::EDAnalyzerAdaptor< T >::doBeginRun(), edm::stream::ProducingModuleAdaptor< T, M, B >::doBeginRun(), edm::EDAnalyzer::doEndRun(), edm::EDProducer::doEndRun(), edm::EDFilter::doEndRun(), edm::one::EDFilterBase::doEndRun(), edm::one::EDProducerBase::doEndRun(), edm::one::EDAnalyzerBase::doEndRun(), edm::EDLooperBase::doEndRun(), edm::global::EDAnalyzerBase::doEndRun(), edm::global::EDProducerBase::doEndRun(), edm::limited::EDProducerBase::doEndRun(), edm::global::EDFilterBase::doEndRun(), edm::limited::EDFilterBase::doEndRun(), edm::limited::EDAnalyzerBase::doEndRun(), edm::stream::EDAnalyzerAdaptor< T >::doEndRun(), edm::stream::ProducingModuleAdaptor< T, M, B >::doEndRun(), edm::global::EDAnalyzerBase::doStreamBeginRun(), edm::global::EDProducerBase::doStreamBeginRun(), edm::limited::EDProducerBase::doStreamBeginRun(), edm::limited::EDFilterBase::doStreamBeginRun(), edm::global::EDFilterBase::doStreamBeginRun(), edm::limited::EDAnalyzerBase::doStreamBeginRun(), edm::global::EDAnalyzerBase::doStreamEndRun(), edm::limited::EDProducerBase::doStreamEndRun(), edm::global::EDProducerBase::doStreamEndRun(), edm::limited::EDFilterBase::doStreamEndRun(), edm::global::EDFilterBase::doStreamEndRun(), edm::limited::EDAnalyzerBase::doStreamEndRun(), edm::stream::EDAnalyzerAdaptorBase::doStreamEndRun(), and edm::stream::ProducingModuleAdaptorBase< T >::doStreamEndRun().

52 { provRecorder_.setConsumer(iConsumer); }
void setConsumer(EDConsumerBase const *iConsumer)
PrincipalGetAdapter provRecorder_
Definition: Run.h:185
void Run::setProducer ( ProducerBase const *  iProducer)
void edm::Run::setSharedResourcesAcquirer ( SharedResourcesAcquirer iResourceAcquirer)
inline

Definition at line 54 of file Run.h.

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

54  {
55  provRecorder_.setSharedResourcesAcquirer(iResourceAcquirer);
56  }
void setSharedResourcesAcquirer(SharedResourcesAcquirer *iSra)
PrincipalGetAdapter provRecorder_
Definition: Run.h:185

Friends And Related Function Documentation

friend class ProducerBase
friend

Definition at line 179 of file Run.h.

friend class RawInputSource
friend

Definition at line 178 of file Run.h.

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

Definition at line 181 of file Run.h.

Member Data Documentation

RunAuxiliary const& edm::Run::aux_
private

Definition at line 187 of file Run.h.

Referenced by runAuxiliary().

std::string const Run::emptyString_
staticprivate

Definition at line 192 of file Run.h.

Referenced by getByLabel().

ModuleCallingContext const* edm::Run::moduleCallingContext_
private
PrincipalGetAdapter edm::Run::provRecorder_
private
ProductPtrVec edm::Run::putProducts_
private

Definition at line 186 of file Run.h.

Referenced by putProducts(), and setProducer().

SharedResourcesAcquirer* edm::Run::sharedResourcesAcquirer_
private

Definition at line 190 of file Run.h.