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
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
edm::RefCore
Definition: RefCore.h:21
TriggerResults.h
patZpeak.handle
handle
Definition: patZpeak.py:23
pat::PackedTriggerPrescales::PackedTriggerPrescales
PackedTriggerPrescales()
Definition: PackedTriggerPrescales.h:12
pat::PackedTriggerPrescales::~PackedTriggerPrescales
~PackedTriggerPrescales()
Definition: PackedTriggerPrescales.h:14
pat::PackedTriggerPrescales::getPrescaleForName
int getPrescaleForName(const std::string &name, bool prefixOnly=false) const
Definition: PackedTriggerPrescales.cc:16
edm::Handle< edm::TriggerResults >
pat::PackedTriggerPrescales::addPrescaledTrigger
void addPrescaledTrigger(int index, int prescale)
Definition: PackedTriggerPrescales.cc:36
pat::PackedTriggerPrescales::getPrescaleForIndex
int getPrescaleForIndex(int index) const
Definition: PackedTriggerPrescales.cc:10
names
const std::string names[nVars_]
Definition: PhotonIDValueMapProducer.cc:122
pat::PackedTriggerPrescales::prescaleValues_
std::vector< int > prescaleValues_
Definition: PackedTriggerPrescales.h:32
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
pat::PackedTriggerPrescales::triggerResults
const edm::TriggerResults & triggerResults() const
Definition: PackedTriggerPrescales.h:22
pat::PackedTriggerPrescales::triggerResults_
edm::RefCore triggerResults_
Definition: PackedTriggerPrescales.h:33
pat::PackedTriggerPrescales::triggerNames_
const edm::TriggerNames * triggerNames_
Definition: PackedTriggerPrescales.h:34
TriggerNames.h
pat::PackedTriggerPrescales
Definition: PackedTriggerPrescales.h:10
pat
Definition: HeavyIon.h:7
prescale
Definition: PrescaleEventFilter.cc:32
Ref.h
edm::TriggerNames
Definition: TriggerNames.h:55
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
pat::PackedTriggerPrescales::setTriggerNames
void setTriggerNames(const edm::TriggerNames &names)
Definition: PackedTriggerPrescales.h:26
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
edm::TriggerResults
Definition: TriggerResults.h:35