CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
PackedTriggerPrescales.h
Go to the documentation of this file.
1 #ifndef _DataFormats_PatCandidates_PackedTriggerPrescales_H_
2 #define _DataFormats_PatCandidates_PackedTriggerPrescales_H_
3 
7 
8 namespace pat {
9 
11  public:
15 
16  // get prescale by index.
17  int getPrescaleForIndex(int index) const;
18  // get prescale by name or name prefix (if setTriggerNames was called)
19  int getPrescaleForName(const std::string &name, bool prefixOnly = false) const;
20 
21  // return the TriggerResults associated with this
22  const edm::TriggerResults &triggerResults() const { return *edm::getProduct<edm::TriggerResults>(triggerResults_); }
23 
24  // use this method first if you want to be able to access the prescales by name
25  // you can get the TriggerNames from the TriggerResults and the Event (edm or fwlite)
27 
28  // set that the trigger of given index has a given prescale
29  void addPrescaledTrigger(int index, int prescale);
30 
31  protected:
32  std::vector<int> prescaleValues_;
35  };
36 
37 } // namespace pat
38 
39 #endif
int getPrescaleForName(const std::string &name, bool prefixOnly=false) const
const std::string names[nVars_]
void addPrescaledTrigger(int index, int prescale)
const edm::TriggerResults & triggerResults() const
tuple handle
Definition: patZpeak.py:25
const edm::TriggerNames * triggerNames_
void setTriggerNames(const edm::TriggerNames &names)
int getPrescaleForIndex(int index) const