25 boost::shared_ptr<ProductRegistry const> reg,
26 boost::shared_ptr<BranchIDListHelper const> branchIDListHelper,
29 unsigned int streamIndex) :
32 luminosityBlockPrincipal_(),
34 unscheduledHandler_(),
35 moduleLabelsRunning_(),
37 branchIDListHelper_(branchIDListHelper),
39 branchListIndexToProcessIndex_(),
40 streamID_(streamIndex){}
106 for(
auto const&
prod : *
this) {
107 if (
prod->singleProduct()) {
141 <<
"put: Cannot put because ptr to product is null."
181 std::shared_ptr<void> guard(
nullptr,[
this,mcc](
const void*){
199 <<
"get by product ID: invalid ProductID supplied\n";
208 <<
"branchIDToProductID: invalid BranchID supplied\n";
211 typedef BIDToIndexMap::const_iterator Iter;
212 typedef std::pair<Iter, Iter> IndexRange;
215 for(Iter it = range.first; it != range.second; ++it) {
221 return ProductID(processIndex+1, productIndex+1);
235 exception<<
"get by product ID: The product with given id: "<<pid
236 <<
"\ntype: "<<phb->productType()
237 <<
"\nproduct instance name: "<<phb->productInstanceName()
238 <<
"\nprocess name: "<<phb->processName()
239 <<
"\nwas already deleted. This is a configuration error. Please change the configuration of the module which caused this exception to state it reads this data.";
251 <<
"get by product ID: no product with given id: " << pid <<
"\n";
257 if(phb->productWasDeleted()) {
262 if(phb->onDemand()) {
266 <<
"get by ProductID: could not get product with id: " << pid <<
"\n"
267 <<
"Unscheduled execution not allowed to get via ProductID.\n";
272 phb->resolveProduct(status,
false,
nullptr);
293 boost::shared_ptr<UnscheduledHandler>
317 std::vector<std::string>::const_iterator
i =
322 <<
"Hit circular dependency while trying to run an unscheduled module.\n"
323 <<
"The last module on the stack shown above requested data from the\n"
324 <<
"module with label: '" << moduleLabel <<
"'.\n"
325 <<
"This is illegal because this module is already running (it is in the\n"
326 <<
"stack shown above, it might or might not be asking for data from itself).\n"
327 <<
"More information related to resolving circular dependences can be found here:\n"
328 <<
"https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideUnscheduledExecution#Circular_Dependence_Errors.";
336 <<
"EventPrincipal::unscheduledFill, Attempting to run unscheduled production\n"
337 <<
"with a null pointer to the ModuleCalling Context. This should never happen.\n"
338 <<
"Contact a Framework developer";
341 std::shared_ptr<void> guard(
nullptr,[
this,mcc](
const void*){
RunPrincipal const & runPrincipal() const
void setLuminosityBlockPrincipal(boost::shared_ptr< LuminosityBlockPrincipal > const &lbp)
EventNumber_t event() const
unsigned short BranchListIndex
WrapperInterfaceBase const * getInterface() const
EventSelectionIDVector const & eventSelectionIDs() const
boost::shared_ptr< LuminosityBlockPrincipal > luminosityBlockPrincipal_
ConstProductHolderPtr getProductHolder(BranchID const &oid) const
StreamContext const * getStreamContext() const
unsigned int EventNumber_t
BasicHandle getByProductID(ProductID const &oid) const
EventSelectionIDVector eventSelectionIDs_
BranchID pidToBid(ProductID const &pid) const
BranchListIndexes branchListIndexes_
Provenance getProvenance(ProductID const &pid, ModuleCallingContext const *mcc) const
std::map< BranchListIndex, ProcessIndex > branchListIndexToProcessIndex_
void checkUniquenessAndType(WrapperOwningHolder const &prod, ProductHolderBase const *productHolder) const
virtual void readFromSource_(ProductHolderBase const &phb, ModuleCallingContext const *mcc) const override
BranchListIndexes const & branchListIndexes() const
unsigned int LuminosityBlockNumber_t
WrapperHolder getIt(ProductID const &pid) const
ProcessHistory const & processHistory() const
ProductID branchIDToProductID(BranchID const &bid) const
RunPrincipal const & runPrincipal() const
boost::shared_ptr< void const > product() const
std::vector< EventSelectionID > EventSelectionIDVector
virtual bool unscheduledFill(std::string const &moduleLabel, ModuleCallingContext const *mcc) const override
static void throwProductDeletedException(ProductID const &pid, edm::EventPrincipal::ConstProductHolderPtr const phb)
EventPrincipal(boost::shared_ptr< ProductRegistry const > reg, boost::shared_ptr< BranchIDListHelper const > branchIDListHelper, ProcessConfiguration const &pc, HistoryAppender *historyAppender, unsigned int streamIndex=0)
std::vector< BranchListIndex > BranchListIndexes
BranchDescription const & branchDescription() const
BranchID productIDToBranchID(ProductID const &pid, BranchIDLists const &lists, BranchListIndexes const &indexes)
boost::shared_ptr< UnscheduledHandler > unscheduledHandler() const
ProcessHistoryID const & processHistoryID() const
LuminosityBlockPrincipal const & luminosityBlockPrincipal() const
std::shared_ptr< HandleExceptionFactory > makeHandleExceptionFactory(T &&iFunctor)
T const * getProduct(RefCore const &ref)
BranchID const & branchID() const
ProductData const & productData() const
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
boost::shared_ptr< UnscheduledHandler > unscheduledHandler_
std::multimap< BranchID, IndexPair > BranchIDToIndexMap
void fillEventPrincipal(EventAuxiliary const &aux, ProcessHistoryRegistry const &processHistoryRegistry, DelayedReader *reader=nullptr)
unsigned short ProcessIndex
DelayedReader * reader() const
unsigned int value() const
ForwardSequence::const_iterator find_in_all(ForwardSequence const &s, Datum const &d)
wrappers for std::find
virtual unsigned int transitionIndex_() const override
boost::shared_ptr< ProductProvenanceRetriever > productProvenanceRetrieverPtr() const
void clearEventPrincipal()
void setProcessHistoryID(ProcessHistoryID const &phid)
boost::shared_ptr< BranchIDListHelper const > branchIDListHelper_
ProcessHistoryID const & processHistoryID() const
EventID const & id() const
void putProduct(WrapperOwningHolder const &edp, ProductProvenance const &productProvenance)
Base::ConstProductHolderPtr ConstProductHolderPtr
unsigned short ProductIndex
void setUnscheduledHandler(boost::shared_ptr< UnscheduledHandler > iHandler)
void putOnRead(BranchDescription const &bd, void const *product, ProductProvenance const &productProvenance)
boost::shared_ptr< ProductProvenanceRetriever > provRetrieverPtr_
signalslot::Signal< void(StreamContext const &, ModuleCallingContext const &)> preModuleDelayedGetSignal_
WrapperHolder wrapperHolder() const
void setRunAndLumiNumber(RunNumber_t run, LuminosityBlockNumber_t lumi)
void fillPrincipal(ProcessHistoryID const &hist, ProcessHistoryRegistry const &phr, DelayedReader *reader)
EventAuxiliary const & aux() const
void emit(Args &&...args) const
ProductHolderBase * getExistingProduct(BranchID const &branchID)
std::vector< std::string > moduleLabelsRunning_
void put(BranchDescription const &bd, WrapperOwningHolder const &edp, ProductProvenance const &productProvenance)
signalslot::Signal< void(StreamContext const &, ModuleCallingContext const &)> postModuleDelayedGetSignal_
bool productUnavailable() const