35 std::shared_ptr<BranchIDListHelper const> branchIDListHelper,
36 std::shared_ptr<ThinnedAssociationsHelper const> thinnedAssociationsHelper,
39 unsigned int streamIndex,
40 bool isForPrimaryProcess,
42 :
Base(reg, reg->productLookup(
InEvent), pc,
InEvent, historyAppender, isForPrimaryProcess),
44 luminosityBlockPrincipal_(nullptr),
47 branchIDListHelper_(branchIDListHelper),
48 processBlockHelper_(processBlockHelper),
49 thinnedAssociationsHelper_(thinnedAssociationsHelper),
51 branchListIndexToProcessIndex_(),
52 streamID_(streamIndex) {
55 for (
auto&
prod : *
this) {
56 if (
prod->singleProduct()) {
77 bool deepCopyRetriever) {
79 if (deepCopyRetriever) {
130 "EventAuxiliary, It is illegal for the event number to be 0\n";
157 for (
auto&
prod : *
this) {
158 if (
prod->singleProduct()) {
164 auto const& bd =
prod->branchDescription();
182 std::unique_ptr<WrapperBase> edp,
186 if (edp.get() ==
nullptr) {
198 if (edp.get() ==
nullptr) {
213 std::unique_ptr<WrapperBase> edp,
214 std::optional<ProductProvenance> productProvenance)
const {
216 if (productProvenance) {
247 exception <<
"get by product ID: The product with given id: " << pid <<
"\ntype: " << phb->productType()
248 <<
"\nproduct instance name: " << phb->productInstanceName() <<
"\nprocess name: " << phb->processName()
249 <<
"\nwas already deleted. This is a configuration error. Please change the configuration of the module " 250 "which caused this exception to state it reads this data.";
257 if (phb ==
nullptr) {
260 *whyFailed <<
"get by product ID: no product with given id: " << pid <<
"\n";
266 if (phb->productWasDeleted()) {
271 if (phb->unscheduledWasNotRun()) {
274 *whyFailed <<
"get by ProductID: could not get product with id: " << pid <<
"\n" 275 <<
"Unscheduled execution not allowed to get via ProductID.\n";
279 auto resolution = phb->resolveProduct(*
this,
false,
nullptr,
nullptr);
302 std::vector<WrapperBase const*>& foundContainers,
303 std::vector<unsigned int>&
keys)
const {
325 if (
auto factory = std::get_if<detail::GetThinnedKeyFromExceptionFactory>(&
ret)) {
326 return [
func = *factory]() {
328 ex.addContext(
"Calling EventPrincipal::getThinnedKeyFrom()");
335 ex.
addContext(
"Calling EventPrincipal::getThinnedKeyFrom()");
361 if (phb ==
nullptr) {
363 <<
"EventPrincipal::getThinnedAssociation, ThinnedAssociation ProductResolver cannot be found\n" 364 <<
"This should never happen. Contact a Framework developer";
366 ProductData const* productData = (phb->resolveProduct(*
this,
false,
nullptr,
nullptr)).
data();
367 if (productData ==
nullptr) {
373 <<
"EventPrincipal::getThinnedProduct, product has wrong type, not a ThinnedAssociation.\n";
void fillPrincipal(DelayedReader *reader)
std::shared_ptr< ThinnedAssociationsHelper const > thinnedAssociationsHelper_
std::optional< std::tuple< WrapperBase const *, unsigned int > > getThinnedProduct(ProductID const &pid, unsigned int key) const override
void setLuminosityBlockPrincipal(LuminosityBlockPrincipal *lbp)
void commonFillEventPrincipal(EventAuxiliary const &aux, ProcessHistory const *processHistory, DelayedReader *reader)
unsigned int ProductResolverIndex
EventNumber_t event() const
EventAuxiliary const & aux() const
std::variant< unsigned int, detail::GetThinnedKeyFromExceptionFactory, std::monostate > OptionalThinnedKey
EventToProcessBlockIndexes eventToProcessBlockIndexes_
BranchID const & branchID() const
ProductRegistry const & productRegistry() const
EventSelectionIDVector eventSelectionIDs_
ret
prodAgent to be discontinued
unsigned int processBlockIndex(std::string const &processName) const override
edm::ThinnedAssociation const * getThinnedAssociation(edm::BranchID const &branchID) const
RunPrincipal const & runPrincipal() 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_
ProductResolverBase * getExistingProduct(BranchID const &branchID)
unsigned long long EventNumber_t
LuminosityBlockPrincipal const & luminosityBlockPrincipal() const
edm::propagate_const< LuminosityBlockPrincipal * > luminosityBlockPrincipal_
void changedIndexes_() final
std::shared_ptr< BranchIDListHelper const > branchIDListHelper_
Provenance const & getProvenance(ProductID const &pid) const
edm::propagate_const< std::shared_ptr< ProductProvenanceRetriever > > provRetrieverPtr_
OptionalThinnedKey getThinnedKeyFrom(ProductID const &parent, unsigned int key, ProductID const &thinned) const override
WrapperBase const * wrapper() const
unsigned int LuminosityBlockNumber_t
BasicHandle getByProductID(ProductID const &oid) const
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)
BranchID pidToBid(ProductID const &pid) const
bool equal(const T &first, const T &second)
std::vector< EventSelectionID > EventSelectionIDVector
EventToProcessBlockIndexes const & eventToProcessBlockIndexes() const
ProductID branchIDToProductID(BranchID const &bid, BranchIDListHelper const &branchIDListHelper, std::vector< ProcessIndex > const &branchListIndexToProcessIndex)
static void throwProductDeletedException(ProductID const &pid, edm::EventPrincipal::ConstProductResolverPtr const phb)
void getThinnedProducts(ProductID const &pid, ThinnedAssociationsHelper const &thinnedAssociationsHelper, F1 pidToBid, F2 getThinnedAssociation, F3 getByProductID, std::vector< WrapperBase const *> &foundContainers, std::vector< unsigned int > &keys)
EventID const & id() const
ProductID branchIDToProductID(BranchID const &bid) const
EventNumber_t const invalidEventNumber
std::vector< BranchListIndex > BranchListIndexes
void put(BranchDescription const &bd, std::unique_ptr< WrapperBase > edp, ProductProvenance const &productProvenance) const
BranchID productIDToBranchID(ProductID const &pid, BranchIDLists const &lists, BranchListIndexes const &indexes)
std::type_info const & dynamicTypeInfo() const
std::shared_ptr< HandleExceptionFactory > makeHandleExceptionFactory(T &&iFunctor)
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Base::ConstProductResolverPtr ConstProductResolverPtr
void getThinnedProducts(ProductID const &pid, std::vector< WrapperBase const *> &foundContainers, std::vector< unsigned int > &keys) const override
key
prepare the HTCondor submission files and eventually submit them
void updateBranchListIndexes(BranchListIndexes &&)
virtual unsigned int processBlockIndex(std::string const &processName, EventToProcessBlockIndexes const &) const =0
ProcessHistoryID const & processHistoryID() const
RunPrincipal const & runPrincipal() const
std::vector< ProcessIndex > branchListIndexToProcessIndex_
std::vector< ProcessIndex > makeBranchListIndexToProcessIndex(BranchListIndexes const &branchListIndexes)
WrapperBase const * getIt(ProductID const &pid) const override
WrapperBase const * wrapper() const noexcept(true)
unsigned int transitionIndex_() const override
void putOnRead(BranchDescription const &bd, std::unique_ptr< WrapperBase > edp, std::optional< ProductProvenance > productProvenance) const
ProcessHistory const & processHistory() const
void clearEventPrincipal()
ProductProvenanceRetriever const * productProvenanceRetrieverPtr() const
void addContext(std::string const &context)
void setProcessHistoryID(ProcessHistoryID const &phid)
bool wasBranchListIndexesChangedFromInput(BranchListIndexes const &) const
void fillEventPrincipal(EventAuxiliary const &aux, ProcessHistory const *processHistory, DelayedReader *reader=nullptr)
ProcessBlockHelperBase const * processBlockHelper_
char data[epos_bytes_allocation]
StableProvenance const & getStableProvenance(ProductID const &pid) const
ProcessHistoryID const & processHistoryID() const
EventSelectionIDVector const & eventSelectionIDs() const
unsigned int value() const
void setRunAndLumiNumber(RunNumber_t run, LuminosityBlockNumber_t lumi)
BranchListIndexes const & branchListIndexes() const
const_iterator end() const
ConstProductResolverPtr getProductResolverByIndex(ProductResolverIndex const &oid) const
EventNumber_t event() const
DelayedReader * reader() const
void insertIntoSet(ProductProvenance provenanceProduct) const
static HepMC::HEPEVT_Wrapper wrapper
ConstProductResolverPtr getProductResolver(BranchID const &oid) const