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 }
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 32 of file TTrigger.cc.

References fRecords.

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

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

Definition at line 42 of file TTrigger.cc.

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

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

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

Definition at line 55 of file TTrigger.cc.

References getTriggerBit().

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

55  {
56  int lId = getTriggerBit(iName);
57  if(lId == -1) return false;
58 
59  return iTrig[lId];
60 }
int getTriggerBit(const std::string &iName) const
Definition: TTrigger.cc:32
bool TTrigger::passObj ( const std::string &  iName,
const std::string &  iObjName,
const TriggerObjects iTrigObj 
) const

Definition at line 63 of file TTrigger.cc.

References getTriggerObjectBit().

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

63  {
64  int lId = getTriggerObjectBit(iName,iObjName);
65  if(lId == -1) return false;
66 
67  return iTrigObj[lId];
68 }
int getTriggerObjectBit(const std::string &iName, const std::string &iObjName) const
Definition: TTrigger.cc:42

Member Data Documentation

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

Definition at line 21 of file TTrigger.h.

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