CMS 3D CMS Logo

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

#include <EventPrincipal.h>

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

Classes

class  UnscheduledSentry
 

Public Types

typedef EventAuxiliary Auxiliary
 
typedef Principal Base
 
typedef Base::ConstProductHolderPtr ConstProductHolderPtr
 
- Public Types inherited from edm::Principal
typedef std::vector< BasicHandleBasicHandleVec
 
typedef unsigned long CacheIdentifier_t
 
typedef boost::filter_iterator
< FilledProductPtr,
ProductHolderCollection::const_iterator > 
const_iterator
 
typedef ProductHolderBase const * ConstProductHolderPtr
 
typedef std::string ProcessName
 
typedef
ProcessHistory::const_iterator 
ProcessNameConstIterator
 
typedef std::vector
< std::shared_ptr
< ProductHolderBase > > 
ProductHolderCollection
 
typedef std::shared_ptr
< ProductHolderBase
SharedProductPtr
 
typedef
ProductHolderCollection::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)
 
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 &provRetriever, DelayedReader *reader=0)
 
BasicHandle getByProductID (ProductID const &oid) const
 
virtual WrapperBase const * getIt (ProductID const &pid) const override
 
Provenance getProvenance (ProductID const &pid, ModuleCallingContext const *mcc) const
 
virtual WrapperBase const * getThinnedProduct (ProductID const &pid, unsigned int &key) const override
 
virtual 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 ()
 
void mergeProvenanceRetrievers (EventPrincipal const &other)
 
std::shared_ptr
< ProductProvenanceRetriever
productProvenanceRetrieverPtr () const
 
void put (BranchDescription const &bd, std::unique_ptr< WrapperBase > edp, ProductProvenance const &productProvenance)
 
void putOnRead (BranchDescription const &bd, std::unique_ptr< WrapperBase > edp, ProductProvenance const &productProvenance)
 
RunNumber_t run () const
 
RunPrincipal const & runPrincipal () const
 
void setLuminosityBlockPrincipal (std::shared_ptr< LuminosityBlockPrincipal > const &lbp)
 
void setRunAndLumiNumber (RunNumber_t run, LuminosityBlockNumber_t lumi)
 
void setUnscheduledHandler (std::shared_ptr< UnscheduledHandler > iHandler)
 
int storeNumber () const
 
StreamID streamID () const
 
Timestamp const & time () const
 
std::shared_ptr
< UnscheduledHandler
unscheduledHandler () const
 
 ~EventPrincipal ()
 
- Public Member Functions inherited from edm::Principal
void addAliasedProduct (std::shared_ptr< BranchDescription const > bd)
 
void addInputProduct (std::shared_ptr< BranchDescription const > bd)
 
void addScheduledProduct (std::shared_ptr< BranchDescription const > bd)
 
void addSourceProduct (std::shared_ptr< BranchDescription const > bd)
 
void addUnscheduledProduct (std::shared_ptr< BranchDescription const > bd)
 
void adjustIndexesAfterProductRegistryAddition ()
 
bool adjustToNewProductRegistry (ProductRegistry const &reg)
 
const_iterator begin () const
 
BranchType const & branchType () const
 
CacheIdentifier_t cacheIdentifier () const
 
void clearPrincipal ()
 
void deleteProduct (BranchID const &id)
 
const_iterator end () const
 
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
 
BasicHandle getByLabel (KindOfType kindOfType, TypeID const &typeID, InputTag const &inputTag, EDConsumerBase const *consumes, 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, ModuleCallingContext const *mcc) const
 
BasicHandle getByToken (KindOfType kindOfType, TypeID const &typeID, ProductHolderIndex index, bool skipCurrentProcess, bool &ambiguous, ModuleCallingContext const *mcc) const
 
OutputHandle getForOutput (BranchID const &bid, bool getProd, ModuleCallingContext const *mcc) const
 
void getManyByType (TypeID const &typeID, BasicHandleVec &results, EDConsumerBase const *consumes, ModuleCallingContext const *mcc) const
 
ConstProductHolderPtr getProductHolder (BranchID const &oid) const
 
ConstProductHolderPtr getProductHolderByIndex (ProductHolderIndex const &oid) const
 
Provenance getProvenance (BranchID const &bid, ModuleCallingContext const *mcc) const
 
bool isComplete () const
 
std::vector< unsigned int > const & lookupProcessOrder () const
 
void prefetch (ProductHolderIndex index, bool skipCurrentProcess, ModuleCallingContext const *mcc) const
 
 Principal (std::shared_ptr< ProductRegistry const > reg, std::shared_ptr< ProductHolderIndexHelper const > productLookup, ProcessConfiguration const &pc, BranchType bt, HistoryAppender *historyAppender)
 
ProcessConfiguration const & processConfiguration () const
 
ProcessHistory const & processHistory () const
 
ProcessHistoryID const & processHistoryID () const
 
EDProductGetter const * prodGetter () const
 
ProductHolderIndexHelper const & productLookup () const
 
ProductRegistry const & productRegistry () const
 
DelayedReaderreader () const
 
void readFromSource (ProductHolderBase const &phb, ModuleCallingContext const *mcc) const
 
void recombine (Principal &other, std::vector< BranchID > const &bids)
 
size_t size () const
 
virtual ~Principal ()
 
- Public Member Functions inherited from edm::EDProductGetter
 EDProductGetter ()
 
 EDProductGetter (EDProductGetter const &)=delete
 
EDProductGetter const & operator= (EDProductGetter const &)=delete
 
unsigned int transitionIndex () const
 
virtual ~EDProductGetter ()
 

Public Attributes

signalslot::Signal< void(StreamContext
const &, ModuleCallingContext
const &)> 
postModuleDelayedGetSignal_
 
signalslot::Signal< void(StreamContext
const &, ModuleCallingContext
const &)> 
preModuleDelayedGetSignal_
 

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
 
virtual void readFromSource_ (ProductHolderBase const &phb, ModuleCallingContext const *mcc) const override
 
virtual unsigned int transitionIndex_ () const override
 
virtual bool unscheduledFill (std::string const &moduleLabel, ModuleCallingContext const *mcc) const override
 

Private Attributes

EventAuxiliary aux_
 
std::shared_ptr
< BranchIDListHelper const > 
branchIDListHelper_
 
BranchListIndexes branchListIndexes_
 
std::map< BranchListIndex,
ProcessIndex
branchListIndexToProcessIndex_
 
EventSelectionIDVector eventSelectionIDs_
 
std::shared_ptr
< LuminosityBlockPrincipal
luminosityBlockPrincipal_
 
std::vector< std::string > moduleLabelsRunning_
 
std::shared_ptr
< ProductProvenanceRetriever
provRetrieverPtr_
 
StreamID streamID_
 
std::shared_ptr
< ThinnedAssociationsHelper
const > 
thinnedAssociationsHelper_
 
std::shared_ptr
< UnscheduledHandler
unscheduledHandler_
 

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::auto_ptr< ProductHolderBase > phb)
 
void addProductOrThrow (std::auto_ptr< ProductHolderBase > phb)
 
void checkUniquenessAndType (WrapperBase const *prod, ProductHolderBase const *productHolder) const
 
ProductHolderBasegetExistingProduct (BranchID const &branchID)
 
ProductHolderBasegetExistingProduct (ProductHolderBase const &phb)
 
void putOrMerge (std::unique_ptr< WrapperBase > prod, ProductHolderBase const *productHolder) const
 
void putOrMerge (std::unique_ptr< WrapperBase > prod, ProductProvenance &prov, ProductHolderBase *productHolder)
 

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 
)

Definition at line 30 of file EventPrincipal.cc.

References assert(), and thinnedAssociationsHelper_.

36  :
37  Base(reg, reg->productLookup(InEvent), pc, InEvent, historyAppender),
38  aux_(),
40  provRetrieverPtr_(new ProductProvenanceRetriever(streamIndex)),
44  branchIDListHelper_(branchIDListHelper),
45  thinnedAssociationsHelper_(thinnedAssociationsHelper),
48  streamID_(streamIndex) {
50  }
std::shared_ptr< ThinnedAssociationsHelper const > thinnedAssociationsHelper_
std::shared_ptr< LuminosityBlockPrincipal > luminosityBlockPrincipal_
std::shared_ptr< UnscheduledHandler > unscheduledHandler_
EventSelectionIDVector eventSelectionIDs_
BranchListIndexes branchListIndexes_
assert(m_qm.get())
std::map< BranchListIndex, ProcessIndex > branchListIndexToProcessIndex_
std::shared_ptr< BranchIDListHelper const > branchIDListHelper_
EventAuxiliary aux_
std::shared_ptr< ProductProvenanceRetriever > provRetrieverPtr_
std::vector< std::string > moduleLabelsRunning_
edm::EventPrincipal::~EventPrincipal ( )
inline

Definition at line 61 of file EventPrincipal.h.

61 {}

Member Function Documentation

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

Definition at line 226 of file EventPrincipal.cc.

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

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

226  {
227  if(!bid.isValid()) {
228  throw Exception(errors::NotFound, "InvalidID")
229  << "branchIDToProductID: invalid BranchID supplied\n";
230  }
231  typedef BranchIDListHelper::BranchIDToIndexMap BIDToIndexMap;
232  typedef BIDToIndexMap::const_iterator Iter;
233  typedef std::pair<Iter, Iter> IndexRange;
234 
235  IndexRange range = branchIDListHelper_->branchIDToIndexMap().equal_range(bid);
236  for(Iter it = range.first; it != range.second; ++it) {
237  BranchListIndex blix = it->second.first;
238  std::map<BranchListIndex, ProcessIndex>::const_iterator i = branchListIndexToProcessIndex_.find(blix);
239  if(i != branchListIndexToProcessIndex_.end()) {
240  ProductIndex productIndex = it->second.second;
241  ProcessIndex processIndex = i->second;
242  return ProductID(processIndex+1, productIndex+1);
243  }
244  }
245  // cannot throw, because some products may legitimately not have product ID's (e.g. pile-up).
246  return ProductID();
247  }
int i
Definition: DBlmapReader.cc:9
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 113 of file EventPrincipal.h.

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

113  {
114  return aux().bunchCrossing();
115  }
int bunchCrossing() const
EventAuxiliary const & aux() const
void edm::EventPrincipal::clearEventPrincipal ( )

Definition at line 53 of file EventPrincipal.cc.

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

Referenced by edm::VectorInputSource::clearEventPrincipal(), and edm::SubProcess::process().

53  {
55  aux_ = EventAuxiliary();
57  provRetrieverPtr_->reset();
58  unscheduledHandler_.reset();
59  moduleLabelsRunning_.clear();
61  }
void clearPrincipal()
Definition: Principal.cc:314
std::shared_ptr< LuminosityBlockPrincipal > luminosityBlockPrincipal_
std::shared_ptr< UnscheduledHandler > unscheduledHandler_
std::map< BranchListIndex, ProcessIndex > branchListIndexToProcessIndex_
EventAuxiliary aux_
std::shared_ptr< ProductProvenanceRetriever > provRetrieverPtr_
std::vector< std::string > moduleLabelsRunning_
EventSelectionIDVector const & edm::EventPrincipal::eventSelectionIDs ( ) const
EventAuxiliary::ExperimentType edm::EventPrincipal::ExperimentType ( ) const
inline

Definition at line 109 of file EventPrincipal.h.

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

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

Definition at line 95 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::process(), edm::StreamerInputSource::read(), edm::RootFile::readCurrentEvent(), LHESource::readEvent_(), and edm::ProducerSourceBase::readEvent_().

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

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

84  {
87  if(branchIDListHelper_->hasProducedProducts()) {
88  // Add index into BranchIDListRegistry for products produced this process
89  branchListIndexes_.push_back(branchIDListHelper_->producedBranchListIndex());
90  }
91  fillEventPrincipal(aux,processHistoryRegistry,nullptr);
92  }
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 provRetriever,
DelayedReader reader = 0 
)

Definition at line 64 of file EventPrincipal.cc.

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

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

Definition at line 265 of file EventPrincipal.cc.

References edm::Principal::getProductHolder(), edm::makeHandleExceptionFactory(), pidToBid(), edm::errors::ProductNotFound, ntuplemaker::status, and edm::throwProductDeletedException().

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

265  {
266  BranchID bid = pidToBid(pid);
267  ConstProductHolderPtr const phb = getProductHolder(bid);
268  if(phb == nullptr) {
269  return BasicHandle(makeHandleExceptionFactory([pid]()->std::shared_ptr<cms::Exception> {
270  std::shared_ptr<cms::Exception> whyFailed(std::make_shared<Exception>(errors::ProductNotFound, "InvalidID"));
271  *whyFailed
272  << "get by product ID: no product with given id: " << pid << "\n";
273  return whyFailed;
274  }));
275  }
276 
277  // Was this already deleted?
278  if(phb->productWasDeleted()) {
280  }
281  // Check for case where we tried on demand production and
282  // it failed to produce the object
283  if(phb->onDemand()) {
284  return BasicHandle(makeHandleExceptionFactory([pid]()->std::shared_ptr<cms::Exception> {
285  std::shared_ptr<cms::Exception> whyFailed(std::make_shared<Exception>(errors::ProductNotFound, "InvalidID"));
286  *whyFailed
287  << "get by ProductID: could not get product with id: " << pid << "\n"
288  << "Unscheduled execution not allowed to get via ProductID.\n";
289  return whyFailed;
290  }));
291  }
293  phb->resolveProduct(status,false,nullptr);
294 
295  return BasicHandle(phb->productData());
296  }
ConstProductHolderPtr getProductHolder(BranchID const &oid) const
Definition: Principal.cc:449
BranchID pidToBid(ProductID const &pid) const
static void throwProductDeletedException(ProductID const &pid, edm::EventPrincipal::ConstProductHolderPtr const phb)
std::shared_ptr< HandleExceptionFactory > makeHandleExceptionFactory(T &&iFunctor)
tuple pid
Definition: sysUtil.py:22
Base::ConstProductHolderPtr ConstProductHolderPtr
tuple status
Definition: ntuplemaker.py:245
WrapperBase const * edm::EventPrincipal::getIt ( ProductID const &  pid) const
overridevirtual

Reimplemented from edm::Principal.

Definition at line 299 of file EventPrincipal.cc.

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

299  {
300  return getByProductID(pid).wrapper();
301  }
BasicHandle getByProductID(ProductID const &oid) const
WrapperBase const * wrapper() const
Definition: BasicHandle.h:98
tuple pid
Definition: sysUtil.py:22
Provenance edm::EventPrincipal::getProvenance ( ProductID const &  pid,
ModuleCallingContext const *  mcc 
) const

Definition at line 410 of file EventPrincipal.cc.

References pidToBid().

Referenced by edm::Event::getProvenance(), and edm::RootOutputFile::insertAncestors().

410  {
411  BranchID bid = pidToBid(pid);
412  return getProvenance(bid, mcc);
413  }
BranchID pidToBid(ProductID const &pid) const
Provenance getProvenance(ProductID const &pid, ModuleCallingContext const *mcc) const
tuple pid
Definition: sysUtil.py:22
edm::ThinnedAssociation const * edm::EventPrincipal::getThinnedAssociation ( edm::BranchID const &  branchID) const
private

Definition at line 436 of file EventPrincipal.cc.

References compareJSON::const, edm::WrapperBase::dynamicTypeInfo(), Exception, edm::Principal::getProductHolder(), edm::errors::LogicError, edm::Wrapper< T >::product(), ntuplemaker::status, wrapper, and edm::ProductData::wrapper_.

Referenced by getThinnedProduct(), and getThinnedProducts().

436  {
437 
438  ConstProductHolderPtr const phb = getProductHolder(branchID);
439 
440  if(phb == nullptr) {
442  << "EventPrincipal::getThinnedAssociation, ThinnedAssociation ProductHolder cannot be found\n"
443  << "This should never happen. Contact a Framework developer";
444  }
446  ProductData const* productData = phb->resolveProduct(status,false,nullptr);
447  if (productData == nullptr) {
448  return nullptr;
449  }
450  WrapperBase const* product = productData->wrapper_.get();
451  if(!(typeid(edm::ThinnedAssociation) == product->dynamicTypeInfo())) {
453  << "EventPrincipal::getThinnedProduct, product has wrong type, not a ThinnedAssociation.\n";
454  }
455  Wrapper<ThinnedAssociation> const* wrapper = static_cast<Wrapper<ThinnedAssociation> const*>(product);
456  return wrapper->product();
457  }
ConstProductHolderPtr getProductHolder(BranchID const &oid) const
Definition: Principal.cc:449
string const
Definition: compareJSON.py:14
Base::ConstProductHolderPtr ConstProductHolderPtr
tuple status
Definition: ntuplemaker.py:245
static HepMC::HEPEVT_Wrapper wrapper
WrapperBase const * edm::EventPrincipal::getThinnedProduct ( ProductID const &  pid,
unsigned int &  key 
) const
overridevirtual

Reimplemented from edm::Principal.

Definition at line 304 of file EventPrincipal.cc.

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

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

Reimplemented from edm::Principal.

Definition at line 348 of file EventPrincipal.cc.

References getByProductID(), getThinnedAssociation(), edm::ThinnedAssociation::hasParentIndex(), edm::BasicHandle::isValid(), relval_steps::k, bookConverter::max, dbtoconf::parent, edm::ThinnedAssociation::parentCollectionID(), pidToBid(), thinnedAssociationsHelper_, edm::ThinnedAssociation::thinnedCollectionID(), and edm::BasicHandle::wrapper().

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

Definition at line 97 of file EventPrincipal.h.

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

Referenced by edm::DataMixingEcalDigiWorkerProd::addEcalPileups(), edm::DataMixingEMWorker::addEMPileups(), edm::DataMixingEMDigiWorker::addEMPileups(), edm::DataMixingGeneralTrackWorker::addGeneralTrackPileups(), edm::DataMixingHcalWorker::addHcalPileups(), edm::DataMixingHcalDigiWorkerProd::addHcalPileups(), edm::DataMixingHcalDigiWorker::addHcalPileups(), edm::DataMixingMuonWorker::addMuonPileups(), sistrip::SpyEventMatcher::addNextEventToMap(), edm::DataMixingPileupCopy::addPileupInfo(), edm::DataMixingSiPixelWorker::addSiPixelPileups(), edm::DataMixingSiPixelMCDigiWorker::addSiPixelPileups(), edm::DataMixingSiStripWorker::addSiStripPileups(), edm::DataMixingSiStripRawWorker::addSiStripPileups(), edm::DataMixingSiStripMCDigiWorker::addSiStripPileups(), edm::DataMixingTrackingParticleWorker::addTrackingParticlePileups(), edm::EDLooperBase::doDuringLoop(), edm::SecSourceAnalyzer::getBranches(), luminosityBlock(), edm::RecordEventID< T >::operator()(), edm::MixingModule::pileAllWorkers(), edm::DataMixingModule::pileWorker(), edm::InputSource::readEvent(), edm::PoolSource::readEvent_(), edm::StreamSchedule::reportSkipped(), run(), edm::StreamerOutputModuleBase::serializeEvent(), edm::StreamSerializer::serializeEvent(), edm::OccurrenceTraits< EventPrincipal, BranchActionStreamBegin >::setStreamContext(), edm::AsciiOutputModule::write(), edm::GetProductCheckerOutputModule::write(), edm::PoolOutputModule::write(), and edm::RootOutputFile::writeOne().

97  {
98  return aux().id();
99  }
EventID const & id() const
EventAuxiliary const & aux() const
bool edm::EventPrincipal::isReal ( ) const
inline

Definition at line 105 of file EventPrincipal.h.

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

105  {
106  return aux().isRealData();
107  }
bool isRealData() const
EventAuxiliary const & aux() const
LuminosityBlockNumber_t edm::EventPrincipal::luminosityBlock ( ) const
inline
LuminosityBlockPrincipal const& edm::EventPrincipal::luminosityBlockPrincipal ( ) const
inline

Definition at line 81 of file EventPrincipal.h.

References luminosityBlockPrincipal_.

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

81  {
83  }
std::shared_ptr< LuminosityBlockPrincipal > luminosityBlockPrincipal_
LuminosityBlockPrincipal& edm::EventPrincipal::luminosityBlockPrincipal ( )
inline

Definition at line 85 of file EventPrincipal.h.

References luminosityBlockPrincipal_.

85  {
87  }
std::shared_ptr< LuminosityBlockPrincipal > luminosityBlockPrincipal_
bool edm::EventPrincipal::luminosityBlockPrincipalPtrValid ( )
inline

Definition at line 89 of file EventPrincipal.h.

References luminosityBlockPrincipal_.

89  {
90  return (luminosityBlockPrincipal_) ? true : false;
91  }
std::shared_ptr< LuminosityBlockPrincipal > luminosityBlockPrincipal_
void edm::EventPrincipal::mergeProvenanceRetrievers ( EventPrincipal const &  other)
inline

Definition at line 170 of file EventPrincipal.h.

References productProvenanceRetrieverPtr(), and provRetrieverPtr_.

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

170  {
171  provRetrieverPtr_->mergeProvenanceRetrievers(other.productProvenanceRetrieverPtr());
172  }
std::shared_ptr< ProductProvenanceRetriever > provRetrieverPtr_
BranchID edm::EventPrincipal::pidToBid ( ProductID const &  pid) const
private

Definition at line 217 of file EventPrincipal.cc.

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

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

217  {
218  if(!pid.isValid()) {
219  throw Exception(errors::ProductNotFound, "InvalidID")
220  << "get by product ID: invalid ProductID supplied\n";
221  }
223  }
BranchListIndexes branchListIndexes_
std::shared_ptr< BranchIDListHelper const > branchIDListHelper_
BranchID productIDToBranchID(ProductID const &pid, BranchIDLists const &lists, BranchListIndexes const &indexes)
tuple pid
Definition: sysUtil.py:22
std::shared_ptr<ProductProvenanceRetriever> edm::EventPrincipal::productProvenanceRetrieverPtr ( ) const
inline
void edm::EventPrincipal::put ( BranchDescription const &  bd,
std::unique_ptr< WrapperBase edp,
ProductProvenance const &  productProvenance 
)

Definition at line 154 of file EventPrincipal.cc.

References assert(), edm::BranchDescription::branchID(), edm::Principal::checkUniquenessAndType(), Exception, edm::Principal::getExistingProduct(), edm::errors::InsertFailure, productProvenanceRetrieverPtr(), and edm::ProductHolderBase::putProduct().

Referenced by edm::Event::commit_aux(), FedRawDataInputSource::read(), and LHESource::readEvent_().

157  {
158 
159  // assert commented out for DaqSource. When DaqSource no longer uses put(), the assert can be restored.
160  //assert(produced());
161  if(edp.get() == nullptr) {
162  throw Exception(errors::InsertFailure, "Null Pointer")
163  << "put: Cannot put because ptr to product is null."
164  << "\n";
165  }
166  productProvenanceRetrieverPtr()->insertIntoSet(productProvenance);
167  ProductHolderBase* phb = getExistingProduct(bd.branchID());
168  assert(phb);
169  checkUniquenessAndType(edp.get(), phb);
170  // ProductHolder assumes ownership
171  phb->putProduct(std::move(edp), productProvenance);
172  }
assert(m_qm.get())
std::shared_ptr< ProductProvenanceRetriever > productProvenanceRetrieverPtr() const
void checkUniquenessAndType(WrapperBase const *prod, ProductHolderBase const *productHolder) const
Definition: Principal.cc:825
ProductHolderBase * getExistingProduct(BranchID const &branchID)
Definition: Principal.cc:393
void edm::EventPrincipal::putOnRead ( BranchDescription const &  bd,
std::unique_ptr< WrapperBase edp,
ProductProvenance const &  productProvenance 
)

Definition at line 175 of file EventPrincipal.cc.

References assert(), edm::BranchDescription::branchID(), edm::Principal::checkUniquenessAndType(), edm::Principal::getExistingProduct(), edm::BranchDescription::produced(), productProvenanceRetrieverPtr(), and edm::ProductHolderBase::putProduct().

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

178  {
179 
180  assert(!bd.produced());
181  productProvenanceRetrieverPtr()->insertIntoSet(productProvenance);
182  ProductHolderBase* phb = getExistingProduct(bd.branchID());
183  assert(phb);
184  checkUniquenessAndType(edp.get(), phb);
185  // ProductHolder assumes ownership
186  phb->putProduct(std::move(edp), productProvenance);
187  }
assert(m_qm.get())
std::shared_ptr< ProductProvenanceRetriever > productProvenanceRetrieverPtr() const
void checkUniquenessAndType(WrapperBase const *prod, ProductHolderBase const *productHolder) const
Definition: Principal.cc:825
ProductHolderBase * getExistingProduct(BranchID const &branchID)
Definition: Principal.cc:393
void edm::EventPrincipal::readFromSource_ ( ProductHolderBase const &  phb,
ModuleCallingContext const *  mcc 
) const
overrideprivatevirtual

Reimplemented from edm::Principal.

Definition at line 190 of file EventPrincipal.cc.

References edm::ProductHolderBase::branchDescription(), edm::Principal::checkUniquenessAndType(), edm::signalslot::Signal< T >::emit(), edm::getProduct(), edm::ModuleCallingContext::getStreamContext(), postModuleDelayedGetSignal_, preModuleDelayedGetSignal_, edm::BranchDescription::produced(), edm::ProductHolderBase::product(), edm::ProductHolderBase::productUnavailable(), edm::ProductHolderBase::putProduct(), and edm::Principal::reader().

190  {
191  if(phb.branchDescription().produced()) return; // nothing to do.
192  if(phb.product()) return; // nothing to do.
193  if(phb.productUnavailable()) return; // nothing to do.
194  if(!reader()) return; // nothing to do.
195 
196  // must attempt to load from persistent store
197  BranchKey const bk = BranchKey(phb.branchDescription());
198  {
199  if(mcc) {
200  preModuleDelayedGetSignal_.emit(*(mcc->getStreamContext()),*mcc);
201  }
202  std::shared_ptr<void> guard(nullptr,[this,mcc](const void*){
203  if(mcc) {
204  postModuleDelayedGetSignal_.emit(*(mcc->getStreamContext()),*mcc);
205  }
206  });
207 
208  std::unique_ptr<WrapperBase> edp(reader()->getProduct(bk, this));
209 
210  // Now fix up the ProductHolder
211  checkUniquenessAndType(edp.get(), &phb);
212  phb.putProduct(std::move(edp));
213  }
214  }
T const * getProduct(RefCore const &ref)
Definition: RefCoreGet.h:41
void checkUniquenessAndType(WrapperBase const *prod, ProductHolderBase const *productHolder) const
Definition: Principal.cc:825
DelayedReader * reader() const
Definition: Principal.h:171
signalslot::Signal< void(StreamContext const &, ModuleCallingContext const &)> preModuleDelayedGetSignal_
void emit(Args &&...args) const
Definition: Signal.h:47
signalslot::Signal< void(StreamContext const &, ModuleCallingContext const &)> postModuleDelayedGetSignal_
RunNumber_t edm::EventPrincipal::run ( void  ) const
inline

Definition at line 131 of file EventPrincipal.h.

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

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

131  {
132  return id().run();
133  }
RunNumber_t run() const
Definition: EventID.h:39
EventID const & id() const
RunPrincipal const & edm::EventPrincipal::runPrincipal ( ) const

Definition at line 149 of file EventPrincipal.cc.

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

149  {
151  }
RunPrincipal const & runPrincipal() const
LuminosityBlockPrincipal const & luminosityBlockPrincipal() const
void edm::EventPrincipal::setLuminosityBlockPrincipal ( std::shared_ptr< LuminosityBlockPrincipal > const &  lbp)

Definition at line 136 of file EventPrincipal.cc.

References luminosityBlockPrincipal_.

Referenced by edm::SubProcess::process().

136  {
138  }
std::shared_ptr< LuminosityBlockPrincipal > luminosityBlockPrincipal_
void edm::EventPrincipal::setRunAndLumiNumber ( RunNumber_t  run,
LuminosityBlockNumber_t  lumi 
)

Definition at line 141 of file EventPrincipal.cc.

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

141  {
143  assert(lumi == luminosityBlockPrincipal_->luminosityBlock());
144  EventNumber_t event = aux_.id().event();
145  aux_.id() = EventID(run, lumi, event);
146  }
EventNumber_t event() const
Definition: EventID.h:41
std::shared_ptr< LuminosityBlockPrincipal > luminosityBlockPrincipal_
RunNumber_t run() const
tuple lumi
Definition: fjr2json.py:35
assert(m_qm.get())
unsigned long long EventNumber_t
EventAuxiliary aux_
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
EventID const & id() const
void edm::EventPrincipal::setUnscheduledHandler ( std::shared_ptr< UnscheduledHandler iHandler)

Definition at line 416 of file EventPrincipal.cc.

References unscheduledHandler_.

Referenced by edm::WorkerManager::setupOnDemandSystem().

416  {
417  unscheduledHandler_ = iHandler;
418  }
std::shared_ptr< UnscheduledHandler > unscheduledHandler_
int edm::EventPrincipal::storeNumber ( ) const
inline

Definition at line 117 of file EventPrincipal.h.

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

117  {
118  return aux().storeNumber();
119  }
int storeNumber() const
EventAuxiliary const & aux() const
StreamID edm::EventPrincipal::streamID ( ) const
inline
Timestamp const& edm::EventPrincipal::time ( ) const
inline
unsigned int edm::EventPrincipal::transitionIndex_ ( ) const
overrideprivatevirtual

Implements edm::EDProductGetter.

Definition at line 250 of file EventPrincipal.cc.

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

250  {
251  return streamID_.value();
252  }
unsigned int value() const
Definition: StreamID.h:46
bool edm::EventPrincipal::unscheduledFill ( std::string const &  moduleLabel,
ModuleCallingContext const *  mcc 
) const
overrideprivatevirtual

Implements edm::Principal.

Definition at line 460 of file EventPrincipal.cc.

References edm::signalslot::Signal< T >::emit(), Exception, edm::find_in_all(), edm::ModuleCallingContext::getStreamContext(), i, edm::errors::LogicError, moduleLabelsRunning_, postModuleDelayedGetSignal_, preModuleDelayedGetSignal_, and unscheduledHandler_.

461  {
462 
463  // If it is a module already currently running in unscheduled
464  // mode, then there is a circular dependency related to which
465  // EDProducts modules require and produce. There is no safe way
466  // to recover from this. Here we check for this problem and throw
467  // an exception.
468  std::vector<std::string>::const_iterator i =
469  find_in_all(moduleLabelsRunning_, moduleLabel);
470 
471  if(i != moduleLabelsRunning_.end()) {
473  << "Hit circular dependency while trying to run an unscheduled module.\n"
474  << "The last module on the stack shown above requested data from the\n"
475  << "module with label: '" << moduleLabel << "'.\n"
476  << "This is illegal because this module is already running (it is in the\n"
477  << "stack shown above, it might or might not be asking for data from itself).\n"
478  << "More information related to resolving circular dependences can be found here:\n"
479  << "https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideUnscheduledExecution#Circular_Dependence_Errors.";
480  }
481 
482  UnscheduledSentry sentry(&moduleLabelsRunning_, moduleLabel);
483 
484  if(unscheduledHandler_) {
485  if(mcc == nullptr) {
487  << "EventPrincipal::unscheduledFill, Attempting to run unscheduled production\n"
488  << "with a null pointer to the ModuleCalling Context. This should never happen.\n"
489  << "Contact a Framework developer";
490  }
491  preModuleDelayedGetSignal_.emit(*(mcc->getStreamContext()),*mcc);
492  std::shared_ptr<void> guard(nullptr,[this,mcc](const void*){
493  postModuleDelayedGetSignal_.emit(*(mcc->getStreamContext()),*mcc);
494  });
495  unscheduledHandler_->tryToFill(moduleLabel, *const_cast<EventPrincipal*>(this), mcc);
496  }
497  return true;
498  }
int i
Definition: DBlmapReader.cc:9
std::shared_ptr< UnscheduledHandler > unscheduledHandler_
ForwardSequence::const_iterator find_in_all(ForwardSequence const &s, Datum const &d)
wrappers for std::find
Definition: Algorithms.h:32
signalslot::Signal< void(StreamContext const &, ModuleCallingContext const &)> preModuleDelayedGetSignal_
void emit(Args &&...args) const
Definition: Signal.h:47
std::vector< std::string > moduleLabelsRunning_
signalslot::Signal< void(StreamContext const &, ModuleCallingContext const &)> postModuleDelayedGetSignal_
std::shared_ptr< UnscheduledHandler > edm::EventPrincipal::unscheduledHandler ( ) const

Definition at line 421 of file EventPrincipal.cc.

References unscheduledHandler_.

Referenced by edm::getUnscheduledHandler().

421  {
422  return unscheduledHandler_;
423  }
std::shared_ptr< UnscheduledHandler > unscheduledHandler_

Member Data Documentation

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

Definition at line 222 of file EventPrincipal.h.

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

BranchListIndexes edm::EventPrincipal::branchListIndexes_
private

Definition at line 225 of file EventPrincipal.h.

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

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

Definition at line 227 of file EventPrincipal.h.

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

EventSelectionIDVector edm::EventPrincipal::eventSelectionIDs_
private

Definition at line 220 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.

std::shared_ptr<LuminosityBlockPrincipal> edm::EventPrincipal::luminosityBlockPrincipal_
private
std::vector<std::string> edm::EventPrincipal::moduleLabelsRunning_
mutableprivate

Definition at line 218 of file EventPrincipal.h.

Referenced by clearEventPrincipal(), and unscheduledFill().

signalslot::Signal<void(StreamContext const&, ModuleCallingContext const&)> edm::EventPrincipal::postModuleDelayedGetSignal_

Definition at line 177 of file EventPrincipal.h.

Referenced by readFromSource_(), and unscheduledFill().

signalslot::Signal<void(StreamContext const&, ModuleCallingContext const&)> edm::EventPrincipal::preModuleDelayedGetSignal_

Definition at line 176 of file EventPrincipal.h.

Referenced by readFromSource_(), and unscheduledFill().

std::shared_ptr<ProductProvenanceRetriever> edm::EventPrincipal::provRetrieverPtr_
private
StreamID edm::EventPrincipal::streamID_
private

Definition at line 229 of file EventPrincipal.h.

Referenced by streamID(), and transitionIndex_().

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

Definition at line 223 of file EventPrincipal.h.

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

std::shared_ptr<UnscheduledHandler> edm::EventPrincipal::unscheduledHandler_
private