31 std::shared_ptr<ProductRegistry const> reg,
32 std::shared_ptr<BranchIDListHelper const> branchIDListHelper,
33 std::shared_ptr<ThinnedAssociationsHelper const> thinnedAssociationsHelper,
36 unsigned int streamIndex,
37 bool isForPrimaryProcess) :
38 Base(reg, reg->productLookup(
InEvent), pc,
InEvent, historyAppender,isForPrimaryProcess),
40 luminosityBlockPrincipal_(),
43 branchIDListHelper_(branchIDListHelper),
44 thinnedAssociationsHelper_(thinnedAssociationsHelper),
46 branchListIndexToProcessIndex_(),
47 streamID_(streamIndex) {
97 <<
"EventPrincipal::fillEventPrincipal, Invalid event number provided in EventAuxiliary, It is illegal for the event number to be 0\n";
118 for(
auto&
prod : *
this) {
119 if (
prod->singleProduct()) {
124 auto const & bd =
prod->branchDescription();
153 std::unique_ptr<WrapperBase> edp,
158 if(edp.get() ==
nullptr) {
160 <<
"put: Cannot put because ptr to product is null."
173 std::unique_ptr<WrapperBase> edp,
188 <<
"get by product ID: invalid ProductID supplied\n";
197 <<
"branchIDToProductID: invalid BranchID supplied\n";
200 typedef BIDToIndexMap::const_iterator Iter;
201 typedef std::pair<Iter, Iter> IndexRange;
204 for(Iter it = range.first; it != range.second; ++it) {
210 return ProductID(processIndex+1, productIndex+1);
224 exception<<
"get by product ID: The product with given id: "<<pid
225 <<
"\ntype: "<<phb->productType()
226 <<
"\nproduct instance name: "<<phb->productInstanceName()
227 <<
"\nprocess name: "<<phb->processName()
228 <<
"\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.";
240 <<
"get by product ID: no product with given id: " << pid <<
"\n";
246 if(phb->productWasDeleted()) {
251 if(phb->unscheduledWasNotRun()) {
255 <<
"get by ProductID: could not get product with id: " << pid <<
"\n"
256 <<
"Unscheduled execution not allowed to get via ProductID.\n";
260 auto resolution = phb->resolveProduct(*
this,
false,
nullptr,
nullptr);
282 associatedBranches != iEnd; ++associatedBranches) {
286 if(thinnedAssociation ==
nullptr)
continue;
292 unsigned int thinnedIndex = 0;
305 if(wrapperBase !=
nullptr) {
320 std::vector<WrapperBase const*>& foundContainers,
321 std::vector<unsigned int>&
keys)
const {
328 associatedBranches != iEnd; ++associatedBranches) {
332 if(thinnedAssociation ==
nullptr)
continue;
338 unsigned nKeys = keys.size();
340 std::vector<unsigned int> thinnedIndexes(nKeys, doNotLookForThisIndex);
342 for(
unsigned k = 0;
k < nKeys; ++
k) {
344 if(foundContainers[
k] !=
nullptr)
continue;
346 if(keys[
k] == doNotLookForThisIndex)
continue;
365 for(
unsigned k = 0;
k < nKeys; ++
k) {
366 if(foundContainers[
k] ==
nullptr)
continue;
367 if(thinnedIndexes[
k] == doNotLookForThisIndex)
continue;
368 keys[
k] = thinnedIndexes[
k];
371 for(
unsigned k = 0;
k < nKeys; ++
k) {
372 if(thinnedIndexes[
k] == doNotLookForThisIndex)
continue;
373 keys[
k] = thinnedIndexes[
k];
374 foundContainers[
k] = bhThinned.
wrapper();
410 <<
"EventPrincipal::getThinnedAssociation, ThinnedAssociation ProductResolver cannot be found\n"
411 <<
"This should never happen. Contact a Framework developer";
413 ProductData const* productData = (phb->resolveProduct(*
this,
false,
nullptr,
nullptr)).
data();
414 if (productData ==
nullptr) {
420 <<
"EventPrincipal::getThinnedProduct, product has wrong type, not a ThinnedAssociation.\n";
RunPrincipal const & runPrincipal() const
std::shared_ptr< ThinnedAssociationsHelper const > thinnedAssociationsHelper_
EventNumber_t event() const
unsigned short BranchListIndex
void setLuminosityBlockPrincipal(std::shared_ptr< LuminosityBlockPrincipal > const &lbp)
EventSelectionIDVector const & eventSelectionIDs() 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
ProductResolverBase * getExistingProduct(BranchID const &branchID)
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)
virtual void setupUnscheduled(UnscheduledConfigurator const &)
Provenance getProvenance(ProductID const &pid, ModuleCallingContext const *mcc) const
void applyToResolvers(F iFunc)
std::map< BranchListIndex, ProcessIndex > branchListIndexToProcessIndex_
unsigned long long EventNumber_t
WrapperBase const * wrapper() const
std::shared_ptr< BranchIDListHelper const > branchIDListHelper_
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
static void throwProductDeletedException(ProductID const &pid, edm::EventPrincipal::ConstProductResolverPtr const phb)
virtual WrapperBase const * getThinnedProduct(ProductID const &pid, unsigned int &key) const override
EventNumber_t const invalidEventNumber
std::vector< BranchListIndex > BranchListIndexes
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)
Base::ConstProductResolverPtr ConstProductResolverPtr
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
void setupUnscheduled(UnscheduledConfigurator const &)
unsigned int value() const
virtual unsigned int transitionIndex_() const override
T const * product() const
void clearEventPrincipal()
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)
char data[epos_bytes_allocation]
ConstProductResolverPtr getProductResolver(BranchID const &oid) const
unsigned short ProductIndex
ProductID const & parentCollectionID() const
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
static HepMC::HEPEVT_Wrapper wrapper
void insertIntoSet(ProductProvenance const &provenanceProduct) const