1 #ifndef PhysicsTools_PatUtils_interface_StringParserTools_h
2 #define PhysicsTools_PatUtils_interface_StringParserTools_h
4 #include <boost/shared_ptr.hpp>
27 boost::shared_ptr<StringObjectFunction<reco::Candidate> >
candFunc_;
29 boost::shared_ptr<StringObjectFunction<pat::Electron> >
eleFunc_;
30 boost::shared_ptr<StringObjectFunction<pat::Muon> >
muFunc_;
31 boost::shared_ptr<StringObjectFunction<pat::Tau> >
tauFunc_;
32 boost::shared_ptr<StringObjectFunction<pat::Photon> >
gamFunc_;
33 boost::shared_ptr<StringObjectFunction<pat::Jet> >
jetFunc_;
34 boost::shared_ptr<StringObjectFunction<pat::MET> >
metFunc_;
35 boost::shared_ptr<StringObjectFunction<pat::GenericParticle> >
gpFunc_;
36 boost::shared_ptr<StringObjectFunction<pat::PFParticle> >
pfFunc_;
38 template<
typename Obj>
43 return boost::shared_ptr<StringObjectFunction<Obj> >();
47 template<
typename Obj>
50 if (func.get())
return (*func)(
static_cast<const Obj &
>(
c));
71 boost::shared_ptr<StringCutObjectSelector<reco::Candidate> >
candFunc_;
73 boost::shared_ptr<StringCutObjectSelector<pat::Electron> >
eleFunc_;
74 boost::shared_ptr<StringCutObjectSelector<pat::Muon> >
muFunc_;
75 boost::shared_ptr<StringCutObjectSelector<pat::Tau> >
tauFunc_;
76 boost::shared_ptr<StringCutObjectSelector<pat::Photon> >
gamFunc_;
77 boost::shared_ptr<StringCutObjectSelector<pat::Jet> >
jetFunc_;
78 boost::shared_ptr<StringCutObjectSelector<pat::MET> >
metFunc_;
79 boost::shared_ptr<StringCutObjectSelector<pat::GenericParticle> >
gpFunc_;
80 boost::shared_ptr<StringCutObjectSelector<pat::PFParticle> >
pfFunc_;
82 template<
typename Obj>
87 return boost::shared_ptr<StringCutObjectSelector<Obj> >();
91 template<
typename Obj>
94 if (func.get())
return (*func)(
static_cast<const Obj &
>(
c));
void throwBadType(const std::type_info &ty1) const
bool tryEval(const reco::Candidate &c, const boost::shared_ptr< StringCutObjectSelector< Obj > > &func) const
boost::shared_ptr< StringObjectFunction< pat::Jet > > jetFunc_
void throwBadType(const std::type_info &ty1) const
PATStringObjectFunction()
boost::shared_ptr< StringCutObjectSelector< pat::PFParticle > > pfFunc_
boost::shared_ptr< StringObjectFunction< pat::Muon > > muFunc_
PATStringCutObjectSelector()
double tryEval(const reco::Candidate &c, const boost::shared_ptr< StringObjectFunction< Obj > > &func) const
boost::shared_ptr< StringCutObjectSelector< pat::Photon > > gamFunc_
bool operator()(const reco::Candidate &c) const
boost::shared_ptr< StringObjectFunction< Obj > > tryGet(const std::string &str)
boost::shared_ptr< StringCutObjectSelector< pat::Muon > > muFunc_
boost::shared_ptr< StringCutObjectSelector< reco::Candidate > > candFunc_
boost::shared_ptr< StringCutObjectSelector< pat::GenericParticle > > gpFunc_
boost::shared_ptr< StringCutObjectSelector< pat::Jet > > jetFunc_
boost::shared_ptr< StringObjectFunction< pat::Tau > > tauFunc_
boost::shared_ptr< StringObjectFunction< pat::MET > > metFunc_
boost::shared_ptr< StringCutObjectSelector< Obj > > tryGet(const std::string &str)
boost::shared_ptr< StringCutObjectSelector< pat::MET > > metFunc_
boost::shared_ptr< StringObjectFunction< reco::Candidate > > candFunc_
boost::shared_ptr< StringObjectFunction< pat::Electron > > eleFunc_
boost::shared_ptr< StringObjectFunction< pat::PFParticle > > pfFunc_
boost::shared_ptr< StringObjectFunction< pat::Photon > > gamFunc_
boost::shared_ptr< StringCutObjectSelector< pat::Electron > > eleFunc_
boost::shared_ptr< StringObjectFunction< pat::GenericParticle > > gpFunc_
double operator()(const reco::Candidate &c) const
boost::shared_ptr< StringCutObjectSelector< pat::Tau > > tauFunc_