|
|
Go to the documentation of this file.
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_(nullptr),
43 branchIDListHelper_(branchIDListHelper),
44 thinnedAssociationsHelper_(thinnedAssociationsHelper),
46 branchListIndexToProcessIndex_(),
47 streamID_(streamIndex) {
50 for (
auto&
prod : *
this) {
51 if (
prod->singleProduct()) {
71 bool deepCopyRetriever) {
73 if (deepCopyRetriever) {
122 "EventAuxiliary, It is illegal for the event number to be 0\n";
155 for (
auto&
prod : *
this) {
156 if (
prod->singleProduct()) {
162 auto const&
bd =
prod->branchDescription();
180 std::unique_ptr<WrapperBase> edp,
184 if (edp.get() ==
nullptr) {
196 if (edp.get() ==
nullptr) {
211 std::unique_ptr<WrapperBase> edp,
212 std::optional<ProductProvenance> productProvenance)
const {
214 if (productProvenance) {
235 typedef BIDToIndexMap::const_iterator Iter;
236 typedef std::pair<Iter, Iter> IndexRange;
239 for (Iter it =
range.first; it !=
range.second; ++it) {
246 return ProductID(processIndex + 1, productIndex + 1);
261 exception <<
"get by product ID: The product with given id: " << pid <<
"\ntype: " << phb->productType()
262 <<
"\nproduct instance name: " << phb->productInstanceName() <<
"\nprocess name: " << phb->processName()
263 <<
"\nwas already deleted. This is a configuration error. Please change the configuration of the module "
264 "which caused this exception to state it reads this data.";
271 if (phb ==
nullptr) {
274 *whyFailed <<
"get by product ID: no product with given id: " << pid <<
"\n";
280 if (phb->productWasDeleted()) {
285 if (phb->unscheduledWasNotRun()) {
288 *whyFailed <<
"get by ProductID: could not get product with id: " << pid <<
"\n"
289 <<
"Unscheduled execution not allowed to get via ProductID.\n";
293 auto resolution = phb->resolveProduct(*
this,
false,
nullptr,
nullptr);
316 std::vector<WrapperBase const*>& foundContainers,
317 std::vector<unsigned int>&
keys)
const {
339 if (
auto factory = std::get_if<detail::GetThinnedKeyFromExceptionFactory>(&
ret)) {
340 return [
func = *factory]() {
342 ex.addContext(
"Calling EventPrincipal::getThinnedKeyFrom()");
349 ex.
addContext(
"Calling EventPrincipal::getThinnedKeyFrom()");
366 if (phb ==
nullptr) {
368 <<
"EventPrincipal::getThinnedAssociation, ThinnedAssociation ProductResolver cannot be found\n"
369 <<
"This should never happen. Contact a Framework developer";
371 ProductData const* productData = (phb->resolveProduct(*
this,
false,
nullptr,
nullptr)).
data();
372 if (productData ==
nullptr) {
378 <<
"EventPrincipal::getThinnedProduct, product has wrong type, not a ThinnedAssociation.\n";
std::optional< std::tuple< WrapperBase const *, unsigned int > > getThinnedProduct(ProductID const &pid, unsigned int key, ThinnedAssociationsHelper const &thinnedAssociationsHelper, F1 pidToBid, F2 getThinnedAssociation, F3 getByProductID)
ret
prodAgent to be discontinued
EventNumber_t event() const
std::shared_ptr< BranchIDListHelper const > branchIDListHelper_
edm::propagate_const< LuminosityBlockPrincipal * > luminosityBlockPrincipal_
RunPrincipal const & runPrincipal() const
EventAuxiliary const & aux() const
unsigned int ProductResolverIndex
LuminosityBlockPrincipal const & luminosityBlockPrincipal() const
void addContext(std::string const &context)
WrapperBase const * wrapper() const
WrapperBase const * getIt(ProductID const &pid) const override
std::shared_ptr< ThinnedAssociationsHelper const > thinnedAssociationsHelper_
std::optional< std::tuple< WrapperBase const *, unsigned int > > getThinnedProduct(ProductID const &pid, unsigned int key) const override
std::vector< BranchListIndex > BranchListIndexes
unsigned short ProcessIndex
unsigned int value() const
static HepMC::HEPEVT_Wrapper wrapper
ProcessHistory const & processHistory() const
unsigned int LuminosityBlockNumber_t
unsigned short ProductIndex
Provenance getProvenance(ProductID const &pid, ModuleCallingContext const *mcc) const
ConstProductResolverPtr getProductResolverByIndex(ProductResolverIndex const &oid) const
void setRunAndLumiNumber(RunNumber_t run, LuminosityBlockNumber_t lumi)
ProductProvenanceRetriever const * productProvenanceRetrieverPtr() const
std::shared_ptr< HandleExceptionFactory > makeHandleExceptionFactory(T &&iFunctor)
BranchListIndexes const & branchListIndexes() const
std::variant< unsigned int, GetThinnedKeyFromExceptionFactory, std::monostate > getThinnedKeyFrom_implementation(ProductID const &parentID, BranchID const &parent, unsigned int key, ProductID const &thinnedID, BranchID thinned, ThinnedAssociationsHelper const &thinnedAssociationsHelper, F &&getThinnedAssociation)
edm::propagate_const< std::shared_ptr< ProductProvenanceRetriever > > provRetrieverPtr_
void insertIntoSet(ProductProvenance provenanceProduct) const
void changedIndexes_() final
Base::ConstProductResolverPtr ConstProductResolverPtr
edm::ThinnedAssociation const * getThinnedAssociation(edm::BranchID const &branchID) const
ProcessHistoryID const & processHistoryID() const
const EventNumber_t invalidEventNumber
DelayedReader * reader() const
EventID const & id() const
ConstProductResolverPtr getProductResolver(BranchID const &oid) const
std::multimap< BranchID, IndexPair > BranchIDToIndexMap
unsigned short BranchListIndex
unsigned long long EventNumber_t
const_iterator end() const
void put(BranchDescription const &bd, std::unique_ptr< WrapperBase > edp, ProductProvenance const &productProvenance) const
WrapperBase const * wrapper() const noexcept(true)
ProductRegistry const & productRegistry() const
std::type_info const & dynamicTypeInfo() const
OptionalThinnedKey getThinnedKeyFrom(ProductID const &parent, unsigned int key, ProductID const &thinned) const override
void fillPrincipal(DelayedReader *reader)
std::vector< ProcessIndex > branchListIndexToProcessIndex_
void setLuminosityBlockPrincipal(LuminosityBlockPrincipal *lbp)
EventNumber_t event() const
void commonFillEventPrincipal(EventAuxiliary const &aux, ProcessHistory const *processHistory, DelayedReader *reader)
void putOnRead(BranchDescription const &bd, std::unique_ptr< WrapperBase > edp, std::optional< ProductProvenance > productProvenance) const
EventSelectionIDVector const & eventSelectionIDs() const
ProductResolverBase * getExistingProduct(BranchID const &branchID)
void updateBranchListIndexes(BranchListIndexes &&)
EventSelectionIDVector eventSelectionIDs_
BasicHandle getByProductID(ProductID const &oid) const
void fillEventPrincipal(EventAuxiliary const &aux, ProcessHistory const *processHistory, DelayedReader *reader=nullptr)
std::variant< unsigned int, detail::GetThinnedKeyFromExceptionFactory, std::monostate > OptionalThinnedKey
void getThinnedProducts(ProductID const &pid, std::vector< WrapperBase const * > &foundContainers, std::vector< unsigned int > &keys) const override
static void throwProductDeletedException(ProductID const &pid, edm::EventPrincipal::ConstProductResolverPtr const phb)
void clearEventPrincipal()
ProcessHistoryID const & processHistoryID() const
ProductID branchIDToProductID(BranchID const &bid) const
char data[epos_bytes_allocation]
BranchID productIDToBranchID(ProductID const &pid, BranchIDLists const &lists, BranchListIndexes const &indexes)
unsigned int transitionIndex_() const override
BranchID pidToBid(ProductID const &pid) const
void getThinnedProducts(ProductID const &pid, ThinnedAssociationsHelper const &thinnedAssociationsHelper, F1 pidToBid, F2 getThinnedAssociation, F3 getByProductID, std::vector< WrapperBase const * > &foundContainers, std::vector< unsigned int > &keys)
std::vector< EventSelectionID > EventSelectionIDVector
bool equal(const T &first, const T &second)
RunPrincipal const & runPrincipal() const
void setProcessHistoryID(ProcessHistoryID const &phid)
BranchListIndexes branchListIndexes_
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)
bool wasBranchListIndexesChangedFromInput(BranchListIndexes const &) const