3 #include "DataFormats/TestObjects/interface/ToyProducts.h" 33 : inputToken1_(consumes(iConfig.getParameter<
edm::
InputTag>(
"src1"))),
34 inputToken2_(consumes(iConfig.getParameter<
edm::
InputTag>(
"src2"))),
35 producerPrefix_(iConfig.getParameter<
std::
string>(
"producerPrefix")),
36 aliasMode_(iConfig.getParameter<
bool>(
"aliasMode")) {}
55 assert(provenance !=
nullptr);
57 assert(productProvenance !=
nullptr);
58 auto const& processHistory =
iEvent.processHistory();
61 assert(psetRegistry !=
nullptr);
70 if (pc.processName() == provenance->
processName()) {
78 auto const& allCases = modPSet.getParameter<std::vector<std::string>>(
"@all_cases");
79 assert(allCases.size() == 2);
82 assert(modPSet.exists(
"@chosen_case") ==
false);
87 auto const&
parent = productProvenance->parentage();
90 auto const& parentProvenance =
iEvent.getProvenance(
parent.parents()[0]);
100 parentProductProvenance = parentProvenance.productProvenance();
101 assert(parentProductProvenance !=
nullptr);
103 auto const& grandParent = parentProductProvenance ? parentProductProvenance->
parentage() :
parent;
105 assert(grandParent.parents().size() == 1);
106 auto const& grandParentProvenance =
iEvent.getProvenance(grandParent.parents()[0]);
edm::EDGetTokenT< IntProduct > inputToken2_
bool getMapped(key_type const &k, value_type &result) const
ProductProvenance const * productProvenance() const
edm::EDGetTokenT< IntProduct > inputToken1_
ParameterSet const & getParameterSet(std::string const &) const
std::string const & processName() const
void analyze(edm::StreamID, edm::Event const &iEvent, edm::EventSetup const &iSetup) const override
static std::string to_string(const XMLCh *ch)
std::string producerPrefix_
#define DEFINE_FWK_MODULE(type)
BranchID const & branchID() const
void testProduct(edm::Handle< IntProduct > const &prod, int mode, edm::Event const &iEvent) const
SwitchProducerProvenanceAnalyzer(edm::ParameterSet const &iConfig)
std::string const & moduleLabel() const
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
static Registry * instance()
Parentage const & parentage() const