CMS 3D CMS Logo

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

#include <EventPrincipal.h>

Inheritance diagram for edm::EventPrincipal:
edm::Principal edm::EDProductGetter

Public Types

typedef EventAuxiliary Auxiliary
 
typedef Principal Base
 
typedef Base::ConstProductResolverPtr ConstProductResolverPtr
 
- Public Types inherited from edm::Principal
typedef std::vector< BasicHandleBasicHandleVec
 
typedef unsigned long CacheIdentifier_t
 
typedef boost::filter_iterator< FilledProductPtr, ProductResolverCollection::const_iterator > const_iterator
 
typedef ProductResolverBase const * ConstProductResolverPtr
 
typedef boost::filter_iterator< FilledProductPtr, ProductResolverCollection::iterator > iterator
 
typedef std::string ProcessName
 
typedef ProcessHistory::const_iterator ProcessNameConstIterator
 
typedef std::vector< propagate_const< std::shared_ptr< ProductResolverBase > > > ProductResolverCollection
 
typedef std::shared_ptr< ProductResolverBaseSharedProductPtr
 
typedef ProductResolverCollection::size_type size_type
 

Public Member Functions

EventAuxiliary const & aux () const
 
ProductID branchIDToProductID (BranchID const &bid) const
 
BranchListIndexes const & branchListIndexes () const
 
int bunchCrossing () const
 
void clearEventPrincipal ()
 
 EventPrincipal (std::shared_ptr< ProductRegistry const > reg, std::shared_ptr< BranchIDListHelper const > branchIDListHelper, std::shared_ptr< ThinnedAssociationsHelper const > thinnedAssociationsHelper, ProcessConfiguration const &pc, HistoryAppender *historyAppender, unsigned int streamIndex=0, bool isForPrimaryProcess=true, ProcessBlockHelperBase const *processBlockHelper=nullptr)
 
EventSelectionIDVector const & eventSelectionIDs () const
 
EventToProcessBlockIndexes const & eventToProcessBlockIndexes () const
 
EventAuxiliary::ExperimentType ExperimentType () const
 
void fillEventPrincipal (EventAuxiliary const &aux, ProcessHistory const *processHistory, DelayedReader *reader=nullptr)
 
void fillEventPrincipal (EventAuxiliary const &aux, ProcessHistory const *processHistory, EventSelectionIDVector eventSelectionIDs, BranchListIndexes branchListIndexes, DelayedReader *reader=nullptr)
 
void fillEventPrincipal (EventAuxiliary const &aux, ProcessHistory const *processHistory, EventSelectionIDVector eventSelectionIDs, BranchListIndexes branchListIndexes, EventToProcessBlockIndexes const &, ProductProvenanceRetriever const &provRetriever, DelayedReader *reader=nullptr, bool deepCopyRetriever=true)
 
BasicHandle getByProductID (ProductID const &oid) const
 
WrapperBase const * getIt (ProductID const &pid) const override
 
Provenance const & getProvenance (ProductID const &pid) const
 
Provenance const & getProvenance (BranchID const &bid) const
 
StableProvenance const & getStableProvenance (ProductID const &pid) const
 
StableProvenance const & getStableProvenance (BranchID const &bid) const
 
OptionalThinnedKey getThinnedKeyFrom (ProductID const &parent, unsigned int key, ProductID const &thinned) const override
 
std::optional< std::tuple< WrapperBase const *, unsigned int > > getThinnedProduct (ProductID const &pid, unsigned int key) const override
 
void getThinnedProducts (ProductID const &pid, std::vector< WrapperBase const *> &foundContainers, std::vector< unsigned int > &keys) const override
 
EventID const & id () const
 
bool isReal () const
 
LuminosityBlockNumber_t luminosityBlock () const
 
LuminosityBlockPrincipal const & luminosityBlockPrincipal () const
 
LuminosityBlockPrincipalluminosityBlockPrincipal ()
 
bool luminosityBlockPrincipalPtrValid () const
 
void mergeProvenanceRetrievers (EventPrincipal &other)
 
unsigned int processBlockIndex (std::string const &processName) const override
 
ProductProvenanceRetriever const * productProvenanceRetrieverPtr () const
 
void put (BranchDescription const &bd, std::unique_ptr< WrapperBase > edp, ProductProvenance const &productProvenance) const
 
void put (ProductResolverIndex index, std::unique_ptr< WrapperBase > edp, ParentageID productProvenance) const
 
void putOnRead (BranchDescription const &bd, std::unique_ptr< WrapperBase > edp, std::optional< ProductProvenance > productProvenance) const
 
RunNumber_t run () const
 
RunPrincipal const & runPrincipal () const
 
void setLuminosityBlockPrincipal (LuminosityBlockPrincipal *lbp)
 
void setRunAndLumiNumber (RunNumber_t run, LuminosityBlockNumber_t lumi)
 
int storeNumber () const
 
StreamID streamID () const
 
Timestamp const & time () const
 
 ~EventPrincipal () override
 
- Public Member Functions inherited from edm::Principal
void adjustIndexesAfterProductRegistryAddition ()
 
bool adjustToNewProductRegistry (ProductRegistry const &reg)
 
const_iterator begin () const
 
iterator begin ()
 
BranchType const & branchType () const
 
CacheIdentifier_t cacheIdentifier () const
 
void clearPrincipal ()
 
void deleteProduct (BranchID const &id) const
 
const_iterator end () const
 
iterator end ()
 
void fillPrincipal (DelayedReader *reader)
 
void fillPrincipal (ProcessHistoryID const &hist, ProcessHistory const *phr, DelayedReader *reader)
 
void fillPrincipal (std::string const &processNameOfBlock, DelayedReader *reader)
 
ProductData const * findProductByTag (TypeID const &typeID, InputTag const &tag, ModuleCallingContext const *mcc) const
 
void getAllProvenance (std::vector< Provenance const *> &provenances) const
 
void getAllStableProvenance (std::vector< StableProvenance const *> &provenances) const
 
BasicHandle getByLabel (KindOfType kindOfType, TypeID const &typeID, InputTag const &inputTag, EDConsumerBase const *consumes, SharedResourcesAcquirer *sra, ModuleCallingContext const *mcc) const
 
BasicHandle getByLabel (KindOfType kindOfType, TypeID const &typeID, std::string const &label, std::string const &instance, std::string const &process, EDConsumerBase const *consumes, SharedResourcesAcquirer *sra, ModuleCallingContext const *mcc) const
 
BasicHandle getByToken (KindOfType kindOfType, TypeID const &typeID, ProductResolverIndex index, bool skipCurrentProcess, bool &ambiguous, SharedResourcesAcquirer *sra, ModuleCallingContext const *mcc) const
 
ProductResolverBasegetModifiableProductResolver (BranchID const &oid)
 
ConstProductResolverPtr getProductResolver (BranchID const &oid) const
 
ConstProductResolverPtr getProductResolverByIndex (ProductResolverIndex const &oid) const
 
Provenance const & getProvenance (BranchID const &bid) const
 
StableProvenance const & getStableProvenance (BranchID const &bid) const
 
std::vector< unsigned int > const & lookupProcessOrder () const
 
void prefetchAsync (WaitingTaskHolder waitTask, ProductResolverIndex index, bool skipCurrentProcess, ServiceToken const &token, ModuleCallingContext const *mcc) const
 
 Principal (std::shared_ptr< ProductRegistry const > reg, std::shared_ptr< ProductResolverIndexHelper const > productLookup, ProcessConfiguration const &pc, BranchType bt, HistoryAppender *historyAppender, bool isForPrimaryProcess=true)
 
ProcessConfiguration const & processConfiguration () const
 
ProcessHistory const & processHistory () const
 
ProcessHistoryID const & processHistoryID () const
 
EDProductGetter const * prodGetter () const
 
ProductResolverIndexHelper const & productLookup () const
 
ProductRegistry const & productRegistry () const
 
void readAllFromSourceAndMergeImmediately (MergeableRunProductMetadata const *mergeableRunProductMetadata=nullptr)
 
DelayedReaderreader () const
 
void recombine (Principal &other, std::vector< BranchID > const &bids)
 
void setupUnscheduled (UnscheduledConfigurator const &)
 
size_t size () const
 
 ~Principal () override
 
- Public Member Functions inherited from edm::EDProductGetter
 EDProductGetter ()
 
 EDProductGetter (EDProductGetter const &)=delete
 
EDProductGetter const & operator= (EDProductGetter const &)=delete
 
unsigned int transitionIndex () const
 
virtual ~EDProductGetter ()
 

Static Public Attributes

static int const invalidBunchXing = EventAuxiliary::invalidBunchXing
 
static int const invalidStoreNumber = EventAuxiliary::invalidStoreNumber
 

Private Member Functions

void changedIndexes_ () final
 
void commonFillEventPrincipal (EventAuxiliary const &aux, ProcessHistory const *processHistory, DelayedReader *reader)
 
edm::ThinnedAssociation const * getThinnedAssociation (edm::BranchID const &branchID) const
 
BranchID pidToBid (ProductID const &pid) const
 
std::shared_ptr< ProductProvenanceRetriever const > provRetrieverPtr () const
 
std::shared_ptr< ProductProvenanceRetriever > & provRetrieverPtr ()
 
unsigned int transitionIndex_ () const override
 
void updateBranchListIndexes (BranchListIndexes &&)
 
bool wasBranchListIndexesChangedFromInput (BranchListIndexes const &) const
 

Private Attributes

EventAuxiliary aux_
 
std::shared_ptr< BranchIDListHelper const > branchIDListHelper_
 
BranchListIndexes branchListIndexes_
 
std::vector< ProcessIndexbranchListIndexToProcessIndex_
 
EventSelectionIDVector eventSelectionIDs_
 
EventToProcessBlockIndexes eventToProcessBlockIndexes_
 
edm::propagate_const< LuminosityBlockPrincipal * > luminosityBlockPrincipal_
 
ProcessBlockHelperBase const * processBlockHelper_
 
edm::propagate_const< std::shared_ptr< ProductProvenanceRetriever > > provRetrieverPtr_
 
StreamID streamID_
 
std::shared_ptr< ThinnedAssociationsHelper const > thinnedAssociationsHelper_
 

Additional Inherited Members

- Static Public Member Functions inherited from edm::EDProductGetter
static void assignEDProductGetter (EDProductGetter const *&)
 
static EDProductGetter const * switchProductGetter (EDProductGetter const *)
 These can only be used internally by the framework. More...
 
- Protected Member Functions inherited from edm::Principal
void addProduct_ (std::unique_ptr< ProductResolverBase > phb)
 
void addProductOrThrow (std::unique_ptr< ProductResolverBase > phb)
 
template<typename F >
void applyToResolvers (F iFunc)
 
ProductResolverBasegetExistingProduct (BranchID const &branchID)
 
ProductResolverBase const * getExistingProduct (BranchID const &branchID) const
 
ProductResolverBase const * getExistingProduct (ProductResolverBase const &phb) const
 
void put_ (BranchDescription const &bd, std::unique_ptr< WrapperBase > edp) const
 

Detailed Description

Definition at line 48 of file EventPrincipal.h.

Member Typedef Documentation

◆ Auxiliary

Definition at line 50 of file EventPrincipal.h.

◆ Base

Definition at line 51 of file EventPrincipal.h.

◆ ConstProductResolverPtr

Definition at line 53 of file EventPrincipal.h.

Constructor & Destructor Documentation

◆ EventPrincipal()

edm::EventPrincipal::EventPrincipal ( std::shared_ptr< ProductRegistry const >  reg,
std::shared_ptr< BranchIDListHelper const >  branchIDListHelper,
std::shared_ptr< ThinnedAssociationsHelper const >  thinnedAssociationsHelper,
ProcessConfiguration const &  pc,
HistoryAppender historyAppender,
unsigned int  streamIndex = 0,
bool  isForPrimaryProcess = true,
ProcessBlockHelperBase const *  processBlockHelper = nullptr 
)

Definition at line 34 of file EventPrincipal.cc.

References cms::cuda::assert(), dumpMFGeometry_cfg::prod, productProvenanceRetrieverPtr(), and thinnedAssociationsHelper_.

42  : Base(reg, reg->productLookup(InEvent), pc, InEvent, historyAppender, isForPrimaryProcess),
43  aux_(),
45  provRetrieverPtr_(new ProductProvenanceRetriever(streamIndex, *reg)),
47  branchIDListHelper_(branchIDListHelper),
48  processBlockHelper_(processBlockHelper),
49  thinnedAssociationsHelper_(thinnedAssociationsHelper),
52  streamID_(streamIndex) {
54 
55  for (auto& prod : *this) {
56  if (prod->singleProduct()) {
57  prod->setProductProvenanceRetriever(productProvenanceRetrieverPtr());
58  }
59  }
60  }
std::shared_ptr< ThinnedAssociationsHelper const > thinnedAssociationsHelper_
EventSelectionIDVector eventSelectionIDs_
BranchListIndexes branchListIndexes_
edm::propagate_const< LuminosityBlockPrincipal * > luminosityBlockPrincipal_
std::shared_ptr< BranchIDListHelper const > branchIDListHelper_
EventAuxiliary aux_
edm::propagate_const< std::shared_ptr< ProductProvenanceRetriever > > provRetrieverPtr_
assert(be >=bs)
std::vector< ProcessIndex > branchListIndexToProcessIndex_
ProductProvenanceRetriever const * productProvenanceRetrieverPtr() const
ProcessBlockHelperBase const * processBlockHelper_

◆ ~EventPrincipal()

edm::EventPrincipal::~EventPrincipal ( )
inlineoverride

Definition at line 64 of file EventPrincipal.h.

64 {}

Member Function Documentation

◆ aux()

EventAuxiliary const& edm::EventPrincipal::aux ( ) const
inline

◆ branchIDToProductID()

ProductID edm::EventPrincipal::branchIDToProductID ( BranchID const &  bid) const

Definition at line 232 of file EventPrincipal.cc.

References branchIDListHelper_, edm::branchIDToProductID(), and branchListIndexToProcessIndex_.

Referenced by edm::RepeatingCachedRootSource::beginJob(), edm::Event::makeProductID(), and updateBranchListIndexes().

232  {
234  }
std::shared_ptr< BranchIDListHelper const > branchIDListHelper_
ProductID branchIDToProductID(BranchID const &bid, BranchIDListHelper const &branchIDListHelper, std::vector< ProcessIndex > const &branchListIndexToProcessIndex)
std::vector< ProcessIndex > branchListIndexToProcessIndex_

◆ branchListIndexes()

BranchListIndexes const & edm::EventPrincipal::branchListIndexes ( ) const

◆ bunchCrossing()

int edm::EventPrincipal::bunchCrossing ( ) const
inline

Definition at line 105 of file EventPrincipal.h.

References aux(), and edm::EventAuxiliary::bunchCrossing().

105 { return aux().bunchCrossing(); }
EventAuxiliary const & aux() const
int bunchCrossing() const

◆ changedIndexes_()

void edm::EventPrincipal::changedIndexes_ ( )
finalprivatevirtual

Reimplemented from edm::Principal.

Definition at line 242 of file EventPrincipal.cc.

References edm::Principal::productRegistry(), and provRetrieverPtr_.

242 { provRetrieverPtr_->update(productRegistry()); }
ProductRegistry const & productRegistry() const
Definition: Principal.h:140
edm::propagate_const< std::shared_ptr< ProductProvenanceRetriever > > provRetrieverPtr_

◆ clearEventPrincipal()

void edm::EventPrincipal::clearEventPrincipal ( )

Definition at line 62 of file EventPrincipal.cc.

References aux_, edm::Principal::clearPrincipal(), and provRetrieverPtr_.

62  {
64  aux_ = EventAuxiliary();
65  //do not clear luminosityBlockPrincipal_ since
66  // it is only connected at beginLumi transition
67  provRetrieverPtr_->reset();
68  }
void clearPrincipal()
Definition: Principal.cc:383
EventAuxiliary aux_
edm::propagate_const< std::shared_ptr< ProductProvenanceRetriever > > provRetrieverPtr_

◆ commonFillEventPrincipal()

void edm::EventPrincipal::commonFillEventPrincipal ( EventAuxiliary const &  aux,
ProcessHistory const *  processHistory,
DelayedReader reader 
)
private

Definition at line 125 of file EventPrincipal.cc.

References aux(), aux_, edm::EventAuxiliary::event(), Exception, edm::Principal::fillPrincipal(), edm::invalidEventNumber, edm::errors::LogicError, edm::Principal::processHistory(), edm::EventAuxiliary::processHistoryID(), edm::Principal::processHistoryID(), edm::Principal::reader(), and edm::EventAuxiliary::setProcessHistoryID().

Referenced by fillEventPrincipal().

127  {
128  if (aux.event() == invalidEventNumber) {
129  throw Exception(errors::LogicError) << "EventPrincipal::fillEventPrincipal, Invalid event number provided in "
130  "EventAuxiliary, It is illegal for the event number to be 0\n";
131  }
132 
134  aux_ = aux;
136  }
void fillPrincipal(DelayedReader *reader)
Definition: Principal.cc:403
EventNumber_t event() const
EventAuxiliary const & aux() const
EventAuxiliary aux_
EventNumber_t const invalidEventNumber
ProcessHistoryID const & processHistoryID() const
ProcessHistory const & processHistory() const
Definition: Principal.h:134
void setProcessHistoryID(ProcessHistoryID const &phid)
ProcessHistoryID const & processHistoryID() const
Definition: Principal.h:136
DelayedReader * reader() const
Definition: Principal.h:181

◆ eventSelectionIDs()

EventSelectionIDVector const & edm::EventPrincipal::eventSelectionIDs ( ) const

◆ eventToProcessBlockIndexes()

EventToProcessBlockIndexes const & edm::EventPrincipal::eventToProcessBlockIndexes ( ) const

Definition at line 354 of file EventPrincipal.cc.

References eventToProcessBlockIndexes_.

Referenced by edm::EventForOutput::eventToProcessBlockIndexes(), fillEventPrincipal(), and edm::SubProcess::processAsync().

354  {
356  }
EventToProcessBlockIndexes eventToProcessBlockIndexes_

◆ ExperimentType()

EventAuxiliary::ExperimentType edm::EventPrincipal::ExperimentType ( ) const
inline

Definition at line 103 of file EventPrincipal.h.

References aux(), and edm::EventAuxiliary::experimentType().

103 { return aux().experimentType(); }
EventAuxiliary const & aux() const
ExperimentType experimentType() const

◆ fillEventPrincipal() [1/3]

void edm::EventPrincipal::fillEventPrincipal ( EventAuxiliary const &  aux,
ProcessHistory const *  processHistory,
DelayedReader reader = nullptr 
)

Definition at line 112 of file EventPrincipal.cc.

References aux(), branchIDListHelper_, branchListIndexes_, commonFillEventPrincipal(), eostools::move(), edm::Principal::processHistory(), edm::Principal::reader(), and updateBranchListIndexes().

Referenced by edm::IDGeneratorSourceBase< PuttableSourceBase >::doReadEvent(), edm::IDGeneratorSourceBase< PuttableSourceBase >::doReadEventWithDelayedReader(), edm::RawInputSource::makeEvent(), edm::StreamerInputSource::read(), edm::RootFile::readCurrentEvent(), edm::TestSource::readEvent_(), edm::ThrowingSource::readEvent_(), LHESource::readEvent_(), LH5Source::readEvent_(), and edm::RepeatingCachedRootSource::readEvent_().

114  {
115  if (branchListIndexes_.empty() and branchIDListHelper_->hasProducedProducts()) {
116  // Add index into BranchIDListRegistry for products produced this process
117  // if it hasn't already been filled in by the other fillEventPrincipal or by an earlier call to this function
118  BranchListIndexes indexes;
119  indexes.push_back(branchIDListHelper_->producedBranchListIndex());
121  }
123  }
void commonFillEventPrincipal(EventAuxiliary const &aux, ProcessHistory const *processHistory, DelayedReader *reader)
EventAuxiliary const & aux() const
BranchListIndexes branchListIndexes_
std::shared_ptr< BranchIDListHelper const > branchIDListHelper_
std::vector< BranchListIndex > BranchListIndexes
void updateBranchListIndexes(BranchListIndexes &&)
ProcessHistory const & processHistory() const
Definition: Principal.h:134
def move(src, dest)
Definition: eostools.py:511
DelayedReader * reader() const
Definition: Principal.h:181

◆ fillEventPrincipal() [2/3]

void edm::EventPrincipal::fillEventPrincipal ( EventAuxiliary const &  aux,
ProcessHistory const *  processHistory,
EventSelectionIDVector  eventSelectionIDs,
BranchListIndexes  branchListIndexes,
DelayedReader reader = nullptr 
)

Definition at line 95 of file EventPrincipal.cc.

References aux(), branchIDListHelper_, branchListIndexes(), commonFillEventPrincipal(), eventSelectionIDs(), eventSelectionIDs_, eostools::move(), edm::Principal::processHistory(), edm::Principal::reader(), updateBranchListIndexes(), and wasBranchListIndexesChangedFromInput().

99  {
101 
103  if (branchIDListHelper_->hasProducedProducts()) {
104  // Add index into BranchIDListRegistry for products produced this process
105  branchListIndexes.push_back(branchIDListHelper_->producedBranchListIndex());
106  }
108  }
110  }
void commonFillEventPrincipal(EventAuxiliary const &aux, ProcessHistory const *processHistory, DelayedReader *reader)
EventAuxiliary const & aux() const
EventSelectionIDVector eventSelectionIDs_
std::shared_ptr< BranchIDListHelper const > branchIDListHelper_
void updateBranchListIndexes(BranchListIndexes &&)
ProcessHistory const & processHistory() const
Definition: Principal.h:134
bool wasBranchListIndexesChangedFromInput(BranchListIndexes const &) const
EventSelectionIDVector const & eventSelectionIDs() const
BranchListIndexes const & branchListIndexes() const
def move(src, dest)
Definition: eostools.py:511
DelayedReader * reader() const
Definition: Principal.h:181

◆ fillEventPrincipal() [3/3]

void edm::EventPrincipal::fillEventPrincipal ( EventAuxiliary const &  aux,
ProcessHistory const *  processHistory,
EventSelectionIDVector  eventSelectionIDs,
BranchListIndexes  branchListIndexes,
EventToProcessBlockIndexes const &  eventToProcessBlockIndexes,
ProductProvenanceRetriever const &  provRetriever,
DelayedReader reader = nullptr,
bool  deepCopyRetriever = true 
)

Definition at line 70 of file EventPrincipal.cc.

References aux(), branchIDListHelper_, branchListIndexes(), commonFillEventPrincipal(), eventSelectionIDs(), eventSelectionIDs_, eventToProcessBlockIndexes(), eventToProcessBlockIndexes_, eostools::move(), edm::Principal::processHistory(), provRetrieverPtr_, edm::Principal::reader(), updateBranchListIndexes(), and wasBranchListIndexesChangedFromInput().

77  {
79  if (deepCopyRetriever) {
80  provRetrieverPtr_->deepCopy(provRetriever);
81  } else {
82  provRetrieverPtr_->mergeParentProcessRetriever(provRetriever);
83  }
85  if (branchIDListHelper_->hasProducedProducts()) {
86  // Add index into BranchIDListRegistry for products produced this process
87  branchListIndexes.push_back(branchIDListHelper_->producedBranchListIndex());
88  }
90  }
93  }
void commonFillEventPrincipal(EventAuxiliary const &aux, ProcessHistory const *processHistory, DelayedReader *reader)
EventAuxiliary const & aux() const
EventToProcessBlockIndexes eventToProcessBlockIndexes_
EventSelectionIDVector eventSelectionIDs_
std::shared_ptr< BranchIDListHelper const > branchIDListHelper_
edm::propagate_const< std::shared_ptr< ProductProvenanceRetriever > > provRetrieverPtr_
EventToProcessBlockIndexes const & eventToProcessBlockIndexes() const
void updateBranchListIndexes(BranchListIndexes &&)
ProcessHistory const & processHistory() const
Definition: Principal.h:134
bool wasBranchListIndexesChangedFromInput(BranchListIndexes const &) const
EventSelectionIDVector const & eventSelectionIDs() const
BranchListIndexes const & branchListIndexes() const
def move(src, dest)
Definition: eostools.py:511
DelayedReader * reader() const
Definition: Principal.h:181

◆ getByProductID()

BasicHandle edm::EventPrincipal::getByProductID ( ProductID const &  oid) const

Definition at line 254 of file EventPrincipal.cc.

References data, edm::Principal::getProductResolver(), edm::makeHandleExceptionFactory(), pidToBid(), edm::errors::ProductNotFound, L1TObjectsTimingClient_cff::resolution, and edm::throwProductDeletedException().

Referenced by edm::Event::getByProductID_(), and getIt().

254  {
255  BranchID bid = pidToBid(pid);
257  if (phb == nullptr) {
258  return BasicHandle(makeHandleExceptionFactory([pid]() -> std::shared_ptr<cms::Exception> {
259  std::shared_ptr<cms::Exception> whyFailed(std::make_shared<Exception>(errors::ProductNotFound, "InvalidID"));
260  *whyFailed << "get by product ID: no product with given id: " << pid << "\n";
261  return whyFailed;
262  }));
263  }
264 
265  // Was this already deleted?
266  if (phb->productWasDeleted()) {
268  }
269  // Check for case where we tried on demand production and
270  // it failed to produce the object
271  if (phb->unscheduledWasNotRun()) {
272  return BasicHandle(makeHandleExceptionFactory([pid]() -> std::shared_ptr<cms::Exception> {
273  std::shared_ptr<cms::Exception> whyFailed(std::make_shared<Exception>(errors::ProductNotFound, "InvalidID"));
274  *whyFailed << "get by ProductID: could not get product with id: " << pid << "\n"
275  << "Unscheduled execution not allowed to get via ProductID.\n";
276  return whyFailed;
277  }));
278  }
279  auto resolution = phb->resolveProduct(*this, false, nullptr, nullptr);
280 
281  auto data = resolution.data();
282  if (data) {
283  return BasicHandle(data->wrapper(), &(data->provenance()));
284  }
285  return BasicHandle(nullptr, nullptr);
286  }
BranchID pidToBid(ProductID const &pid) const
static void throwProductDeletedException(ProductID const &pid, edm::EventPrincipal::ConstProductResolverPtr const phb)
std::shared_ptr< HandleExceptionFactory > makeHandleExceptionFactory(T &&iFunctor)
Base::ConstProductResolverPtr ConstProductResolverPtr
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80
ConstProductResolverPtr getProductResolver(BranchID const &oid) const
Definition: Principal.cc:555

◆ getIt()

WrapperBase const * edm::EventPrincipal::getIt ( ProductID const &  pid) const
overridevirtual

Implements edm::EDProductGetter.

Definition at line 288 of file EventPrincipal.cc.

References getByProductID(), and edm::BasicHandle::wrapper().

Referenced by getThinnedProduct(), and getThinnedProducts().

288 { return getByProductID(pid).wrapper(); }
BasicHandle getByProductID(ProductID const &oid) const
WrapperBase const * wrapper() const noexcept(true)
Definition: BasicHandle.h:73

◆ getProvenance() [1/2]

Provenance const & edm::EventPrincipal::getProvenance ( ProductID const &  pid) const

Definition at line 340 of file EventPrincipal.cc.

References pidToBid().

Referenced by edm::Event::getProvenance().

340  {
341  BranchID bid = pidToBid(pid);
342  return getProvenance(bid);
343  }
Provenance const & getProvenance(ProductID const &pid) const
BranchID pidToBid(ProductID const &pid) const

◆ getProvenance() [2/2]

Provenance const & edm::Principal::getProvenance

Definition at line 771 of file Principal.cc.

771  {
773  if (phb == nullptr) {
775  }
776 
777  if (phb->unscheduledWasNotRun()) {
779  << "Requesting provenance from unrun EDProducer. The requested branch ID was: " << bid;
780  }
781  return *phb->provenance();
782  }
Base::ConstProductResolverPtr ConstProductResolverPtr
static void throwProductNotFoundException(char const *where, errors::ErrorCodes error, BranchID const &bid)
Definition: Principal.cc:48
ConstProductResolverPtr getProductResolver(BranchID const &oid) const
Definition: Principal.cc:555

◆ getStableProvenance() [1/2]

StableProvenance const & edm::EventPrincipal::getStableProvenance ( ProductID const &  pid) const

Definition at line 345 of file EventPrincipal.cc.

References pidToBid().

Referenced by edm::Event::getStableProvenance().

345  {
346  BranchID bid = pidToBid(pid);
347  return getStableProvenance(bid);
348  }
BranchID pidToBid(ProductID const &pid) const
StableProvenance const & getStableProvenance(ProductID const &pid) const

◆ getStableProvenance() [2/2]

StableProvenance const & edm::Principal::getStableProvenance

Definition at line 784 of file Principal.cc.

784  {
786  if (phb == nullptr) {
787  throwProductNotFoundException("getStableProvenance", errors::ProductNotFound, bid);
788  }
789  //NOTE: in all implementations, this never returns a nullptr
790  return *phb->stableProvenance();
791  }
Base::ConstProductResolverPtr ConstProductResolverPtr
static void throwProductNotFoundException(char const *where, errors::ErrorCodes error, BranchID const &bid)
Definition: Principal.cc:48
ConstProductResolverPtr getProductResolver(BranchID const &oid) const
Definition: Principal.cc:555

◆ getThinnedAssociation()

edm::ThinnedAssociation const * edm::EventPrincipal::getThinnedAssociation ( edm::BranchID const &  branchID) const
private

Definition at line 358 of file EventPrincipal.cc.

References runTheMatrix::const, data, edm::WrapperBase::dynamicTypeInfo(), Exception, edm::Principal::getProductResolver(), edm::errors::LogicError, edm::ProductData::wrapper(), and wrapper.

Referenced by getThinnedKeyFrom(), getThinnedProduct(), and getThinnedProducts().

358  {
359  ConstProductResolverPtr const phb = getProductResolver(branchID);
360 
361  if (phb == nullptr) {
363  << "EventPrincipal::getThinnedAssociation, ThinnedAssociation ProductResolver cannot be found\n"
364  << "This should never happen. Contact a Framework developer";
365  }
366  ProductData const* productData = (phb->resolveProduct(*this, false, nullptr, nullptr)).data();
367  if (productData == nullptr) {
368  return nullptr;
369  }
370  WrapperBase const* product = productData->wrapper();
371  if (!(typeid(edm::ThinnedAssociation) == product->dynamicTypeInfo())) {
373  << "EventPrincipal::getThinnedProduct, product has wrong type, not a ThinnedAssociation.\n";
374  }
375  Wrapper<ThinnedAssociation> const* wrapper = static_cast<Wrapper<ThinnedAssociation> const*>(product);
376  return wrapper->product();
377  }
Base::ConstProductResolverPtr ConstProductResolverPtr
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80
static HepMC::HEPEVT_Wrapper wrapper
ConstProductResolverPtr getProductResolver(BranchID const &oid) const
Definition: Principal.cc:555

◆ getThinnedKeyFrom()

OptionalThinnedKey edm::EventPrincipal::getThinnedKeyFrom ( ProductID const &  parent,
unsigned int  key,
ProductID const &  thinned 
) const
overridevirtual

Implements edm::EDProductGetter.

Definition at line 314 of file EventPrincipal.cc.

References cms::Exception::addContext(), EcalMonitorTask_cff::func, getThinnedAssociation(), edm::detail::getThinnedKeyFrom_implementation(), crabWrapper::key, class-composition::parent, pidToBid(), runTheMatrix::ret, and thinnedAssociationsHelper_.

316  {
317  BranchID parent = pidToBid(parentID);
318  BranchID thinned = pidToBid(thinnedID);
319 
320  try {
322  parentID, parent, key, thinnedID, thinned, *thinnedAssociationsHelper_, [this](BranchID const& branchID) {
323  return getThinnedAssociation(branchID);
324  });
325  if (auto factory = std::get_if<detail::GetThinnedKeyFromExceptionFactory>(&ret)) {
326  return [func = *factory]() {
327  auto ex = func();
328  ex.addContext("Calling EventPrincipal::getThinnedKeyFrom()");
329  return ex;
330  };
331  } else {
332  return ret;
333  }
334  } catch (Exception& ex) {
335  ex.addContext("Calling EventPrincipal::getThinnedKeyFrom()");
336  throw ex;
337  }
338  }
std::shared_ptr< ThinnedAssociationsHelper const > thinnedAssociationsHelper_
ret
prodAgent to be discontinued
edm::ThinnedAssociation const * getThinnedAssociation(edm::BranchID const &branchID) const
std::variant< unsigned int, GetThinnedKeyFromExceptionFactory, std::monostate > getThinnedKeyFrom_implementation(ProductID const &parentID, BranchID const &parent, unsigned int key, ProductID const &thinnedID, BranchID thinned, ThinnedAssociationsHelper const &thinnedAssociationsHelper, F &&getThinnedAssociation)
BranchID pidToBid(ProductID const &pid) const

◆ getThinnedProduct()

std::optional< std::tuple< WrapperBase const *, unsigned int > > edm::EventPrincipal::getThinnedProduct ( ProductID const &  pid,
unsigned int  key 
) const
overridevirtual

Implements edm::EDProductGetter.

Definition at line 290 of file EventPrincipal.cc.

References b, getIt(), getThinnedAssociation(), edm::detail::getThinnedProduct(), crabWrapper::key, AlCaHLTBitMon_ParallelJobs::p, pidToBid(), and thinnedAssociationsHelper_.

291  {
293  pid,
294  key,
296  [this](ProductID const& p) { return pidToBid(p); },
297  [this](BranchID const& b) { return getThinnedAssociation(b); },
298  [this](ProductID const& p) { return getIt(p); });
299  }
std::shared_ptr< ThinnedAssociationsHelper const > thinnedAssociationsHelper_
edm::ThinnedAssociation const * getThinnedAssociation(edm::BranchID const &branchID) const
std::optional< std::tuple< WrapperBase const *, unsigned int > > getThinnedProduct(ProductID const &pid, unsigned int key, ThinnedAssociationsHelper const &thinnedAssociationsHelper, F1 pidToBid, F2 getThinnedAssociation, F3 getByProductID)
BranchID pidToBid(ProductID const &pid) const
WrapperBase const * getIt(ProductID const &pid) const override
double b
Definition: hdecay.h:120

◆ getThinnedProducts()

void edm::EventPrincipal::getThinnedProducts ( ProductID const &  pid,
std::vector< WrapperBase const *> &  foundContainers,
std::vector< unsigned int > &  keys 
) const
overridevirtual

Implements edm::EDProductGetter.

Definition at line 301 of file EventPrincipal.cc.

References b, getIt(), getThinnedAssociation(), edm::detail::getThinnedProducts(), relativeConstraints::keys, AlCaHLTBitMon_ParallelJobs::p, pidToBid(), and thinnedAssociationsHelper_.

303  {
305  pid,
307  [this](ProductID const& p) { return pidToBid(p); },
308  [this](BranchID const& b) { return getThinnedAssociation(b); },
309  [this](ProductID const& p) { return getIt(p); },
310  foundContainers,
311  keys);
312  }
std::shared_ptr< ThinnedAssociationsHelper const > thinnedAssociationsHelper_
edm::ThinnedAssociation const * getThinnedAssociation(edm::BranchID const &branchID) const
BranchID pidToBid(ProductID const &pid) const
void getThinnedProducts(ProductID const &pid, ThinnedAssociationsHelper const &thinnedAssociationsHelper, F1 pidToBid, F2 getThinnedAssociation, F3 getByProductID, std::vector< WrapperBase const *> &foundContainers, std::vector< unsigned int > &keys)
WrapperBase const * getIt(ProductID const &pid) const override
double b
Definition: hdecay.h:120

◆ id()

EventID const& edm::EventPrincipal::id ( void  ) const
inline

◆ isReal()

bool edm::EventPrincipal::isReal ( ) const
inline

Definition at line 101 of file EventPrincipal.h.

References aux(), and edm::EventAuxiliary::isRealData().

101 { return aux().isRealData(); }
EventAuxiliary const & aux() const
bool isRealData() const

◆ luminosityBlock()

LuminosityBlockNumber_t edm::EventPrincipal::luminosityBlock ( ) const
inline

Definition at line 113 of file EventPrincipal.h.

References id(), and edm::EventID::luminosityBlock().

Referenced by Types.EventID::cppID(), Types.LuminosityBlockID::cppID(), and edm::PoolSource::readEvent_().

113 { return id().luminosityBlock(); }
LuminosityBlockNumber_t luminosityBlock() const
Definition: EventID.h:39
EventID const & id() const

◆ luminosityBlockPrincipal() [1/2]

LuminosityBlockPrincipal const& edm::EventPrincipal::luminosityBlockPrincipal ( ) const
inline

Definition at line 86 of file EventPrincipal.h.

References luminosityBlockPrincipal_.

Referenced by edm::EDLooperBase::doDuringLoop(), edm::SubProcess::processAsync(), and runPrincipal().

86 { return *luminosityBlockPrincipal_; }
edm::propagate_const< LuminosityBlockPrincipal * > luminosityBlockPrincipal_

◆ luminosityBlockPrincipal() [2/2]

LuminosityBlockPrincipal& edm::EventPrincipal::luminosityBlockPrincipal ( )
inline

Definition at line 88 of file EventPrincipal.h.

References luminosityBlockPrincipal_.

88 { return *luminosityBlockPrincipal_; }
edm::propagate_const< LuminosityBlockPrincipal * > luminosityBlockPrincipal_

◆ luminosityBlockPrincipalPtrValid()

bool edm::EventPrincipal::luminosityBlockPrincipalPtrValid ( ) const
inline

Definition at line 90 of file EventPrincipal.h.

References luminosityBlockPrincipal_.

90 { return luminosityBlockPrincipal_ != nullptr; }
edm::propagate_const< LuminosityBlockPrincipal * > luminosityBlockPrincipal_

◆ mergeProvenanceRetrievers()

void edm::EventPrincipal::mergeProvenanceRetrievers ( EventPrincipal other)
inline

Definition at line 154 of file EventPrincipal.h.

References trackingPlots::other, and provRetrieverPtr_.

Referenced by edm::PoolSource::readEvent_().

154  {
155  provRetrieverPtr_->mergeProvenanceRetrievers(other.provRetrieverPtr());
156  }
edm::propagate_const< std::shared_ptr< ProductProvenanceRetriever > > provRetrieverPtr_

◆ pidToBid()

BranchID edm::EventPrincipal::pidToBid ( ProductID const &  pid) const
private

Definition at line 225 of file EventPrincipal.cc.

References branchIDListHelper_, branchListIndexes_, Exception, edm::ProductID::isValid(), edm::productIDToBranchID(), and edm::errors::ProductNotFound.

Referenced by getByProductID(), getProvenance(), getStableProvenance(), getThinnedKeyFrom(), getThinnedProduct(), and getThinnedProducts().

225  {
226  if (!pid.isValid()) {
227  throw Exception(errors::ProductNotFound, "InvalidID") << "get by product ID: invalid ProductID supplied\n";
228  }
229  return productIDToBranchID(pid, branchIDListHelper_->branchIDLists(), branchListIndexes_);
230  }
BranchListIndexes branchListIndexes_
std::shared_ptr< BranchIDListHelper const > branchIDListHelper_
BranchID productIDToBranchID(ProductID const &pid, BranchIDLists const &lists, BranchListIndexes const &indexes)

◆ processBlockIndex()

unsigned int edm::EventPrincipal::processBlockIndex ( std::string const &  processName) const
overridevirtual

Reimplemented from edm::Principal.

Definition at line 236 of file EventPrincipal.cc.

References eventToProcessBlockIndexes_, processBlockHelper_, edm::ProcessBlockHelperBase::processBlockIndex(), and SimL1EmulatorRepack_CalouGT_cff::processName.

236  {
238  }
EventToProcessBlockIndexes eventToProcessBlockIndexes_
virtual unsigned int processBlockIndex(std::string const &processName, EventToProcessBlockIndexes const &) const =0
ProcessBlockHelperBase const * processBlockHelper_

◆ productProvenanceRetrieverPtr()

ProductProvenanceRetriever const* edm::EventPrincipal::productProvenanceRetrieverPtr ( ) const
inline

Definition at line 119 of file EventPrincipal.h.

References provRetrieverPtr_.

Referenced by EventPrincipal(), edm::SubProcess::processAsync(), edm::EventForOutput::productProvenanceRetrieverPtr(), put(), and putOnRead().

119 { return provRetrieverPtr_.get(); }
edm::propagate_const< std::shared_ptr< ProductProvenanceRetriever > > provRetrieverPtr_

◆ provRetrieverPtr() [1/2]

std::shared_ptr<ProductProvenanceRetriever const> edm::EventPrincipal::provRetrieverPtr ( ) const
inlineprivate

Definition at line 171 of file EventPrincipal.h.

References edm::get_underlying_safe(), and provRetrieverPtr_.

171  {
173  }
constexpr std::shared_ptr< T > & get_underlying_safe(propagate_const< std::shared_ptr< T >> &iP)
edm::propagate_const< std::shared_ptr< ProductProvenanceRetriever > > provRetrieverPtr_

◆ provRetrieverPtr() [2/2]

std::shared_ptr<ProductProvenanceRetriever>& edm::EventPrincipal::provRetrieverPtr ( )
inlineprivate

Definition at line 174 of file EventPrincipal.h.

References edm::get_underlying_safe(), and provRetrieverPtr_.

constexpr std::shared_ptr< T > & get_underlying_safe(propagate_const< std::shared_ptr< T >> &iP)
edm::propagate_const< std::shared_ptr< ProductProvenanceRetriever > > provRetrieverPtr_

◆ put() [1/2]

void edm::EventPrincipal::put ( BranchDescription const &  bd,
std::unique_ptr< WrapperBase edp,
ProductProvenance const &  productProvenance 
) const

Definition at line 181 of file EventPrincipal.cc.

References cms::cuda::assert(), edm::BranchDescription::branchID(), runTheMatrix::const, Exception, edm::Principal::getExistingProduct(), edm::errors::InsertFailure, edm::ProductProvenanceLookup::insertIntoSet(), eostools::move(), and productProvenanceRetrieverPtr().

Referenced by edm::EventForTransformer::put(), FedRawDataInputSource::read(), DataModeFRD::readEvent(), DataModeScoutingRun2Muon::readEvent(), DataModeFRDStriped::readEvent(), DataModeScoutingRun2Multi::readEvent(), LHESource::readEvent_(), and LH5Source::readEvent_().

183  {
184  // assert commented out for DaqSource. When DaqSource no longer uses put(), the assert can be restored.
185  //assert(produced());
186  if (edp.get() == nullptr) {
187  throw Exception(errors::InsertFailure, "Null Pointer") << "put: Cannot put because ptr to product is null."
188  << "\n";
189  }
190  productProvenanceRetrieverPtr()->insertIntoSet(productProvenance);
191  auto phb = getExistingProduct(bd.branchID());
192  assert(phb);
193  // ProductResolver assumes ownership
194  dynamic_cast<ProductPutterBase const*>(phb)->putProduct(std::move(edp));
195  }
ProductResolverBase * getExistingProduct(BranchID const &branchID)
Definition: Principal.cc:502
assert(be >=bs)
ProductProvenanceRetriever const * productProvenanceRetrieverPtr() const
def move(src, dest)
Definition: eostools.py:511
void insertIntoSet(ProductProvenance provenanceProduct) const

◆ put() [2/2]

void edm::EventPrincipal::put ( ProductResolverIndex  index,
std::unique_ptr< WrapperBase edp,
ParentageID  productProvenance 
) const

Definition at line 197 of file EventPrincipal.cc.

References cms::cuda::assert(), runTheMatrix::const, Exception, edm::Principal::getProductResolverByIndex(), edm::errors::InsertFailure, edm::ProductProvenanceLookup::insertIntoSet(), eostools::move(), and productProvenanceRetrieverPtr().

197  {
198  if (edp.get() == nullptr) {
199  throw Exception(errors::InsertFailure, "Null Pointer") << "put: Cannot put because ptr to product is null."
200  << "\n";
201  }
202  auto phb = getProductResolverByIndex(index);
203 
205  ProductProvenance(phb->branchDescription().branchID(), std::move(parentage)));
206 
207  assert(phb);
208  // ProductResolver assumes ownership
209  dynamic_cast<ProductPutterBase const*>(phb)->putProduct(std::move(edp));
210  }
assert(be >=bs)
ProductProvenanceRetriever const * productProvenanceRetrieverPtr() const
ConstProductResolverPtr getProductResolverByIndex(ProductResolverIndex const &oid) const
Definition: Principal.cc:563
def move(src, dest)
Definition: eostools.py:511
void insertIntoSet(ProductProvenance provenanceProduct) const

◆ putOnRead()

void edm::EventPrincipal::putOnRead ( BranchDescription const &  bd,
std::unique_ptr< WrapperBase edp,
std::optional< ProductProvenance productProvenance 
) const

Definition at line 212 of file EventPrincipal.cc.

References cms::cuda::assert(), edm::BranchDescription::branchID(), runTheMatrix::const, edm::Principal::getExistingProduct(), edm::ProductProvenanceLookup::insertIntoSet(), eostools::move(), edm::BranchDescription::produced(), and productProvenanceRetrieverPtr().

Referenced by edm::StreamerInputSource::read().

214  {
215  assert(!bd.produced());
216  if (productProvenance) {
217  productProvenanceRetrieverPtr()->insertIntoSet(std::move(*productProvenance));
218  }
219  auto phb = getExistingProduct(bd.branchID());
220  assert(phb);
221  // ProductResolver assumes ownership
222  dynamic_cast<ProductPutterBase const*>(phb)->putProduct(std::move(edp));
223  }
ProductResolverBase * getExistingProduct(BranchID const &branchID)
Definition: Principal.cc:502
assert(be >=bs)
ProductProvenanceRetriever const * productProvenanceRetrieverPtr() const
def move(src, dest)
Definition: eostools.py:511
void insertIntoSet(ProductProvenance provenanceProduct) const

◆ run()

RunNumber_t edm::EventPrincipal::run ( ) const
inline

Definition at line 115 of file EventPrincipal.h.

References id(), and edm::EventID::run().

Referenced by Types.EventID::cppID(), Types.LuminosityBlockID::cppID(), edm::OneLumiPoolSource::readEvent_(), edm::PoolSource::readEvent_(), and setRunAndLumiNumber().

115 { return id().run(); }
RunNumber_t run() const
Definition: EventID.h:38
EventID const & id() const

◆ runPrincipal()

RunPrincipal const & edm::EventPrincipal::runPrincipal ( ) const

Definition at line 179 of file EventPrincipal.cc.

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

Referenced by EcalSignalGenerator< EEDigitizerTraits >::initializeEvent().

RunPrincipal const & runPrincipal() const
LuminosityBlockPrincipal const & luminosityBlockPrincipal() const

◆ setLuminosityBlockPrincipal()

void edm::EventPrincipal::setLuminosityBlockPrincipal ( LuminosityBlockPrincipal lbp)

Definition at line 170 of file EventPrincipal.cc.

References luminosityBlockPrincipal_.

170 { luminosityBlockPrincipal_ = lbp; }
edm::propagate_const< LuminosityBlockPrincipal * > luminosityBlockPrincipal_

◆ setRunAndLumiNumber()

void edm::EventPrincipal::setRunAndLumiNumber ( RunNumber_t  run,
LuminosityBlockNumber_t  lumi 
)

Definition at line 172 of file EventPrincipal.cc.

References cms::cuda::assert(), aux_, edm::EventID::event(), edm::EventAuxiliary::id(), luminosityBlockPrincipal_, and run().

Referenced by edm::OneLumiPoolSource::readEvent_().

172  {
174  assert(lumi == luminosityBlockPrincipal_->luminosityBlock());
175  EventNumber_t event = aux_.id().event();
176  aux_.id() = EventID(run, lumi, event);
177  }
RunNumber_t run() const
unsigned long long EventNumber_t
edm::propagate_const< LuminosityBlockPrincipal * > luminosityBlockPrincipal_
EventAuxiliary aux_
assert(be >=bs)
EventID const & id() const
EventNumber_t event() const
Definition: EventID.h:40
Definition: event.py:1

◆ storeNumber()

int edm::EventPrincipal::storeNumber ( ) const
inline

Definition at line 107 of file EventPrincipal.h.

References aux(), and edm::EventAuxiliary::storeNumber().

107 { return aux().storeNumber(); }
EventAuxiliary const & aux() const
int storeNumber() const

◆ streamID()

StreamID edm::EventPrincipal::streamID ( ) const
inline

◆ time()

Timestamp const& edm::EventPrincipal::time ( ) const
inline

Definition at line 99 of file EventPrincipal.h.

References aux(), and edm::EventAuxiliary::time().

Referenced by edm::EDLooperBase::doDuringLoop(), and edm::OccurrenceTraits< EventPrincipal, BranchActionStreamBegin >::setStreamContext().

99 { return aux().time(); }
EventAuxiliary const & aux() const
Timestamp const & time() const

◆ transitionIndex_()

unsigned int edm::EventPrincipal::transitionIndex_ ( ) const
overrideprivatevirtual

Implements edm::EDProductGetter.

Definition at line 240 of file EventPrincipal.cc.

References streamID_, and edm::StreamID::value().

240 { return streamID_.value(); }
unsigned int value() const
Definition: StreamID.h:43

◆ updateBranchListIndexes()

void edm::EventPrincipal::updateBranchListIndexes ( BranchListIndexes &&  branchListIndexes)
private

Definition at line 148 of file EventPrincipal.cc.

References branchIDToProductID(), branchListIndexes(), branchListIndexes_, branchListIndexToProcessIndex_, edm::makeBranchListIndexToProcessIndex(), eostools::move(), and dumpMFGeometry_cfg::prod.

Referenced by fillEventPrincipal().

148  {
151  // Fill in helper map for Branch to ProductID mapping
152  if (not branchListIndexes_.empty()) {
154  }
155 
156  // Fill in the product ID's in the product holders.
157  for (auto& prod : *this) {
158  if (prod->singleProduct()) {
159  // If an alias is in the same process as the original then isAlias will be true.
160  // Under that condition, we want the ProductID to be the same as the original.
161  // If not, then we've internally changed the original BranchID to the alias BranchID
162  // in the ProductID lookup so we need the alias BranchID.
163 
164  auto const& bd = prod->branchDescription();
165  prod->setProductID(branchIDToProductID(bd.isAlias() ? bd.originalBranchID() : bd.branchID()));
166  }
167  }
168  }
BranchListIndexes branchListIndexes_
ProductID branchIDToProductID(BranchID const &bid) const
std::vector< ProcessIndex > branchListIndexToProcessIndex_
std::vector< ProcessIndex > makeBranchListIndexToProcessIndex(BranchListIndexes const &branchListIndexes)
BranchListIndexes const & branchListIndexes() const
def move(src, dest)
Definition: eostools.py:511

◆ wasBranchListIndexesChangedFromInput()

bool edm::EventPrincipal::wasBranchListIndexesChangedFromInput ( BranchListIndexes const &  fromInput) const
private

Definition at line 138 of file EventPrincipal.cc.

References branchIDListHelper_, branchListIndexes_, edm::Principal::end(), and cond::serialization::equal().

Referenced by fillEventPrincipal().

138  {
139  //fromInput does not contain entries for what is being produced in this job.
140  auto end = branchListIndexes_.end();
141  if (end != branchListIndexes_.begin() and branchIDListHelper_->hasProducedProducts()) {
142  --end;
143  }
144 
145  return not std::equal(fromInput.begin(), fromInput.end(), branchListIndexes_.begin(), end);
146  }
BranchListIndexes branchListIndexes_
std::shared_ptr< BranchIDListHelper const > branchIDListHelper_
bool equal(const T &first, const T &second)
Definition: Equal.h:32
const_iterator end() const
Definition: Principal.h:157

Member Data Documentation

◆ aux_

EventAuxiliary edm::EventPrincipal::aux_
private

◆ branchIDListHelper_

std::shared_ptr<BranchIDListHelper const> edm::EventPrincipal::branchIDListHelper_
private

◆ branchListIndexes_

BranchListIndexes edm::EventPrincipal::branchListIndexes_
private

◆ branchListIndexToProcessIndex_

std::vector<ProcessIndex> edm::EventPrincipal::branchListIndexToProcessIndex_
private

Definition at line 200 of file EventPrincipal.h.

Referenced by branchIDToProductID(), and updateBranchListIndexes().

◆ eventSelectionIDs_

EventSelectionIDVector edm::EventPrincipal::eventSelectionIDs_
private

Definition at line 190 of file EventPrincipal.h.

Referenced by eventSelectionIDs(), and fillEventPrincipal().

◆ eventToProcessBlockIndexes_

EventToProcessBlockIndexes edm::EventPrincipal::eventToProcessBlockIndexes_
private

◆ invalidBunchXing

int const edm::EventPrincipal::invalidBunchXing = EventAuxiliary::invalidBunchXing
static

Definition at line 54 of file EventPrincipal.h.

◆ invalidStoreNumber

int const edm::EventPrincipal::invalidStoreNumber = EventAuxiliary::invalidStoreNumber
static

Definition at line 55 of file EventPrincipal.h.

◆ luminosityBlockPrincipal_

edm::propagate_const<LuminosityBlockPrincipal*> edm::EventPrincipal::luminosityBlockPrincipal_
private

◆ processBlockHelper_

ProcessBlockHelperBase const* edm::EventPrincipal::processBlockHelper_
private

Definition at line 193 of file EventPrincipal.h.

Referenced by processBlockIndex().

◆ provRetrieverPtr_

edm::propagate_const<std::shared_ptr<ProductProvenanceRetriever> > edm::EventPrincipal::provRetrieverPtr_
private

◆ streamID_

StreamID edm::EventPrincipal::streamID_
private

Definition at line 202 of file EventPrincipal.h.

Referenced by streamID(), and transitionIndex_().

◆ thinnedAssociationsHelper_

std::shared_ptr<ThinnedAssociationsHelper const> edm::EventPrincipal::thinnedAssociationsHelper_
private