4 #ifndef PhysicsTools_PatAlgos_PATUserDataHelper_h 5 #define PhysicsTools_PatAlgos_PATUserDataHelper_h 52 template<
class ObjectType>
89 template<
class ObjectType>
101 throw cms::Exception(
"Size mismatch") <<
"userFunctions and userFunctionLabels do not have the same size, they must be the same\n";
105 std::vector<std::string>::const_iterator funcBegin =
functionNames_.begin(),
108 for ( ; funcIt != funcEnd; ++funcIt) {
125 template<
class ObjectType>
138 typename std::vector<function_type>::const_iterator funcBegin =
functions_.begin(),
142 for ( ; funcIt != funcEnd; ++funcIt) {
143 double d = (*funcIt)( patObject );
152 template<
class ObjectType>
157 iDesc.
add(
"userClasses", dataMergerPSet);
158 iDesc.
add(
"userFloats", dataMergerPSet);
159 iDesc.
add(
"userInts", dataMergerPSet);
160 iDesc.
add(
"userCands", dataMergerPSet);
161 std::vector<std::string> emptyVectorOfStrings;
162 iDesc.
add<std::vector<std::string> >(
"userFunctions",emptyVectorOfStrings);
163 iDesc.
add<std::vector<std::string> >(
"userFunctionLabels",emptyVectorOfStrings);
Assists in assimilating all pat::UserData into pat objects.
pat::PATUserDataMerger< ObjectType, pat::helper::AddUserFloat > userFloatMerger_
pat::PATUserDataMerger< ObjectType, pat::helper::AddUserPtr > userDataMerger_
pat::PATUserDataMerger< ObjectType, pat::helper::AddUserCand > userCandMerger_
StringObjectFunction< ObjectType > function_type
static void fillDescription(edm::ParameterSetDescription &iDesc)
std::vector< std::string > functionLabels_
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(ObjectType &patObject, edm::Event const &iEvent, edm::EventSetup const &iSetup)
std::vector< std::string > functionNames_
std::vector< function_type > functions_
static void fillDescription(edm::ParameterSetDescription &iDesc)
void add(ObjectType &patObject, edm::Event const &iEvent, edm::EventSetup const &iSetup)
pat::PATUserDataMerger< ObjectType, pat::helper::AddUserInt > userIntMerger_