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::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)
 
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 >
void getManyByType (std::vector< Handle< PROD > > &results) const
 
Provenance getProvenance (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 (RunPrincipal const &rp, ModuleDescription const &md, 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 44 of file Run.h.

Member Typedef Documentation

Definition at line 61 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 80 of file Run.h.

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

Definition at line 179 of file Run.h.

Constructor & Destructor Documentation

Run::Run ( RunPrincipal const &  rp,
ModuleDescription const &  md,
ModuleCallingContext const *  moduleCallingContext,
bool  isAtEnd 
)

Definition at line 11 of file Run.cc.

12  :
13  provRecorder_(rp, md, isAtEnd),
14  aux_(rp.aux()),
16  }
RunAuxiliary const & aux_
Definition: Run.h:195
ModuleCallingContext const * moduleCallingContext() const
Definition: Run.h:160
ModuleCallingContext const * moduleCallingContext_
Definition: Run.h:196
PrincipalGetAdapter provRecorder_
Definition: Run.h:193
Run::~Run ( )
override

Definition at line 18 of file Run.cc.

18  {
19  }

Member Function Documentation

Run::CacheIdentifier_t Run::cacheIdentifier ( ) const

Definition at line 22 of file Run.cc.

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

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

Definition at line 87 of file Run.cc.

References 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().

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

puts a new product

Definition at line 262 of file Run.h.

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

Referenced by one::dqmimplementation::DQMRunEDProducer< edm::one::WatchLuminosityBlocks >::endRunProduce().

262  {
263  if(UNLIKELY(token.isUninitialized())) {
265  }
266  emplaceImpl<PROD>(token.index(),std::forward<Args>(args)...);
267  }
void throwOnPutOfUninitializedToken(char const *principalType, std::type_info const &productType)
#define PROD(A, B)
#define UNLIKELY(x)
template<typename PROD , typename... Args>
void Run::emplace ( EDPutToken  token,
Args &&...  args 
)

Definition at line 271 of file Run.h.

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

271  {
272  if(UNLIKELY(token.isUninitialized())) {
274  }
275  if(UNLIKELY(provRecorder_.getTypeIDForPutTokenIndex(token.index()) != TypeID{typeid(PROD)})) {
277  }
278 
279  emplaceImpl(token.index(),std::forward<Args>(args)...);
280  }
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:284
PrincipalGetAdapter provRecorder_
Definition: Run.h:193
#define UNLIKELY(x)
template<typename PROD , typename... Args>
void Run::emplaceImpl ( EDPutToken::value_type  token,
Args &&...  args 
)
private

Definition at line 284 of file Run.h.

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

284  {
285 
286  assert(index < putProducts().size());
287 
288  std::unique_ptr<Wrapper<PROD> > wp(new Wrapper<PROD>(WrapperBase::Emplace{},
289  std::forward<Args>(args)...));
290 
291  // The following will call post_insert if T has such a function,
292  // and do nothing if T has no such function.
294  DoPostInsert<PROD>,
295  DoNotPostInsert<PROD>> maybe_inserter;
296  maybe_inserter(&(wp->bareProduct()));
297 
298  putProducts()[index]=std::move(wp);
299  }
size
Write out results.
RunIndex index() const
Definition: Run.cc:24
ProductPtrVec & putProducts()
Definition: Run.h:180
def move(src, dest)
Definition: eostools.py:511
void Run::getAllStableProvenance ( std::vector< StableProvenance const * > &  provenances) const

Definition at line 37 of file Run.cc.

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

Referenced by GlobalHitsProdHistStripper::beginRun().

37  {
38  runPrincipal().getAllStableProvenance(provenances);
39  }
void getAllStableProvenance(std::vector< StableProvenance const * > &provenances) const
Definition: Principal.cc:833
RunPrincipal const & runPrincipal() const
Definition: Run.cc:27
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 310 of file Run.h.

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

312  {
314  principal_get_adapter_detail::throwOnPrematureRead("Run", TypeID(typeid(PROD)), label, productInstanceName);
315  }
316  result.clear();
317  BasicHandle bh = provRecorder_.getByLabel_(TypeID(typeid(PROD)), label, productInstanceName, emptyString_, moduleCallingContext_);
318  convert_handle(std::move(bh), result); // throws on conversion error
319  if (result.failedToGet()) {
320  return false;
321  }
322  return true;
323  }
static const std::string emptyString_
Definition: Run.h:199
BasicHandle getByLabel_(TypeID const &tid, InputTag const &tag, ModuleCallingContext const *mcc) const
char const * label
void convert_handle(BasicHandle &&bh, Handle< T > &result)
Definition: ConvertHandle.h:20
#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:196
def move(src, dest)
Definition: eostools.py:511
PrincipalGetAdapter provRecorder_
Definition: Run.h:193
template<typename PROD >
bool Run::getByLabel ( InputTag const &  tag,
Handle< PROD > &  result 
) const

same as above, but using the InputTag class

Definition at line 328 of file Run.h.

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

328  {
330  principal_get_adapter_detail::throwOnPrematureRead("Run", TypeID(typeid(PROD)), tag.label(), tag.instance());
331  }
332  result.clear();
333  BasicHandle bh = provRecorder_.getByLabel_(TypeID(typeid(PROD)), tag, moduleCallingContext_);
334  convert_handle(std::move(bh), result); // throws on conversion error
335  if (result.failedToGet()) {
336  return false;
337  }
338  return true;
339  }
BasicHandle getByLabel_(TypeID const &tid, InputTag const &tag, ModuleCallingContext const *mcc) const
void convert_handle(BasicHandle &&bh, Handle< T > &result)
Definition: ConvertHandle.h:20
#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:196
def move(src, dest)
Definition: eostools.py:511
PrincipalGetAdapter provRecorder_
Definition: Run.h:193
BasicHandle Run::getByLabelImpl ( std::type_info const &  iWrapperType,
std::type_info const &  iProductType,
InputTag const &  iTag 
) const
overrideprivatevirtual

Implements edm::RunBase.

Definition at line 126 of file Run.cc.

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

126  {
127  BasicHandle h = provRecorder_.getByLabel_(TypeID(iProductType), iTag, moduleCallingContext_);
128  return h;
129  }
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_
Definition: Run.h:196
PrincipalGetAdapter provRecorder_
Definition: Run.h:193
template<typename PROD >
bool Run::getByToken ( EDGetToken  token,
Handle< PROD > &  result 
) const

Definition at line 343 of file Run.h.

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

Referenced by L1GtAnalyzer::analyzeConditionsInRunBlock(), L1GtAnalyzer::analyzeL1GtTriggerMenuLite(), HLTPrescaleRecorder::beginRun(), pat::PATTriggerEventProducer::beginRun(), RunHistogramManager::beginRun(), LHEWriter::endRun(), ExternalLHEAsciiDumper::endRun(), GenXSecAnalyzer::endRun(), edm::GetterOfProducts< trigger::HLTPrescaleTable >::fillHandles(), EDMtoMEConverter::Tokens< T >::getData(), AlignmentProducerAsAnalyzer::getTkFittedLasBeamCollection(), AlignmentProducerAsAnalyzer::getTsosVectorCollection(), PrescaleWeightProvider::initRun(), and L1GtUtils::retrieveL1GtTriggerMenuLite().

343  {
345  principal_get_adapter_detail::throwOnPrematureRead("Run", TypeID(typeid(PROD)), token);
346  }
347  result.clear();
348  BasicHandle bh = provRecorder_.getByToken_(TypeID(typeid(PROD)),PRODUCT_TYPE, token, moduleCallingContext_);
349  convert_handle(std::move(bh), result); // throws on conversion error
350  if (result.failedToGet()) {
351  return false;
352  }
353  return true;
354  }
BasicHandle getByToken_(TypeID const &id, KindOfType kindOfType, EDGetToken token, ModuleCallingContext const *mcc) const
void convert_handle(BasicHandle &&bh, Handle< T > &result)
Definition: ConvertHandle.h:20
#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:196
def move(src, dest)
Definition: eostools.py:511
PrincipalGetAdapter provRecorder_
Definition: Run.h:193
template<typename PROD >
bool Run::getByToken ( EDGetTokenT< PROD token,
Handle< PROD > &  result 
) const

Definition at line 358 of file Run.h.

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

358  {
360  principal_get_adapter_detail::throwOnPrematureRead("Run", TypeID(typeid(PROD)), token);
361  }
362  result.clear();
363  BasicHandle bh = provRecorder_.getByToken_(TypeID(typeid(PROD)),PRODUCT_TYPE, token, moduleCallingContext_);
364  convert_handle(std::move(bh), result); // throws on conversion error
365  if (result.failedToGet()) {
366  return false;
367  }
368  return true;
369  }
BasicHandle getByToken_(TypeID const &id, KindOfType kindOfType, EDGetToken token, ModuleCallingContext const *mcc) const
void convert_handle(BasicHandle &&bh, Handle< T > &result)
Definition: ConvertHandle.h:20
#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:196
def move(src, dest)
Definition: eostools.py:511
PrincipalGetAdapter provRecorder_
Definition: Run.h:193
template<typename PROD >
void Run::getManyByType ( std::vector< Handle< PROD > > &  results) const

Definition at line 373 of file Run.h.

References mps_update::results, and edm::principal_get_adapter_detail::throwOnPrematureRead().

Referenced by GlobalHitsProdHistStripper::endRun().

373  {
376  }
378  }
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:196
PrincipalGetAdapter provRecorder_
Definition: Run.h:193
Provenance Run::getProvenance ( BranchID const &  theID) const

Definition at line 32 of file Run.cc.

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

32  {
34  }
Provenance getProvenance(BranchID const &bid, ModuleCallingContext const *mcc) const
Definition: Principal.cc:797
RunPrincipal const & runPrincipal() const
Definition: Run.cc:27
ModuleCallingContext const * moduleCallingContext_
Definition: Run.h:196
RunIndex Run::index ( ) const
void edm::Run::labelsForToken ( EDGetToken const &  iToken,
ProductLabels oLabels 
) const
inline

Definition at line 162 of file Run.h.

References createfilelist::args, and PROD.

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

Definition at line 160 of file Run.h.

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

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

Definition at line 116 of file Run.cc.

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

116  {
117  return runPrincipal().processHistoryID();
118  }
ProcessHistoryID const & processHistoryID() const
Definition: Principal.h:144
RunPrincipal const & runPrincipal() const
Definition: Run.cc:27
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 220 of file Run.h.

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

220  {
221  if(UNLIKELY(product.get() == nullptr)) { // null pointer is illegal
222  TypeID typeID(typeid(PROD));
223  principal_get_adapter_detail::throwOnPutOfNullProduct("Run", typeID, productInstanceName);
224  }
225  auto index =
226  provRecorder_.getPutTokenIndex(TypeID(*product), productInstanceName);
227  putImpl(index, std::move(product));
228  }
RunIndex index() const
Definition: Run.cc:24
void putImpl(EDPutToken::value_type token, std::unique_ptr< PROD > product)
Definition: Run.h:204
EDPutToken::value_type getPutTokenIndex(TypeID const &type, std::string const &productInstanceName) const
#define PROD(A, B)
void throwOnPutOfNullProduct(char const *principalType, TypeID const &productType, std::string const &productInstanceName)
def move(src, dest)
Definition: eostools.py:511
PrincipalGetAdapter provRecorder_
Definition: Run.h:193
#define UNLIKELY(x)
template<typename PROD >
void Run::put ( EDPutToken  token,
std::unique_ptr< PROD product 
)

Definition at line 245 of file Run.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.

245  {
246  if(UNLIKELY(product.get() == 0)) { // null pointer is illegal
247  TypeID typeID(typeid(PROD));
249  }
250  if(UNLIKELY(token.isUninitialized())) {
252  }
253  if(UNLIKELY(provRecorder_.getTypeIDForPutTokenIndex(token.index()) != TypeID{typeid(PROD)})) {
255  }
256 
257  putImpl(token.index(),std::move(product));
258  }
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 putImpl(EDPutToken::value_type token, std::unique_ptr< PROD > product)
Definition: Run.h:204
std::string const & productInstanceLabel(EDPutToken) const
#define PROD(A, B)
void throwOnPutOfNullProduct(char const *principalType, TypeID const &productType, std::string const &productInstanceName)
def move(src, dest)
Definition: eostools.py:511
PrincipalGetAdapter provRecorder_
Definition: Run.h:193
#define UNLIKELY(x)
template<typename PROD >
void Run::put ( EDPutTokenT< PROD token,
std::unique_ptr< PROD product 
)

Definition at line 232 of file Run.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.

232  {
233  if(UNLIKELY(product.get() == 0)) { // null pointer is illegal
234  TypeID typeID(typeid(PROD));
236  }
237  if(UNLIKELY(token.isUninitialized())) {
239  }
240  putImpl(token.index(),std::move(product));
241  }
void throwOnPutOfUninitializedToken(char const *principalType, std::type_info const &productType)
void putImpl(EDPutToken::value_type token, std::unique_ptr< PROD > product)
Definition: Run.h:204
std::string const & productInstanceLabel(EDPutToken) const
#define PROD(A, B)
void throwOnPutOfNullProduct(char const *principalType, TypeID const &productType, std::string const &productInstanceName)
def move(src, dest)
Definition: eostools.py:511
PrincipalGetAdapter provRecorder_
Definition: Run.h:193
#define UNLIKELY(x)
template<typename PROD >
void Run::putImpl ( EDPutToken::value_type  token,
std::unique_ptr< PROD product 
)
private

Definition at line 204 of file Run.h.

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

204  {
205  // The following will call post_insert if T has such a function,
206  // and do nothing if T has no such function.
208  DoPostInsert<PROD>,
209  DoNotPostInsert<PROD>> maybe_inserter;
210  maybe_inserter(product.get());
211 
212  assert(index < putProducts().size());
213 
214  std::unique_ptr<Wrapper<PROD> > wp(new Wrapper<PROD>(std::move(product)));
215  putProducts()[index]=std::move(wp);
216  }
size
Write out results.
RunIndex index() const
Definition: Run.cc:24
ProductPtrVec & putProducts()
Definition: Run.h:180
def move(src, dest)
Definition: eostools.py:511
ProductPtrVec& edm::Run::putProducts ( )
inlineprivate

Definition at line 180 of file Run.h.

Referenced by commit_().

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

Definition at line 181 of file Run.h.

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

Definition at line 27 of file Run.cc.

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

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

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

Definition at line 51 of file Run.h.

Referenced by edm::EDAnalyzer::doBeginRun(), edm::EDProducer::doBeginRun(), edm::EDFilter::doBeginRun(), edm::one::EDProducerBase::doBeginRun(), edm::one::EDFilterBase::doBeginRun(), edm::one::EDAnalyzerBase::doBeginRun(), edm::global::EDAnalyzerBase::doBeginRun(), edm::global::EDFilterBase::doBeginRun(), edm::global::EDProducerBase::doBeginRun(), edm::limited::EDProducerBase::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::EDProducerBase::doEndRun(), edm::one::EDFilterBase::doEndRun(), edm::one::EDAnalyzerBase::doEndRun(), edm::global::EDAnalyzerBase::doEndRun(), edm::global::EDProducerBase::doEndRun(), edm::global::EDFilterBase::doEndRun(), edm::limited::EDProducerBase::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::EDFilterBase::doStreamBeginRun(), edm::global::EDProducerBase::doStreamBeginRun(), edm::limited::EDFilterBase::doStreamBeginRun(), edm::limited::EDProducerBase::doStreamBeginRun(), edm::limited::EDAnalyzerBase::doStreamBeginRun(), edm::global::EDAnalyzerBase::doStreamEndRun(), edm::global::EDProducerBase::doStreamEndRun(), edm::global::EDFilterBase::doStreamEndRun(), edm::limited::EDProducerBase::doStreamEndRun(), edm::limited::EDFilterBase::doStreamEndRun(), edm::limited::EDAnalyzerBase::doStreamEndRun(), edm::stream::EDAnalyzerAdaptorBase::doStreamEndRun(), and edm::stream::ProducingModuleAdaptorBase< T >::doStreamEndRun().

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

Definition at line 55 of file Run.h.

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

Friends And Related Function Documentation

friend class ProducerBase
friend

Definition at line 188 of file Run.h.

friend class RawInputSource
friend

Definition at line 187 of file Run.h.

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

Definition at line 189 of file Run.h.

Member Data Documentation

RunAuxiliary const& edm::Run::aux_
private

Definition at line 195 of file Run.h.

std::string const Run::emptyString_
staticprivate

Definition at line 199 of file Run.h.

ModuleCallingContext const* edm::Run::moduleCallingContext_
private

Definition at line 196 of file Run.h.

Referenced by getByLabelImpl(), and getProvenance().

PrincipalGetAdapter edm::Run::provRecorder_
private

Definition at line 193 of file Run.h.

Referenced by commit_(), getByLabelImpl(), processHistory(), runPrincipal(), and setProducer().

ProductPtrVec edm::Run::putProducts_
private

Definition at line 194 of file Run.h.

Referenced by setProducer().

SharedResourcesAcquirer* edm::Run::sharedResourcesAcquirer_
private

Definition at line 197 of file Run.h.