CMS 3D CMS Logo

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
23  return *edm::getProduct<edm::TriggerResults>(triggerResults_);
24  }
25 
26  // use this method first if you want to be able to access the prescales by name
27  // you can get the TriggerNames from the TriggerResults and the Event (edm or fwlite)
29 
30  // set that the trigger of given index has a given prescale
31  void addPrescaledTrigger(int index, int prescale) ;
32 
33  protected:
34  std::vector<int> prescaleValues_;
37 };
38 
39 
40 }
41 
42 #endif
int getPrescaleForName(const std::string &name, bool prefixOnly=false) const
static const HistoName names[]
Definition: HeavyIon.h:7
void addPrescaledTrigger(int index, int prescale)
const edm::TriggerResults & triggerResults() const
const edm::TriggerNames * triggerNames_
void setTriggerNames(const edm::TriggerNames &names)
int getPrescaleForIndex(int index) const