CMS 3D CMS Logo

KinResolutionsLoader.h
Go to the documentation of this file.
1 #ifndef PhysicsTools_PatAlgos_KinResolutionsLoader_h
2 #define PhysicsTools_PatAlgos_KinResolutionsLoader_h
3 
5 
10 
13 
15 
18 
19 namespace pat {
20  namespace helper {
22  public:
25 
28 
30  bool enabled() const { return !patlabels_.empty(); }
31 
33  void newEvent(const edm::Event &event, const edm::EventSetup &setup);
34 
36  template <typename T>
38 
41 
42  private:
44  std::vector<std::string> patlabels_;
46  std::vector<edm::ESGetToken<KinematicResolutionProvider, KinematicResolutionRcd>> estokens_;
48  std::vector<KinematicResolutionProvider const *> resolutions_;
49  }; // class
50 
51  template <typename T>
53  for (size_t i = 0, n = patlabels_.size(); i < n; ++i) {
54  obj.setKinResolution(resolutions_[i]->getResolution(obj), patlabels_[i]);
55  }
56  }
57 
58  } // namespace helper
59 } // namespace pat
60 
61 #endif
std::vector< KinematicResolutionProvider const * > resolutions_
Handles to the EventSetup.
Definition: helper.py:1
void setResolutions(pat::PATObject< T > &obj) const
Sets the efficiencies for this object, using the reference to the original objects.
Definition: HeavyIon.h:7
void newEvent(const edm::Event &event, const edm::EventSetup &setup)
To be called for each new event, reads in the EventSetup object.
bool enabled() const
&#39;true&#39; if this there is at least one efficiency configured
static void fillDescription(edm::ParameterSetDescription &iDesc)
Method for documentation and validation of PSet.
std::vector< edm::ESGetToken< KinematicResolutionProvider, KinematicResolutionRcd > > estokens_
Labels of the KinematicResolutionProvider in the EventSetup.
std::vector< std::string > patlabels_
Labels of the resolutions in PAT.
Templated PAT object container.
Definition: PATObject.h:43
Definition: event.py:1