24 class CallbackWrapper {
30 : prod_(iProd), callback_(iCallback), reg_(iReg), mdesc_(iDesc), lastSize_(iProd->typeLabelList().
size()) {}
32 void operator()(BranchDescription
const& iDesc) {
37 void addToRegistry() {
40 if (lastSize_ != plist.size()) {
41 ProducerBase::TypeLabelList::const_iterator pStart = plist.begin();
42 advance(pStart, lastSize_);
44 lastSize_ = plist.size();
49 ProductRegistryHelper* prod_;
50 std::function<void(BranchDescription const&)> callback_;
51 ProductRegistry* reg_;
52 ModuleDescription mdesc_;
53 unsigned int lastSize_;
65 bool isListener =
false;
86 auto range = iIndicies.equal_range(moduleLabel);
87 putIndicies_[iBranchType].reserve(iIndicies.count(moduleLabel));
88 for (
auto it =
range.first; it !=
range.second; ++it) {
89 putIndicies_[iBranchType].push_back(std::get<2>(it->second));
91 for (
auto const& tl : plist) {
92 if (
convertToBranchType(tl.transition_) == iBranchType and (tl.typeID_ == *std::get<0>(it->second)) and
93 (tl.productInstanceName_ == std::get<1>(it->second))) {
TypeLabelList const & typeLabelList() const
used by the fwk to register the list of products of this module
std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex >> ModuleToResolverIndicies
ProductRegistryHelper::TypeLabelList TypeLabelList
void registerProducts(ProducerBase *, ProductRegistry *, ModuleDescription const &)
static void addToRegistry(TypeLabelList::const_iterator const &iBegin, TypeLabelList::const_iterator const &iEnd, ModuleDescription const &iDesc, ProductRegistry &iReg, ProductRegistryHelper *iProd, bool iIsListener=false)
std::function< void(BranchDescription const &)> callWhenNewProductsRegistered_
std::array< std::vector< edm::ProductResolverIndex >, edm::NumBranchTypes > putIndicies_
void resolvePutIndicies(BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
const uint16_t range(const Frame &aFrame)
~ProducerBase() noexcept(false) override
void callForEachBranch(T const &iFunc)
std::vector< edm::ProductResolverIndex > putTokenToResolverIndex_
ProducesCollector producesCollector()
std::function< void(BranchDescription const &)> registrationCallback() const
used by the fwk to register list of products
tuple size
Write out results.
constexpr BranchType convertToBranchType(Transition iValue)