CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
ZCountingTrigger::TTrigger Class Reference

#include <TTrigger.h>

Public Member Functions

int getTriggerBit (const std::string &iName) const
 
int getTriggerObjectBit (const std::string &iName, const std::string &iObjName) const
 
bool pass (const std::string &iName, const TriggerBits &iTrig) const
 
bool passObj (const std::string &iName, const std::string &iObjName, const TriggerObjects &iTrigObj) const
 
 TTrigger ()
 
 ~TTrigger ()
 

Public Attributes

std::vector< ZCountingTrigger::TriggerRecordfRecords
 

Detailed Description

Definition at line 9 of file TTrigger.h.

Constructor & Destructor Documentation

TTrigger::TTrigger ( )

Definition at line 25 of file TTrigger.cc.

References fRecords.

25  {
26 
27  fRecords.push_back(ZCountingTrigger::TriggerRecord("HLT_IsoMu27_v*",0));
28  fRecords.back().objectMap.push_back(std::pair<std::string, int>("hltL3crIsoL1sMu22Or25L1f0L2f10QL3f27QL3trkIsoFiltered0p07",0));
29  fRecords.push_back(ZCountingTrigger::TriggerRecord("HLT_Ele35_WPTight_Gsf_v*",1));
30  fRecords.back().objectMap.push_back(std::pair<std::string, int>("hltEle35noerWPTightGsfTrackIsoFilter",0));
31  fRecords.push_back(ZCountingTrigger::TriggerRecord("HLT_Ele27_WPTight_Gsf_v*",2));
32  fRecords.back().objectMap.push_back(std::pair<std::string, int>("hltEle27WPTightGsfTrackIsoFilter",0));
33 }
std::vector< ZCountingTrigger::TriggerRecord > fRecords
Definition: TTrigger.h:21
ZCountingTrigger::TTrigger::~TTrigger ( )
inline

Member Function Documentation

int TTrigger::getTriggerBit ( const std::string &  iName) const

Definition at line 36 of file TTrigger.cc.

References fRecords.

Referenced by getTriggerObjectBit(), pass(), and ~TTrigger().

36  {
37  int lId = -1;
38  for(unsigned int i0 = 0; i0 < fRecords.size(); i0++) {
39  if(iName == fRecords[i0].hltPattern) lId = i0;
40  }
41  if(lId == -1) edm::LogWarning("ZCounting") << "=== Missing Trigger ==" << iName << std::endl;
42  return lId;
43 }
std::vector< ZCountingTrigger::TriggerRecord > fRecords
Definition: TTrigger.h:21
int TTrigger::getTriggerObjectBit ( const std::string &  iName,
const std::string &  iObjName 
) const

Definition at line 46 of file TTrigger.cc.

References plotBeamSpotDB::first, fRecords, and getTriggerBit().

Referenced by passObj(), and ~TTrigger().

46  {
47  int lId = getTriggerBit(iName);
48  if(lId == -1) return -1;
49 
50  for(unsigned int i0 = 0; i0 < fRecords[lId].objectMap.size(); i0++) {
51  if(iObjName != fRecords[lId].objectMap[i0].first) continue;
52  return fRecords[lId].objectMap[i0].second;
53  }
54 
55  return -1;
56 }
int getTriggerBit(const std::string &iName) const
Definition: TTrigger.cc:36
std::vector< ZCountingTrigger::TriggerRecord > fRecords
Definition: TTrigger.h:21
bool TTrigger::pass ( const std::string &  iName,
const TriggerBits iTrig 
) const

Definition at line 59 of file TTrigger.cc.

References getTriggerBit().

Referenced by ZCounting::isElectronTrigger(), ZCounting::isMuonTrigger(), and ~TTrigger().

59  {
60  int lId = getTriggerBit(iName);
61  if(lId == -1) return false;
62 
63  return iTrig[lId];
64 }
int getTriggerBit(const std::string &iName) const
Definition: TTrigger.cc:36
bool TTrigger::passObj ( const std::string &  iName,
const std::string &  iObjName,
const TriggerObjects iTrigObj 
) const

Definition at line 67 of file TTrigger.cc.

References getTriggerObjectBit().

Referenced by ZCounting::isElectronTriggerObj(), ZCounting::isMuonTriggerObj(), and ~TTrigger().

67  {
68  int lId = getTriggerObjectBit(iName,iObjName);
69  if(lId == -1) return false;
70 
71  return iTrigObj[lId];
72 }
int getTriggerObjectBit(const std::string &iName, const std::string &iObjName) const
Definition: TTrigger.cc:46

Member Data Documentation

std::vector<ZCountingTrigger::TriggerRecord> ZCountingTrigger::TTrigger::fRecords

Definition at line 21 of file TTrigger.h.

Referenced by getTriggerBit(), getTriggerObjectBit(), and TTrigger().