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)
 
EventSelectionIDVector const & eventSelectionIDs () const
 
EventAuxiliary::ExperimentType ExperimentType () const
 
void fillEventPrincipal (EventAuxiliary const &aux, ProcessHistoryRegistry const &processHistoryRegistry, DelayedReader *reader=0)
 
void fillEventPrincipal (EventAuxiliary const &aux, ProcessHistoryRegistry const &processHistoryRegistry, EventSelectionIDVector &&eventSelectionIDs, BranchListIndexes &&branchListIndexes)
 
void fillEventPrincipal (EventAuxiliary const &aux, ProcessHistoryRegistry const &processHistoryRegistry, EventSelectionIDVector &&eventSelectionIDs, BranchListIndexes &&branchListIndexes, ProductProvenanceRetriever const &provRetriever, DelayedReader *reader=0, bool deepCopyRetriever=true)
 
BasicHandle getByProductID (ProductID const &oid) const
 
WrapperBase const * getIt (ProductID const &pid) const override
 
Provenance getProvenance (ProductID const &pid, ModuleCallingContext const *mcc) const
 
WrapperBase const * 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)
 
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, ProductProvenance const *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 (ProcessHistoryID const &hist, ProcessHistoryRegistry const &phr, 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
 
void getManyByType (TypeID const &typeID, BasicHandleVec &results, EDConsumerBase const *consumes, SharedResourcesAcquirer *sra, ModuleCallingContext const *mcc) const
 
ProductResolverBasegetModifiableProductResolver (BranchID const &oid)
 
ConstProductResolverPtr getProductResolver (BranchID const &oid) const
 
ConstProductResolverPtr getProductResolverByIndex (ProductResolverIndex const &oid) const
 
Provenance getProvenance (BranchID const &bid, ModuleCallingContext const *mcc) const
 
std::vector< unsigned int > const & lookupProcessOrder () const
 
void prefetchAsync (WaitingTask *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=0)
 
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

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
 

Private Attributes

EventAuxiliary aux_
 
std::shared_ptr< BranchIDListHelper const > branchIDListHelper_
 
BranchListIndexes branchListIndexes_
 
std::map< BranchListIndex, ProcessIndexbranchListIndexToProcessIndex_
 
EventSelectionIDVector eventSelectionIDs_
 
edm::propagate_const< LuminosityBlockPrincipal * > luminosityBlockPrincipal_
 
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 putOrMerge (BranchDescription const &bd, std::unique_ptr< WrapperBase > edp) const
 

Detailed Description

Definition at line 46 of file EventPrincipal.h.

Member Typedef Documentation

Definition at line 48 of file EventPrincipal.h.

Definition at line 49 of file EventPrincipal.h.

Definition at line 51 of file EventPrincipal.h.

Constructor & Destructor Documentation

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 
)

Definition at line 30 of file EventPrincipal.cc.

References thinnedAssociationsHelper_.

37  :
38  Base(reg, reg->productLookup(InEvent), pc, InEvent, historyAppender,isForPrimaryProcess),
39  aux_(),
41  provRetrieverPtr_(new ProductProvenanceRetriever(streamIndex)),
43  branchIDListHelper_(branchIDListHelper),
44  thinnedAssociationsHelper_(thinnedAssociationsHelper),
47  streamID_(streamIndex) {
49  }
std::shared_ptr< ThinnedAssociationsHelper const > thinnedAssociationsHelper_
EventSelectionIDVector eventSelectionIDs_
BranchListIndexes branchListIndexes_
std::map< BranchListIndex, ProcessIndex > branchListIndexToProcessIndex_
edm::propagate_const< LuminosityBlockPrincipal * > luminosityBlockPrincipal_
std::shared_ptr< BranchIDListHelper const > branchIDListHelper_
EventAuxiliary aux_
edm::propagate_const< std::shared_ptr< ProductProvenanceRetriever > > provRetrieverPtr_
edm::EventPrincipal::~EventPrincipal ( )
inlineoverride

Member Function Documentation

EventAuxiliary const& edm::EventPrincipal::aux ( ) const
inline
ProductID edm::EventPrincipal::branchIDToProductID ( BranchID const &  bid) const

Definition at line 222 of file EventPrincipal.cc.

References branchIDListHelper_, branchListIndexToProcessIndex_, Exception, mps_fire::i, edm::BranchID::isValid(), and edm::errors::NotFound.

Referenced by fillEventPrincipal(), edm::Event::makeProductID(), and productProvenanceRetrieverPtr().

222  {
223  if(!bid.isValid()) {
224  throw Exception(errors::NotFound, "InvalidID")
225  << "branchIDToProductID: invalid BranchID supplied\n";
226  }
227  typedef BranchIDListHelper::BranchIDToIndexMap BIDToIndexMap;
228  typedef BIDToIndexMap::const_iterator Iter;
229  typedef std::pair<Iter, Iter> IndexRange;
230 
231  IndexRange range = branchIDListHelper_->branchIDToIndexMap().equal_range(bid);
232  for(Iter it = range.first; it != range.second; ++it) {
233  BranchListIndex blix = it->second.first;
234  std::map<BranchListIndex, ProcessIndex>::const_iterator i = branchListIndexToProcessIndex_.find(blix);
235  if(i != branchListIndexToProcessIndex_.end()) {
236  ProductIndex productIndex = it->second.second;
237  ProcessIndex processIndex = i->second;
238  return ProductID(processIndex+1, productIndex+1);
239  }
240  }
241  // cannot throw, because some products may legitimately not have product ID's (e.g. pile-up).
242  return ProductID();
243  }
unsigned short BranchListIndex
std::map< BranchListIndex, ProcessIndex > branchListIndexToProcessIndex_
std::shared_ptr< BranchIDListHelper const > branchIDListHelper_
std::multimap< BranchID, IndexPair > BranchIDToIndexMap
unsigned short ProcessIndex
Definition: ProductID.h:25
unsigned short ProductIndex
Definition: ProductID.h:26
BranchListIndexes const & edm::EventPrincipal::branchListIndexes ( ) const
int edm::EventPrincipal::bunchCrossing ( ) const
inline

Definition at line 116 of file EventPrincipal.h.

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

116  {
117  return aux().bunchCrossing();
118  }
int bunchCrossing() const
EventAuxiliary const & aux() const
void edm::EventPrincipal::clearEventPrincipal ( )

Definition at line 52 of file EventPrincipal.cc.

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

Referenced by edm::VectorInputSource::clearEventPrincipal(), edm::SubProcess::processAsync(), and ~EventPrincipal().

52  {
54  aux_ = EventAuxiliary();
55  //do not clear luminosityBlockPrincipal_ since
56  // it is only connected at beginLumi transition
57  provRetrieverPtr_->reset();
59  }
void clearPrincipal()
Definition: Principal.cc:340
std::map< BranchListIndex, ProcessIndex > branchListIndexToProcessIndex_
EventAuxiliary aux_
edm::propagate_const< std::shared_ptr< ProductProvenanceRetriever > > provRetrieverPtr_
EventSelectionIDVector const & edm::EventPrincipal::eventSelectionIDs ( ) const
EventAuxiliary::ExperimentType edm::EventPrincipal::ExperimentType ( ) const
inline

Definition at line 112 of file EventPrincipal.h.

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

112  {
113  return aux().experimentType();
114  }
ExperimentType experimentType() const
EventAuxiliary const & aux() const
void edm::EventPrincipal::fillEventPrincipal ( EventAuxiliary const &  aux,
ProcessHistoryRegistry const &  processHistoryRegistry,
DelayedReader reader = 0 
)

Definition at line 98 of file EventPrincipal.cc.

References aux(), aux_, branchIDListHelper_, branchIDToProductID(), branchListIndexes_, branchListIndexToProcessIndex_, edm::EventAuxiliary::event(), Exception, edm::Principal::fillPrincipal(), edm::invalidEventNumber, edm::errors::LogicError, edm::Principal::processHistory(), edm::EventAuxiliary::processHistoryID(), edm::Principal::processHistoryID(), parseEventContent::prod, productProvenanceRetrieverPtr(), edm::Principal::reader(), and edm::EventAuxiliary::setProcessHistoryID().

Referenced by fillEventPrincipal(), edm::RawInputSource::makeEvent(), edm::SubProcess::processAsync(), edm::StreamerInputSource::read(), edm::RootFile::readCurrentEvent(), edm::TestSource::readEvent_(), LHESource::readEvent_(), edm::ProducerSourceBase::readEvent_(), and ~EventPrincipal().

100  {
101  if(aux.event() == invalidEventNumber) {
103  << "EventPrincipal::fillEventPrincipal, Invalid event number provided in EventAuxiliary, It is illegal for the event number to be 0\n";
104  }
105 
106  fillPrincipal(aux.processHistoryID(), processHistoryRegistry, reader);
107  aux_ = aux;
109 
110  if(branchListIndexes_.empty() and branchIDListHelper_->hasProducedProducts()) {
111  // Add index into BranchIDListRegistry for products produced this process
112  // if it hasn't already been filled in by the other fillEventPrincipal or by an earlier call to this function
113  branchListIndexes_.push_back(branchIDListHelper_->producedBranchListIndex());
114  }
115 
116  // Fill in helper map for Branch to ProductID mapping
117  ProcessIndex pix = 0;
118  for(auto const& blindex : branchListIndexes_) {
119  branchListIndexToProcessIndex_.insert(std::make_pair(blindex, pix));
120  ++pix;
121  }
122 
123  // Fill in the product ID's in the product holders.
124  for(auto& prod : *this) {
125  if (prod->singleProduct()) {
126  // If an alias is in the same process as the original then isAlias will be true.
127  // Under that condition, we want the ProductID to be the same as the original.
128  // If not, then we've internally changed the original BranchID to the alias BranchID
129  // in the ProductID lookup so we need the alias BranchID.
130  auto const & bd =prod->branchDescription();
131  prod->setProvenance(productProvenanceRetrieverPtr(),
132  processHistory(),
133  branchIDToProductID(bd.isAlias()?bd.originalBranchID(): bd.branchID()));
134  }
135  }
136  }
BranchListIndexes branchListIndexes_
std::map< BranchListIndex, ProcessIndex > branchListIndexToProcessIndex_
std::shared_ptr< BranchIDListHelper const > branchIDListHelper_
EventAuxiliary aux_
ProcessHistory const & processHistory() const
Definition: Principal.h:140
ProductID branchIDToProductID(BranchID const &bid) const
EventNumber_t const invalidEventNumber
ProcessHistoryID const & processHistoryID() const
Definition: Principal.h:144
ProductProvenanceRetriever const * productProvenanceRetrieverPtr() const
unsigned short ProcessIndex
Definition: ProductID.h:25
DelayedReader * reader() const
Definition: Principal.h:183
void setProcessHistoryID(ProcessHistoryID const &phid)
ProcessHistoryID const & processHistoryID() const
void fillPrincipal(ProcessHistoryID const &hist, ProcessHistoryRegistry const &phr, DelayedReader *reader)
Definition: Principal.cc:367
EventAuxiliary const & aux() const
EventNumber_t event() const
void edm::EventPrincipal::fillEventPrincipal ( EventAuxiliary const &  aux,
ProcessHistoryRegistry const &  processHistoryRegistry,
EventSelectionIDVector &&  eventSelectionIDs,
BranchListIndexes &&  branchListIndexes 
)

Definition at line 84 of file EventPrincipal.cc.

References branchIDListHelper_, branchListIndexes(), branchListIndexes_, eventSelectionIDs(), eventSelectionIDs_, and fillEventPrincipal().

87  {
90  if(branchIDListHelper_->hasProducedProducts()) {
91  // Add index into BranchIDListRegistry for products produced this process
92  branchListIndexes_.push_back(branchIDListHelper_->producedBranchListIndex());
93  }
94  fillEventPrincipal(aux,processHistoryRegistry,nullptr);
95  }
EventSelectionIDVector const & eventSelectionIDs() const
EventSelectionIDVector eventSelectionIDs_
BranchListIndexes branchListIndexes_
std::shared_ptr< BranchIDListHelper const > branchIDListHelper_
BranchListIndexes const & branchListIndexes() const
void fillEventPrincipal(EventAuxiliary const &aux, ProcessHistoryRegistry const &processHistoryRegistry, DelayedReader *reader=0)
EventAuxiliary const & aux() const
void edm::EventPrincipal::fillEventPrincipal ( EventAuxiliary const &  aux,
ProcessHistoryRegistry const &  processHistoryRegistry,
EventSelectionIDVector &&  eventSelectionIDs,
BranchListIndexes &&  branchListIndexes,
ProductProvenanceRetriever const &  provRetriever,
DelayedReader reader = 0,
bool  deepCopyRetriever = true 
)

Definition at line 62 of file EventPrincipal.cc.

References branchIDListHelper_, branchListIndexes(), branchListIndexes_, eventSelectionIDs(), eventSelectionIDs_, fillEventPrincipal(), and provRetrieverPtr_.

68  {
70  if (deepCopyRetriever) {
71  provRetrieverPtr_->deepCopy(provRetriever);
72  } else {
73  provRetrieverPtr_->mergeParentProcessRetriever(provRetriever);
74  }
76  if(branchIDListHelper_->hasProducedProducts()) {
77  // Add index into BranchIDListRegistry for products produced this process
78  branchListIndexes_.push_back(branchIDListHelper_->producedBranchListIndex());
79  }
80  fillEventPrincipal(aux,processHistoryRegistry,reader);
81  }
EventSelectionIDVector const & eventSelectionIDs() const
EventSelectionIDVector eventSelectionIDs_
BranchListIndexes branchListIndexes_
std::shared_ptr< BranchIDListHelper const > branchIDListHelper_
edm::propagate_const< std::shared_ptr< ProductProvenanceRetriever > > provRetrieverPtr_
BranchListIndexes const & branchListIndexes() const
DelayedReader * reader() const
Definition: Principal.h:183
void fillEventPrincipal(EventAuxiliary const &aux, ProcessHistoryRegistry const &processHistoryRegistry, DelayedReader *reader=0)
EventAuxiliary const & aux() const
BasicHandle edm::EventPrincipal::getByProductID ( ProductID const &  oid) const

Definition at line 261 of file EventPrincipal.cc.

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

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

261  {
262  BranchID bid = pidToBid(pid);
264  if(phb == nullptr) {
265  return BasicHandle(makeHandleExceptionFactory([pid]()->std::shared_ptr<cms::Exception> {
266  std::shared_ptr<cms::Exception> whyFailed(std::make_shared<Exception>(errors::ProductNotFound, "InvalidID"));
267  *whyFailed
268  << "get by product ID: no product with given id: " << pid << "\n";
269  return whyFailed;
270  }));
271  }
272 
273  // Was this already deleted?
274  if(phb->productWasDeleted()) {
276  }
277  // Check for case where we tried on demand production and
278  // it failed to produce the object
279  if(phb->unscheduledWasNotRun()) {
280  return BasicHandle(makeHandleExceptionFactory([pid]()->std::shared_ptr<cms::Exception> {
281  std::shared_ptr<cms::Exception> whyFailed(std::make_shared<Exception>(errors::ProductNotFound, "InvalidID"));
282  *whyFailed
283  << "get by ProductID: could not get product with id: " << pid << "\n"
284  << "Unscheduled execution not allowed to get via ProductID.\n";
285  return whyFailed;
286  }));
287  }
288  auto resolution = phb->resolveProduct(*this,false,nullptr,nullptr);
289 
290  auto data = resolution.data();
291  if(data) {
292  return BasicHandle(data->wrapper(), &(data->provenance()));
293  }
294  return BasicHandle(nullptr,nullptr);
295  }
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:82
ConstProductResolverPtr getProductResolver(BranchID const &oid) const
Definition: Principal.cc:511
WrapperBase const * edm::EventPrincipal::getIt ( ProductID const &  pid) const
overridevirtual

Implements edm::EDProductGetter.

Definition at line 298 of file EventPrincipal.cc.

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

Referenced by edm::StreamerInputSource::EventPrincipalHolder::getIt(), and productProvenanceRetrieverPtr().

298  {
299  return getByProductID(pid).wrapper();
300  }
BasicHandle getByProductID(ProductID const &oid) const
WrapperBase const * wrapper() const
Definition: BasicHandle.h:90
Provenance edm::EventPrincipal::getProvenance ( ProductID const &  pid,
ModuleCallingContext const *  mcc 
) const

Definition at line 409 of file EventPrincipal.cc.

References pidToBid().

Referenced by edm::Event::getProvenance(), and productProvenanceRetrieverPtr().

409  {
410  BranchID bid = pidToBid(pid);
411  return getProvenance(bid, mcc);
412  }
BranchID pidToBid(ProductID const &pid) const
Provenance getProvenance(ProductID const &pid, ModuleCallingContext const *mcc) const
edm::ThinnedAssociation const * edm::EventPrincipal::getThinnedAssociation ( edm::BranchID const &  branchID) const
private

Definition at line 425 of file EventPrincipal.cc.

References data, edm::WrapperBase::dynamicTypeInfo(), Exception, edm::Principal::getProductResolver(), edm::errors::LogicError, edm::Wrapper< T >::product(), edm::ProductData::wrapper(), and wrapper.

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

425  {
426 
427  ConstProductResolverPtr const phb = getProductResolver(branchID);
428 
429  if(phb == nullptr) {
431  << "EventPrincipal::getThinnedAssociation, ThinnedAssociation ProductResolver cannot be found\n"
432  << "This should never happen. Contact a Framework developer";
433  }
434  ProductData const* productData = (phb->resolveProduct(*this,false,nullptr,nullptr)).data();
435  if (productData == nullptr) {
436  return nullptr;
437  }
438  WrapperBase const* product = productData->wrapper();
439  if(!(typeid(edm::ThinnedAssociation) == product->dynamicTypeInfo())) {
441  << "EventPrincipal::getThinnedProduct, product has wrong type, not a ThinnedAssociation.\n";
442  }
443  Wrapper<ThinnedAssociation> const* wrapper = static_cast<Wrapper<ThinnedAssociation> const*>(product);
444  return wrapper->product();
445  }
Base::ConstProductResolverPtr ConstProductResolverPtr
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
ConstProductResolverPtr getProductResolver(BranchID const &oid) const
Definition: Principal.cc:511
static HepMC::HEPEVT_Wrapper wrapper
WrapperBase const * edm::EventPrincipal::getThinnedProduct ( ProductID const &  pid,
unsigned int &  key 
) const
overridevirtual

Implements edm::EDProductGetter.

Definition at line 303 of file EventPrincipal.cc.

References getByProductID(), getThinnedAssociation(), edm::ThinnedAssociation::hasParentIndex(), edm::BasicHandle::isValid(), class-composition::parent, edm::ThinnedAssociation::parentCollectionID(), pidToBid(), thinnedAssociationsHelper_, edm::ThinnedAssociation::thinnedCollectionID(), and edm::BasicHandle::wrapper().

Referenced by edm::StreamerInputSource::EventPrincipalHolder::getThinnedProduct(), and productProvenanceRetrieverPtr().

303  {
304 
305  BranchID parent = pidToBid(pid);
306 
307  // Loop over thinned containers which were made by selecting elements from the parent container
308  for(auto associatedBranches = thinnedAssociationsHelper_->parentBegin(parent),
309  iEnd = thinnedAssociationsHelper_->parentEnd(parent);
310  associatedBranches != iEnd; ++associatedBranches) {
311 
312  ThinnedAssociation const* thinnedAssociation =
313  getThinnedAssociation(associatedBranches->association());
314  if(thinnedAssociation == nullptr) continue;
315 
316  if(associatedBranches->parent() != pidToBid(thinnedAssociation->parentCollectionID())) {
317  continue;
318  }
319 
320  unsigned int thinnedIndex = 0;
321  // Does this thinned container have the element referenced by key?
322  // If yes, thinnedIndex is set to point to it in the thinned container
323  if(!thinnedAssociation->hasParentIndex(key, thinnedIndex)) {
324  continue;
325  }
326  // Get the thinned container and return a pointer if we can find it
327  ProductID const& thinnedCollectionPID = thinnedAssociation->thinnedCollectionID();
328  BasicHandle bhThinned = getByProductID(thinnedCollectionPID);
329  if(!bhThinned.isValid()) {
330  // Thinned container is not found, try looking recursively in thinned containers
331  // which were made by selecting elements from this thinned container.
332  WrapperBase const* wrapperBase = getThinnedProduct(thinnedCollectionPID, thinnedIndex);
333  if(wrapperBase != nullptr) {
334  key = thinnedIndex;
335  return wrapperBase;
336  } else {
337  continue;
338  }
339  }
340  key = thinnedIndex;
341  return bhThinned.wrapper();
342  }
343  return nullptr;
344  }
std::shared_ptr< ThinnedAssociationsHelper const > thinnedAssociationsHelper_
WrapperBase const * getThinnedProduct(ProductID const &pid, unsigned int &key) const override
BasicHandle getByProductID(ProductID const &oid) const
BranchID pidToBid(ProductID const &pid) const
edm::ThinnedAssociation const * getThinnedAssociation(edm::BranchID const &branchID) const
ProductID const & thinnedCollectionID() const
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 347 of file EventPrincipal.cc.

References getByProductID(), getThinnedAssociation(), edm::ThinnedAssociation::hasParentIndex(), edm::BasicHandle::isValid(), gen::k, SiStripPI::max, class-composition::parent, edm::ThinnedAssociation::parentCollectionID(), pidToBid(), thinnedAssociationsHelper_, edm::ThinnedAssociation::thinnedCollectionID(), and edm::BasicHandle::wrapper().

Referenced by edm::StreamerInputSource::EventPrincipalHolder::getThinnedProducts(), and productProvenanceRetrieverPtr().

349  {
350 
351  BranchID parent = pidToBid(pid);
352 
353  // Loop over thinned containers which were made by selecting elements from the parent container
354  for(auto associatedBranches = thinnedAssociationsHelper_->parentBegin(parent),
355  iEnd = thinnedAssociationsHelper_->parentEnd(parent);
356  associatedBranches != iEnd; ++associatedBranches) {
357 
358  ThinnedAssociation const* thinnedAssociation =
359  getThinnedAssociation(associatedBranches->association());
360  if(thinnedAssociation == nullptr) continue;
361 
362  if(associatedBranches->parent() != pidToBid(thinnedAssociation->parentCollectionID())) {
363  continue;
364  }
365 
366  unsigned nKeys = keys.size();
367  unsigned int doNotLookForThisIndex = std::numeric_limits<unsigned int>::max();
368  std::vector<unsigned int> thinnedIndexes(nKeys, doNotLookForThisIndex);
369  bool hasAny = false;
370  for(unsigned k = 0; k < nKeys; ++k) {
371  // Already found this one
372  if(foundContainers[k] != nullptr) continue;
373  // Already know this one is not in this thinned container
374  if(keys[k] == doNotLookForThisIndex) continue;
375  // Does the thinned container hold the entry of interest?
376  // Modifies thinnedIndexes[k] only if it returns true and
377  // sets it to the index in the thinned collection.
378  if(thinnedAssociation->hasParentIndex(keys[k], thinnedIndexes[k])) {
379  hasAny = true;
380  }
381  }
382  if(!hasAny) {
383  continue;
384  }
385  // Get the thinned container and set the pointers and indexes into
386  // it (if we can find it)
387  ProductID thinnedCollectionPID = thinnedAssociation->thinnedCollectionID();
388  BasicHandle bhThinned = getByProductID(thinnedCollectionPID);
389  if(!bhThinned.isValid()) {
390  // Thinned container is not found, try looking recursively in thinned containers
391  // which were made by selecting elements from this thinned container.
392  getThinnedProducts(thinnedCollectionPID, foundContainers, thinnedIndexes);
393  for(unsigned k = 0; k < nKeys; ++k) {
394  if(foundContainers[k] == nullptr) continue;
395  if(thinnedIndexes[k] == doNotLookForThisIndex) continue;
396  keys[k] = thinnedIndexes[k];
397  }
398  } else {
399  for(unsigned k = 0; k < nKeys; ++k) {
400  if(thinnedIndexes[k] == doNotLookForThisIndex) continue;
401  keys[k] = thinnedIndexes[k];
402  foundContainers[k] = bhThinned.wrapper();
403  }
404  }
405  }
406  }
std::shared_ptr< ThinnedAssociationsHelper const > thinnedAssociationsHelper_
BasicHandle getByProductID(ProductID const &oid) const
BranchID pidToBid(ProductID const &pid) const
edm::ThinnedAssociation const * getThinnedAssociation(edm::BranchID const &branchID) const
void getThinnedProducts(ProductID const &pid, std::vector< WrapperBase const * > &foundContainers, std::vector< unsigned int > &keys) const override
int k[5][pyjets_maxn]
EventID const& edm::EventPrincipal::id ( void  ) const
inline

Definition at line 100 of file EventPrincipal.h.

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

Referenced by edm::DataMixingEMWorker::addEMPileups(), edm::DataMixingEMDigiWorker::addEMPileups(), edm::DataMixingGeneralTrackWorker::addGeneralTrackPileups(), edm::DataMixingHcalWorker::addHcalPileups(), edm::DataMixingHcalDigiWorker::addHcalPileups(), edm::DataMixingHcalDigiWorkerProd::addHcalPileups(), edm::DataMixingMuonWorker::addMuonPileups(), sistrip::SpyEventMatcher::addNextEventToMap(), edm::PreMixingPileupCopy::addPileupInfo(), edm::DataMixingPileupCopy::addPileupInfo(), PreMixingTrackingParticleWorker::addPileups(), PreMixingEcalWorker::addPileups(), PreMixingSiPixelWorker::addPileups(), PreMixingSiStripWorker::addPileups(), edm::DataMixingSiPixelWorker::addSiPixelPileups(), edm::DataMixingSiStripWorker::addSiStripPileups(), edm::DataMixingSiStripRawWorker::addSiStripPileups(), edm::EDLooperBase::doDuringLoop(), edm::StreamSchedule::finishedPaths(), edm::SecSourceAnalyzer::getBranches(), luminosityBlock(), edm::RecordEventID< T >::operator()(), edm::MixingModule::pileAllWorkers(), edm::PreMixingModule::pileWorker(), edm::DataMixingModule::pileWorker(), edm::InputSource::readEvent(), edm::PoolSource::readEvent_(), edm::StreamSchedule::reportSkipped(), run(), edm::OccurrenceTraits< EventPrincipal, BranchActionStreamBegin >::setStreamContext(), and edm::Path::workerFinished().

100  {
101  return aux().id();
102  }
EventID const & id() const
EventAuxiliary const & aux() const
bool edm::EventPrincipal::isReal ( ) const
inline

Definition at line 108 of file EventPrincipal.h.

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

108  {
109  return aux().isRealData();
110  }
bool isRealData() const
EventAuxiliary const & aux() const
LuminosityBlockNumber_t edm::EventPrincipal::luminosityBlock ( ) const
inline

Definition at line 130 of file EventPrincipal.h.

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

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

130  {
131  return id().luminosityBlock();
132  }
EventID const & id() const
LuminosityBlockNumber_t luminosityBlock() const
Definition: EventID.h:40
LuminosityBlockPrincipal const& edm::EventPrincipal::luminosityBlockPrincipal ( ) const
inline

Definition at line 83 of file EventPrincipal.h.

References luminosityBlockPrincipal_.

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

83  {
85  }
edm::propagate_const< LuminosityBlockPrincipal * > luminosityBlockPrincipal_
LuminosityBlockPrincipal& edm::EventPrincipal::luminosityBlockPrincipal ( )
inline

Definition at line 87 of file EventPrincipal.h.

References luminosityBlockPrincipal_.

87  {
89  }
edm::propagate_const< LuminosityBlockPrincipal * > luminosityBlockPrincipal_
bool edm::EventPrincipal::luminosityBlockPrincipalPtrValid ( ) const
inline

Definition at line 91 of file EventPrincipal.h.

References luminosityBlockPrincipal_, run(), setLuminosityBlockPrincipal(), and setRunAndLumiNumber().

91  {
92  return luminosityBlockPrincipal_ != nullptr;
93  }
edm::propagate_const< LuminosityBlockPrincipal * > luminosityBlockPrincipal_
void edm::EventPrincipal::mergeProvenanceRetrievers ( EventPrincipal other)
inline

Definition at line 174 of file EventPrincipal.h.

References edm::Principal::getProvenance(), getThinnedAssociation(), pidToBid(), provRetrieverPtr(), provRetrieverPtr_, and transitionIndex_().

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

174  {
175  provRetrieverPtr_->mergeProvenanceRetrievers(other.provRetrieverPtr());
176  }
edm::propagate_const< std::shared_ptr< ProductProvenanceRetriever > > provRetrieverPtr_
BranchID edm::EventPrincipal::pidToBid ( ProductID const &  pid) const
private

Definition at line 213 of file EventPrincipal.cc.

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

Referenced by getByProductID(), getProvenance(), getThinnedProduct(), getThinnedProducts(), and mergeProvenanceRetrievers().

213  {
214  if(!pid.isValid()) {
215  throw Exception(errors::ProductNotFound, "InvalidID")
216  << "get by product ID: invalid ProductID supplied\n";
217  }
219  }
BranchListIndexes branchListIndexes_
std::shared_ptr< BranchIDListHelper const > branchIDListHelper_
BranchID productIDToBranchID(ProductID const &pid, BranchIDLists const &lists, BranchListIndexes const &indexes)
ProductProvenanceRetriever const* edm::EventPrincipal::productProvenanceRetrieverPtr ( ) const
inline
std::shared_ptr<ProductProvenanceRetriever const> edm::EventPrincipal::provRetrieverPtr ( ) const
inlineprivate

Definition at line 188 of file EventPrincipal.h.

References edm::get_underlying_safe(), and provRetrieverPtr_.

Referenced by mergeProvenanceRetrievers().

edm::propagate_const< std::shared_ptr< ProductProvenanceRetriever > > provRetrieverPtr_
std::shared_ptr< T > & get_underlying_safe(propagate_const< std::shared_ptr< T >> &iP)
std::shared_ptr<ProductProvenanceRetriever>& edm::EventPrincipal::provRetrieverPtr ( )
inlineprivate

Definition at line 189 of file EventPrincipal.h.

References edm::get_underlying_safe(), and provRetrieverPtr_.

edm::propagate_const< std::shared_ptr< ProductProvenanceRetriever > > provRetrieverPtr_
std::shared_ptr< T > & get_underlying_safe(propagate_const< std::shared_ptr< T >> &iP)
void edm::EventPrincipal::put ( BranchDescription const &  bd,
std::unique_ptr< WrapperBase edp,
ProductProvenance const &  productProvenance 
) const

Definition at line 157 of file EventPrincipal.cc.

References edm::BranchDescription::branchID(), Exception, edm::Principal::getExistingProduct(), edm::errors::InsertFailure, edm::ProductProvenanceRetriever::insertIntoSet(), eostools::move(), and productProvenanceRetrieverPtr().

Referenced by productProvenanceRetrieverPtr(), FedRawDataInputSource::read(), and LHESource::readEvent_().

160  {
161 
162  // assert commented out for DaqSource. When DaqSource no longer uses put(), the assert can be restored.
163  //assert(produced());
164  if(edp.get() == nullptr) {
165  throw Exception(errors::InsertFailure, "Null Pointer")
166  << "put: Cannot put because ptr to product is null."
167  << "\n";
168  }
169  productProvenanceRetrieverPtr()->insertIntoSet(productProvenance);
170  auto phb = getExistingProduct(bd.branchID());
171  assert(phb);
172  // ProductResolver assumes ownership
173  phb->putProduct(std::move(edp));
174  }
ProductResolverBase * getExistingProduct(BranchID const &branchID)
Definition: Principal.cc:451
ProductProvenanceRetriever const * productProvenanceRetrieverPtr() const
void insertIntoSet(ProductProvenance provenanceProduct) const
def move(src, dest)
Definition: eostools.py:511
void edm::EventPrincipal::put ( ProductResolverIndex  index,
std::unique_ptr< WrapperBase edp,
ParentageID  productProvenance 
) const

Definition at line 177 of file EventPrincipal.cc.

References Exception, edm::Principal::getProductResolverByIndex(), edm::errors::InsertFailure, edm::ProductProvenanceRetriever::insertIntoSet(), eostools::move(), and productProvenanceRetrieverPtr().

180  {
181  if(edp.get() == nullptr) {
182  throw Exception(errors::InsertFailure, "Null Pointer")
183  << "put: Cannot put because ptr to product is null."
184  << "\n";
185  }
186  auto phb = getProductResolverByIndex(index);
187 
188  productProvenanceRetrieverPtr()->insertIntoSet(ProductProvenance(phb->branchDescription().branchID(), std::move(parentage)));
189 
190  assert(phb);
191  // ProductResolver assumes ownership
192  phb->putProduct(std::move(edp));
193 
194  }
ProductProvenanceRetriever const * productProvenanceRetrieverPtr() const
void insertIntoSet(ProductProvenance provenanceProduct) const
ConstProductResolverPtr getProductResolverByIndex(ProductResolverIndex const &oid) const
Definition: Principal.cc:520
def move(src, dest)
Definition: eostools.py:511
void edm::EventPrincipal::putOnRead ( BranchDescription const &  bd,
std::unique_ptr< WrapperBase edp,
ProductProvenance const *  productProvenance 
) const

Definition at line 197 of file EventPrincipal.cc.

References edm::BranchDescription::branchID(), edm::Principal::getExistingProduct(), edm::ProductProvenanceRetriever::insertIntoSet(), eostools::move(), edm::BranchDescription::produced(), and productProvenanceRetrieverPtr().

Referenced by productProvenanceRetrieverPtr(), and edm::StreamerInputSource::read().

200  {
201 
202  assert(!bd.produced());
203  if (productProvenance) {
204  productProvenanceRetrieverPtr()->insertIntoSet(*productProvenance);
205  }
206  auto phb = getExistingProduct(bd.branchID());
207  assert(phb);
208  // ProductResolver assumes ownership
209  phb->putProduct(std::move(edp));
210  }
ProductResolverBase * getExistingProduct(BranchID const &branchID)
Definition: Principal.cc:451
ProductProvenanceRetriever const * productProvenanceRetrieverPtr() const
void insertIntoSet(ProductProvenance provenanceProduct) const
def move(src, dest)
Definition: eostools.py:511
RunNumber_t edm::EventPrincipal::run ( ) const
inline

Definition at line 134 of file EventPrincipal.h.

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

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

134  {
135  return id().run();
136  }
RunNumber_t run() const
Definition: EventID.h:39
EventID const & id() const
RunPrincipal const & edm::EventPrincipal::runPrincipal ( ) const

Definition at line 152 of file EventPrincipal.cc.

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

Referenced by run().

152  {
154  }
RunPrincipal const & runPrincipal() const
LuminosityBlockPrincipal const & luminosityBlockPrincipal() const
void edm::EventPrincipal::setLuminosityBlockPrincipal ( LuminosityBlockPrincipal lbp)

Definition at line 139 of file EventPrincipal.cc.

References luminosityBlockPrincipal_.

Referenced by luminosityBlockPrincipalPtrValid(), and edm::SubProcess::processAsync().

139  {
141  }
edm::propagate_const< LuminosityBlockPrincipal * > luminosityBlockPrincipal_
void edm::EventPrincipal::setRunAndLumiNumber ( RunNumber_t  run,
LuminosityBlockNumber_t  lumi 
)

Definition at line 144 of file EventPrincipal.cc.

References aux_, edm::EventID::event(), edm::EventAuxiliary::id(), and luminosityBlockPrincipal_.

Referenced by luminosityBlockPrincipalPtrValid(), and edm::OneLumiPoolSource::readEvent_().

144  {
145  assert(run == luminosityBlockPrincipal_->run());
146  assert(lumi == luminosityBlockPrincipal_->luminosityBlock());
147  EventNumber_t event = aux_.id().event();
148  aux_.id() = EventID(run, lumi, event);
149  }
EventNumber_t event() const
Definition: EventID.h:41
RunNumber_t run() const
unsigned long long EventNumber_t
edm::propagate_const< LuminosityBlockPrincipal * > luminosityBlockPrincipal_
EventAuxiliary aux_
EventID const & id() const
Definition: event.py:1
int edm::EventPrincipal::storeNumber ( ) const
inline

Definition at line 120 of file EventPrincipal.h.

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

120  {
121  return aux().storeNumber();
122  }
int storeNumber() const
EventAuxiliary const & aux() const
StreamID edm::EventPrincipal::streamID ( ) const
inline
Timestamp const& edm::EventPrincipal::time ( ) const
inline

Definition at line 104 of file EventPrincipal.h.

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

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

104  {
105  return aux().time();
106  }
Timestamp const & time() const
EventAuxiliary const & aux() const
unsigned int edm::EventPrincipal::transitionIndex_ ( ) const
overrideprivatevirtual

Implements edm::EDProductGetter.

Definition at line 246 of file EventPrincipal.cc.

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

Referenced by mergeProvenanceRetrievers().

246  {
247  return streamID_.value();
248  }
unsigned int value() const
Definition: StreamID.h:46

Member Data Documentation

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

Definition at line 202 of file EventPrincipal.h.

Referenced by branchIDToProductID(), fillEventPrincipal(), and pidToBid().

BranchListIndexes edm::EventPrincipal::branchListIndexes_
private

Definition at line 205 of file EventPrincipal.h.

Referenced by branchListIndexes(), fillEventPrincipal(), and pidToBid().

std::map<BranchListIndex, ProcessIndex> edm::EventPrincipal::branchListIndexToProcessIndex_
private

Definition at line 207 of file EventPrincipal.h.

Referenced by branchIDToProductID(), clearEventPrincipal(), and fillEventPrincipal().

EventSelectionIDVector edm::EventPrincipal::eventSelectionIDs_
private

Definition at line 200 of file EventPrincipal.h.

Referenced by eventSelectionIDs(), and fillEventPrincipal().

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

Definition at line 52 of file EventPrincipal.h.

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

Definition at line 53 of file EventPrincipal.h.

edm::propagate_const<LuminosityBlockPrincipal*> edm::EventPrincipal::luminosityBlockPrincipal_
private
edm::propagate_const<std::shared_ptr<ProductProvenanceRetriever> > edm::EventPrincipal::provRetrieverPtr_
private
StreamID edm::EventPrincipal::streamID_
private

Definition at line 209 of file EventPrincipal.h.

Referenced by streamID(), and transitionIndex_().

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

Definition at line 203 of file EventPrincipal.h.

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