5 #ifndef PhysicsTools_PatAlgos_PATUserDataMerger_h
6 #define PhysicsTools_PatAlgos_PATUserDataMerger_h
46 template<
typename ObjectType>
52 template<
typename ObjectType>
58 template<
typename ObjectType>
60 obj.addUserDataFromPtr(key, val);
66 template<
typename ObjectType>
72 template<
typename ObjectType,
typename Operation>
98 template<
typename ObjectType,
typename Operation>
100 userDataSrc_(iConfig.getParameter<std::vector<edm::InputTag> >(
"src") )
121 template<
class ObjectType,
typename Operation>
128 std::vector<edm::InputTag>::const_iterator input_it = userDataSrc_.begin(),
130 input_end = userDataSrc_.end();
132 for ( ; input_it != input_end; ++input_it ) {
140 if ( input_it->encode().size() == 0 )
continue;
144 if ( userData->contains( recoObject.
id() ) ) {
145 loader_.addData( patObject, input_it->encode(), (*userData)[recoObject]);
152 template<
class ObjectType,
typename Operation>
156 iDesc.
add<std::vector<edm::InputTag> >(
"src");
edm::ValueMap< value_type > product_type
Assimilates pat::UserData into pat objects.
reco::CandidatePtr value_type
void addData(ObjectType &obj, const std::string &key, const value_type &val)
edm::ValueMap< value_type > product_type
edm::ValueMap< value_type > product_type
void addData(ObjectType &obj, const std::string &key, const value_type &val)
edm::ValueMap< value_type > product_type
ProductID id() const
Accessor for product ID.
ParameterDescriptionBase * add(U const &iLabel, T const &value)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
void addData(ObjectType &obj, const std::string &key, const value_type &val)
std::vector< edm::InputTag > userDataSrc_
static void fillDescription(edm::ParameterSetDescription &iDesc)
void addData(ObjectType &obj, const std::string &key, const value_type &val)
void add(ObjectType &patObject, edm::Event const &iEvent, edm::EventSetup const &iSetup)
edm::Ptr< UserData > value_type