50 default_(iConfig.getParameter<double>(
"default")),
55 produces<edm::ValueMap<float> >();
76 std::vector<std::pair<double, double> > selected;
78 for (
object = objects->begin();
object != endobjects; ++
object) {
80 selected.push_back(std::pair<double, double>(
objSort_(*
object),
objVar_(*
object)));
84 if (
doSort_ && selected.size() > 1) std::sort(selected.begin(), selected.end());
87 std::vector<float>
values(probes->size(), (selected.empty() ?
default_ : selected.back().second));
90 auto valMap = std::make_unique<ValueMap<float>>();
92 filler.insert(probes, values.begin(), values.end());
StringCutObjectSelector< T, true > objCut_
~OtherObjectVariableComputer() override
void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
OtherObjectVariableComputer(const edm::ParameterSet &iConfig)
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Matcher of number of reconstructed objects in the event to probe.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
StringObjectFunction< T, true > objSort_
StringObjectFunction< T, true > objVar_
edm::EDGetTokenT< edm::View< reco::Candidate > > probesToken_
OtherObjectVariableComputer< reco::Candidate > OtherCandVariableComputer
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
edm::EDGetTokenT< edm::View< T > > objectsToken_
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator