Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
import FWCore.ParameterSet.Config as cms

import collections

def customiseEarlyDeleteForCandIsoDeposits(process, products):
    # Find the producers

    def _branchName(productType, moduleLabel, instanceLabel=""):
        return "%s_%s_%s_%s" % (productType, moduleLabel, instanceLabel, process.name_())

    for name, module in process.producers_().items():
        cppType = module._TypedParameterizable__type
        if cppType == "CandIsoDepositProducer":
            if module.ExtractorPSet.ComponentName in ["CandViewExtractor", "PFCandWithSuperClusterExtractor"] :
                products[name].append(_branchName("recoIsoDepositedmValueMap", name))

    return products