1 #ifndef PhysicsTools_TagAndProbe_interface_AnythingToValueMap_h 2 #define PhysicsTools_TagAndProbe_interface_AnythingToValueMap_h 16 template <
class Adaptor,
17 class Collection =
typename Adaptor::Collection,
26 adaptor_(iConfig, consumesCollector()) {
39 template <
class Adaptor,
class Collection,
typename value_type>
44 if (
handle.failedToGet() && failSilently_)
47 bool adaptorOk = adaptor_.init(
iEvent);
48 if ((!adaptorOk) && failSilently_)
51 std::vector<value_type>
ret;
56 auto map = std::make_unique<Map>();
63 template <
class Adaptor,
64 class Collection =
typename Adaptor::Collection,
72 src_(consumes<Collection>(iConfig.getParameter<
edm::
InputTag>(
"collection"))),
74 for (std::vector<edm::InputTag>::const_iterator
it =
inputs_.begin(), ed =
inputs_.end();
it != ed; ++
it) {
75 adaptors_.push_back(Adaptor(*
it, iConfig, consumesCollector()));
90 template <
class Adaptor,
class Collection,
typename value_type>
95 if (
handle.failedToGet() && failSilently_)
98 std::vector<value_type>
ret;
101 for (
typename std::vector<Adaptor>::iterator
it = adaptors_.begin(), ed = adaptors_.end();
it != ed; ++
it) {
104 auto map = std::make_unique<Map>();
111 throw cms::Exception(
"ManyThingsToValueMaps") <<
"Error in adapter " <<
it->label() <<
"\n";
edm::ValueMap< value_type > Map
ret
prodAgent to be discontinued
~ManyThingsToValueMaps() override
~AnythingToValueMap() override
std::vector< edm::InputTag > inputs_
Container::value_type value_type
void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
AnythingToValueMap(const edm::ParameterSet &iConfig)
edm::EDGetTokenT< Collection > src_
std::vector< Adaptor > adaptors_
edm::ValueMap< value_type > Map
edm::EDGetTokenT< Collection > src_
ManyThingsToValueMaps(const edm::ParameterSet &iConfig)
void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override