34 std::shared_ptr<BranchIDListHelper const> branchIDListHelper,
35 std::shared_ptr<ThinnedAssociationsHelper const> thinnedAssociationsHelper,
38 unsigned int streamIndex,
39 bool isForPrimaryProcess,
41 :
Base(reg, reg->productLookup(
InEvent), pc,
InEvent, historyAppender, isForPrimaryProcess),
43 luminosityBlockPrincipal_(nullptr),
46 branchIDListHelper_(branchIDListHelper),
47 processBlockHelper_(processBlockHelper),
48 thinnedAssociationsHelper_(thinnedAssociationsHelper),
50 branchListIndexToProcessIndex_(),
51 streamID_(streamIndex) {
54 for (
auto& prod : *
this) {
55 if (prod->singleProduct()) {
76 bool deepCopyRetriever) {
78 if (deepCopyRetriever) {
128 "EventAuxiliary, It is illegal for the event number to be 0\n";
161 for (
auto& prod : *
this) {
162 if (prod->singleProduct()) {
168 auto const&
bd = prod->branchDescription();
186 std::unique_ptr<WrapperBase> edp,
190 if (edp.get() ==
nullptr) {
202 if (edp.get() ==
nullptr) {
217 std::unique_ptr<WrapperBase> edp,
218 std::optional<ProductProvenance> productProvenance)
const {
220 if (productProvenance) {
241 typedef BIDToIndexMap::const_iterator Iter;
242 typedef std::pair<Iter, Iter> IndexRange;
245 for (Iter it = range.first; it != range.second; ++it) {
252 return ProductID(processIndex + 1, productIndex + 1);
271 exception <<
"get by product ID: The product with given id: " << pid <<
"\ntype: " << phb->productType()
272 <<
"\nproduct instance name: " << phb->productInstanceName() <<
"\nprocess name: " << phb->processName()
273 <<
"\nwas already deleted. This is a configuration error. Please change the configuration of the module "
274 "which caused this exception to state it reads this data.";
281 if (phb ==
nullptr) {
284 *whyFailed <<
"get by product ID: no product with given id: " << pid <<
"\n";
290 if (phb->productWasDeleted()) {
295 if (phb->unscheduledWasNotRun()) {
298 *whyFailed <<
"get by ProductID: could not get product with id: " << pid <<
"\n"
299 <<
"Unscheduled execution not allowed to get via ProductID.\n";
303 auto resolution = phb->resolveProduct(*
this,
false,
nullptr,
nullptr);
326 std::vector<WrapperBase const*>& foundContainers,
327 std::vector<unsigned int>&
keys)
const {
349 if (
auto factory = std::get_if<detail::GetThinnedKeyFromExceptionFactory>(&
ret)) {
350 return [
func = *factory]() {
352 ex.addContext(
"Calling EventPrincipal::getThinnedKeyFrom()");
359 ex.
addContext(
"Calling EventPrincipal::getThinnedKeyFrom()");
385 if (phb ==
nullptr) {
387 <<
"EventPrincipal::getThinnedAssociation, ThinnedAssociation ProductResolver cannot be found\n"
388 <<
"This should never happen. Contact a Framework developer";
390 ProductData const* productData = (phb->resolveProduct(*
this,
false,
nullptr,
nullptr)).
data();
391 if (productData ==
nullptr) {
397 <<
"EventPrincipal::getThinnedProduct, product has wrong type, not a ThinnedAssociation.\n";
RunPrincipal const & runPrincipal() const
void fillPrincipal(DelayedReader *reader)
std::shared_ptr< ThinnedAssociationsHelper const > thinnedAssociationsHelper_
void setLuminosityBlockPrincipal(LuminosityBlockPrincipal *lbp)
ProductRegistry const & productRegistry() const
EventNumber_t event() const
void commonFillEventPrincipal(EventAuxiliary const &aux, ProcessHistory const *processHistory, DelayedReader *reader)
unsigned short BranchListIndex
tuple ret
prodAgent to be discontinued
EventToProcessBlockIndexes const & eventToProcessBlockIndexes() const
EventSelectionIDVector const & eventSelectionIDs() const
unsigned int ProductResolverIndex
std::variant< unsigned int, detail::GetThinnedKeyFromExceptionFactory, std::monostate > OptionalThinnedKey
std::type_info const & dynamicTypeInfo() const
EventToProcessBlockIndexes eventToProcessBlockIndexes_
const_iterator end() const
BasicHandle getByProductID(ProductID const &oid) const
EventSelectionIDVector eventSelectionIDs_
unsigned int processBlockIndex(std::string const &processName) const override
BranchID pidToBid(ProductID const &pid) const
std::optional< std::tuple< WrapperBase const *, unsigned int > > getThinnedProduct(ProductID const &pid, unsigned int key, ThinnedAssociationsHelper const &thinnedAssociationsHelper, F1 pidToBid, F2 getThinnedAssociation, F3 getByProductID)
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)
BranchListIndexes branchListIndexes_
edm::ThinnedAssociation const * getThinnedAssociation(edm::BranchID const &branchID) const
ProductResolverBase * getExistingProduct(BranchID const &branchID)
unsigned long long EventNumber_t
StableProvenance const & getStableProvenance(ProductID const &pid) const
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t Func __host__ __device__ V int Func func
edm::propagate_const< LuminosityBlockPrincipal * > luminosityBlockPrincipal_
WrapperBase const * wrapper() const
void changedIndexes_() final
std::shared_ptr< BranchIDListHelper const > branchIDListHelper_
edm::propagate_const< std::shared_ptr< ProductProvenanceRetriever > > provRetrieverPtr_
OptionalThinnedKey getThinnedKeyFrom(ProductID const &parent, unsigned int key, ProductID const &thinned) const override
BranchListIndexes const & branchListIndexes() const
unsigned int LuminosityBlockNumber_t
ProcessHistory const & processHistory() const
ProductID branchIDToProductID(BranchID const &bid) const
Provenance const & getProvenance(ProductID const &pid) const
RunPrincipal const & runPrincipal() const
bool equal(const T &first, const T &second)
std::vector< EventSelectionID > EventSelectionIDVector
static void throwProductDeletedException(ProductID const &pid, edm::EventPrincipal::ConstProductResolverPtr const phb)
const uint16_t range(const Frame &aFrame)
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
tuple key
prepare the HTCondor submission files and eventually submit them
WrapperBase const * getIt(ProductID const &pid) const override
BranchID const & branchID() const
void updateBranchListIndexes(BranchListIndexes &&)
void put(BranchDescription const &bd, std::unique_ptr< WrapperBase > edp, ProductProvenance const &productProvenance) const
std::multimap< BranchID, IndexPair > BranchIDToIndexMap
ProductProvenanceRetriever const * productProvenanceRetrieverPtr() const
virtual unsigned int processBlockIndex(std::string const &processName, EventToProcessBlockIndexes const &) const =0
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, ProcessBlockHelperBase const *processBlockHelper=nullptr)
std::vector< ProcessIndex > branchListIndexToProcessIndex_
unsigned short ProcessIndex
DelayedReader * reader() const
unsigned int value() const
WrapperBase const * wrapper() const noexcept(true)
unsigned int transitionIndex_() const override
T const * product() const
void clearEventPrincipal()
void insertIntoSet(ProductProvenance provenanceProduct) const
void addContext(std::string const &context)
void setProcessHistoryID(ProcessHistoryID const &phid)
void putOnRead(BranchDescription const &bd, std::unique_ptr< WrapperBase > edp, std::optional< ProductProvenance > productProvenance) const
ProcessHistoryID const & processHistoryID() const
void fillEventPrincipal(EventAuxiliary const &aux, ProcessHistory const *processHistory, DelayedReader *reader=nullptr)
ProcessBlockHelperBase const * processBlockHelper_
EventID const & id() const
char data[epos_bytes_allocation]
ConstProductResolverPtr getProductResolverByIndex(ProductResolverIndex const &oid) const
ConstProductResolverPtr getProductResolver(BranchID const &oid) const
bool wasBranchListIndexesChangedFromInput(BranchListIndexes const &) const
unsigned short ProductIndex
void setRunAndLumiNumber(RunNumber_t run, LuminosityBlockNumber_t lumi)
EventAuxiliary const & aux() const
void getThinnedProducts(ProductID const &pid, std::vector< WrapperBase const * > &foundContainers, std::vector< unsigned int > &keys) const override
std::optional< std::tuple< WrapperBase const *, unsigned int > > getThinnedProduct(ProductID const &pid, unsigned int key) const override
void getThinnedProducts(ProductID const &pid, ThinnedAssociationsHelper const &thinnedAssociationsHelper, F1 pidToBid, F2 getThinnedAssociation, F3 getByProductID, std::vector< WrapperBase const * > &foundContainers, std::vector< unsigned int > &keys)
EventNumber_t event() const
static HepMC::HEPEVT_Wrapper wrapper