32 std::shared_ptr<ProductRegistry const> reg,
33 std::shared_ptr<BranchIDListHelper const> branchIDListHelper,
34 std::shared_ptr<ThinnedAssociationsHelper const> thinnedAssociationsHelper,
37 unsigned int streamIndex) :
40 luminosityBlockPrincipal_(),
42 unscheduledHandler_(),
44 branchIDListHelper_(branchIDListHelper),
45 thinnedAssociationsHelper_(thinnedAssociationsHelper),
47 branchListIndexToProcessIndex_(),
48 streamID_(streamIndex) {
99 <<
"EventPrincipal::fillEventPrincipal, Invalid event number provided in EventAuxiliary, It is illegal for the event number to be 0\n";
120 for(
auto&
prod : *
this) {
121 if (
prod->singleProduct()) {
126 auto const & bd =
prod->branchDescription();
155 std::unique_ptr<WrapperBase> edp,
160 if(edp.get() ==
nullptr) {
162 <<
"put: Cannot put because ptr to product is null."
170 phb->putProduct(
std::move(edp), productProvenance);
176 std::unique_ptr<WrapperBase> edp,
185 phb->putProduct(
std::move(edp), productProvenance);
201 std::shared_ptr<void> guard(
nullptr,[
this,mcc](
const void*){
219 <<
"get by product ID: invalid ProductID supplied\n";
228 <<
"branchIDToProductID: invalid BranchID supplied\n";
231 typedef BIDToIndexMap::const_iterator Iter;
232 typedef std::pair<Iter, Iter> IndexRange;
235 for(Iter it = range.first; it != range.second; ++it) {
241 return ProductID(processIndex+1, productIndex+1);
255 exception<<
"get by product ID: The product with given id: "<<pid
256 <<
"\ntype: "<<phb->productType()
257 <<
"\nproduct instance name: "<<phb->productInstanceName()
258 <<
"\nprocess name: "<<phb->processName()
259 <<
"\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.";
271 <<
"get by product ID: no product with given id: " << pid <<
"\n";
277 if(phb->productWasDeleted()) {
282 if(phb->onDemand()) {
286 <<
"get by ProductID: could not get product with id: " << pid <<
"\n"
287 <<
"Unscheduled execution not allowed to get via ProductID.\n";
292 phb->resolveProduct(status,*
this,
false,
nullptr,
nullptr);
310 associatedBranches != iEnd; ++associatedBranches) {
314 if(thinnedAssociation ==
nullptr)
continue;
320 unsigned int thinnedIndex = 0;
333 if(wrapperBase !=
nullptr) {
348 std::vector<WrapperBase const*>& foundContainers,
349 std::vector<unsigned int>&
keys)
const {
356 associatedBranches != iEnd; ++associatedBranches) {
360 if(thinnedAssociation ==
nullptr)
continue;
366 unsigned nKeys = keys.size();
368 std::vector<unsigned int> thinnedIndexes(nKeys, doNotLookForThisIndex);
370 for(
unsigned k = 0;
k < nKeys; ++
k) {
372 if(foundContainers[
k] !=
nullptr)
continue;
374 if(keys[
k] == doNotLookForThisIndex)
continue;
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];
399 for(
unsigned k = 0;
k < nKeys; ++
k) {
400 if(thinnedIndexes[
k] == doNotLookForThisIndex)
continue;
401 keys[
k] = thinnedIndexes[
k];
402 foundContainers[
k] = bhThinned.
wrapper();
419 std::shared_ptr<const UnscheduledHandler>
441 <<
"EventPrincipal::getThinnedAssociation, ThinnedAssociation ProductHolder cannot be found\n"
442 <<
"This should never happen. Contact a Framework developer";
445 ProductData const* productData = phb->resolveProduct(status,*
this,
false,
nullptr,
nullptr);
446 if (productData ==
nullptr) {
452 <<
"EventPrincipal::getThinnedProduct, product has wrong type, not a ThinnedAssociation.\n";
465 <<
"EventPrincipal::unscheduledFill, Attempting to run unscheduled production\n"
466 <<
"with a null pointer to the ModuleCalling Context. This should never happen.\n"
467 <<
"Contact a Framework developer";
470 std::shared_ptr<void> guard(
nullptr,[
this,mcc](
const void*){
473 auto handlerCall = [
this,&moduleLabel,&mcc]() {
RunPrincipal const & runPrincipal() const
std::shared_ptr< ThinnedAssociationsHelper const > thinnedAssociationsHelper_
EventNumber_t event() const
unsigned short BranchListIndex
WrapperBase const * product() const
void setLuminosityBlockPrincipal(std::shared_ptr< LuminosityBlockPrincipal > const &lbp)
EventSelectionIDVector const & eventSelectionIDs() const
ConstProductHolderPtr getProductHolder(BranchID const &oid) const
StreamContext const * getStreamContext() const
std::type_info const & dynamicTypeInfo() const
BasicHandle getByProductID(ProductID const &oid) const
EventSelectionIDVector eventSelectionIDs_
BranchID pidToBid(ProductID const &pid) const
BranchListIndexes branchListIndexes_
edm::ThinnedAssociation const * getThinnedAssociation(edm::BranchID const &branchID) const
Provenance getProvenance(ProductID const &pid, ModuleCallingContext const *mcc) const
std::map< BranchListIndex, ProcessIndex > branchListIndexToProcessIndex_
unsigned long long EventNumber_t
T const * getProduct(RefCore const &ref)
WrapperBase const * wrapper() const
std::shared_ptr< BranchIDListHelper const > branchIDListHelper_
virtual void readFromSource_(ProductHolderBase const &phb, ModuleCallingContext const *mcc) const override
edm::propagate_const< std::shared_ptr< ProductProvenanceRetriever > > provRetrieverPtr_
BranchListIndexes const & branchListIndexes() const
unsigned int LuminosityBlockNumber_t
ProcessHistory const & processHistory() const
ProductID branchIDToProductID(BranchID const &bid) const
void putOnRead(BranchDescription const &bd, std::unique_ptr< WrapperBase > edp, ProductProvenance const &productProvenance) const
RunPrincipal const & runPrincipal() const
std::vector< EventSelectionID > EventSelectionIDVector
virtual WrapperBase const * getThinnedProduct(ProductID const &pid, unsigned int &key) const override
static void throwProductDeletedException(ProductID const &pid, edm::EventPrincipal::ConstProductHolderPtr const phb)
void setUnscheduledHandler(std::shared_ptr< UnscheduledHandler > iHandler)
std::shared_ptr< const UnscheduledHandler > unscheduledHandler() const
EventNumber_t const invalidEventNumber
std::vector< BranchListIndex > BranchListIndexes
BranchDescription const & branchDescription() const
BranchID productIDToBranchID(ProductID const &pid, BranchIDLists const &lists, BranchListIndexes const &indexes)
ProcessHistoryID const & processHistoryID() const
LuminosityBlockPrincipal const & luminosityBlockPrincipal() const
std::shared_ptr< HandleExceptionFactory > makeHandleExceptionFactory(T &&iFunctor)
void checkUniquenessAndType(WrapperBase const *prod, ProductHolderBase const *productHolder) const
void temporaryUnlock(FUNC iFunc)
WrapperBase const * wrapper() const
virtual WrapperBase const * getIt(ProductID const &pid) const override
BranchID const & branchID() const
void put(BranchDescription const &bd, std::unique_ptr< WrapperBase > edp, ProductProvenance const &productProvenance) const
ProductID const & thinnedCollectionID() 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
std::multimap< BranchID, IndexPair > BranchIDToIndexMap
ProductProvenanceRetriever const * productProvenanceRetrieverPtr() const
string key
FastSim: produces sample of signal events, overlayed with premixed minbias events.
unsigned short ProcessIndex
DelayedReader * reader() const
unsigned int value() const
virtual unsigned int transitionIndex_() const override
T const * product() const
void clearEventPrincipal()
void putProduct(std::unique_ptr< WrapperBase > edp, ProductProvenance const &productProvenance) const
edm::propagate_const< std::shared_ptr< LuminosityBlockPrincipal > > luminosityBlockPrincipal_
void setProcessHistoryID(ProcessHistoryID const &phid)
ProcessHistoryID const & processHistoryID() const
EventID const & id() const
void fillEventPrincipal(EventAuxiliary const &aux, ProcessHistoryRegistry const &processHistoryRegistry, DelayedReader *reader=0)
Base::ConstProductHolderPtr ConstProductHolderPtr
unsigned short ProductIndex
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)
ProductID const & parentCollectionID() const
signalslot::Signal< void(StreamContext const &, ModuleCallingContext const &)> preModuleDelayedGetSignal_
bool hasParentIndex(unsigned int parentIndex, unsigned int &thinnedIndex) const
void setRunAndLumiNumber(RunNumber_t run, LuminosityBlockNumber_t lumi)
void fillPrincipal(ProcessHistoryID const &hist, ProcessHistoryRegistry const &phr, DelayedReader *reader)
EventAuxiliary const & aux() const
virtual void getThinnedProducts(ProductID const &pid, std::vector< WrapperBase const * > &foundContainers, std::vector< unsigned int > &keys) const override
EventNumber_t event() const
void emit(Args &&...args) const
ProductHolderBase * getExistingProduct(BranchID const &branchID)
static HepMC::HEPEVT_Wrapper wrapper
signalslot::Signal< void(StreamContext const &, ModuleCallingContext const &)> postModuleDelayedGetSignal_
std::shared_ptr< UnscheduledHandler const > unscheduledHandler_
virtual bool unscheduledFill(std::string const &moduleLabel, SharedResourcesAcquirer *sra, ModuleCallingContext const *mcc) const override
bool productUnavailable() const
void insertIntoSet(ProductProvenance const &provenanceProduct) const