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 (const std::vector< std::string > &muonTriggerNames, const std::vector< std::string > &muonTriggerObjectNames)
 
 ~TTrigger ()
 

Public Attributes

std::vector< ZCountingTrigger::TriggerRecordfRecords
 

Detailed Description

Definition at line 9 of file TTrigger.h.

Constructor & Destructor Documentation

TTrigger::TTrigger ( const std::vector< std::string > &  muonTriggerNames,
const std::vector< std::string > &  muonTriggerObjectNames 
)

Definition at line 25 of file TTrigger.cc.

References fRecords, and mps_fire::i.

25  {
26 
27  for(unsigned int i = 0; i < muonTriggerNames.size(); ++i){
28  fRecords.push_back(ZCountingTrigger::TriggerRecord(muonTriggerNames.at(i),0));
29  fRecords.back().objectMap.push_back(std::pair<std::string, int>(muonTriggerObjectNames.at(i),0));
30  }
31  fRecords.push_back(ZCountingTrigger::TriggerRecord("HLT_Ele35_WPTight_Gsf_v*",1));
32  fRecords.back().objectMap.push_back(std::pair<std::string, int>("hltEle35noerWPTightGsfTrackIsoFilter",0));
33  fRecords.push_back(ZCountingTrigger::TriggerRecord("HLT_Ele27_WPTight_Gsf_v*",2));
34  fRecords.back().objectMap.push_back(std::pair<std::string, int>("hltEle27WPTightGsfTrackIsoFilter",0));
35 }
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 38 of file TTrigger.cc.

References fRecords.

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

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

Definition at line 48 of file TTrigger.cc.

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

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

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

Definition at line 61 of file TTrigger.cc.

References getTriggerBit().

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

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

Definition at line 69 of file TTrigger.cc.

References getTriggerObjectBit().

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

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

Member Data Documentation

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

Definition at line 21 of file TTrigger.h.

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