CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
egHLT::EgDiPhoCut Struct Reference

#include <EgHLTDQMCut.h>

Inheritance diagram for egHLT::EgDiPhoCut:
egHLT::EgHLTDQMCut< OffPho >

Public Member Functions

EgHLTDQMCut< OffPho > * clone () const override
 
 EgDiPhoCut (int cutCode, int(OffPho::*cutCodeFunc)() const)
 
bool pass (const OffPho &obj, const OffEvt &evt) const override
 
- Public Member Functions inherited from egHLT::EgHLTDQMCut< OffPho >
 EgHLTDQMCut ()=default
 
virtual ~EgHLTDQMCut ()=default
 

Private Attributes

int cutCode_
 
int(OffPho::* cutCodeFunc_ )() const
 

Additional Inherited Members

- Protected Member Functions inherited from egHLT::EgHLTDQMCut< OffPho >
 EgHLTDQMCut (const EgHLTDQMCut &rhs)=default
 

Detailed Description

Definition at line 435 of file EgHLTDQMCut.h.

Constructor & Destructor Documentation

◆ EgDiPhoCut()

egHLT::EgDiPhoCut::EgDiPhoCut ( int  cutCode,
int(OffPho::*)() const  cutCodeFunc 
)
inline

Definition at line 441 of file EgHLTDQMCut.h.

441 : cutCode_(cutCode), cutCodeFunc_(cutCodeFunc) {}

Referenced by clone().

Member Function Documentation

◆ clone()

EgHLTDQMCut<OffPho>* egHLT::EgDiPhoCut::clone ( void  ) const
inlineoverridevirtual

Implements egHLT::EgHLTDQMCut< OffPho >.

Definition at line 443 of file EgHLTDQMCut.h.

443 { return new EgDiPhoCut(*this); }

References EgDiPhoCut().

◆ pass()

bool EgDiPhoCut::pass ( const OffPho obj,
const OffEvt evt 
) const
overridevirtual

Implements egHLT::EgHLTDQMCut< OffPho >.

Definition at line 111 of file EgHLTDQMCut.cc.

111  {
112  const std::vector<OffPho>& phos = evt.phos();
113  for (auto const& pho : phos) {
114  if (&pho != &obj) { //different phos
115 
116  int diPhoCutCode = (obj.*cutCodeFunc_)() | (pho.*cutCodeFunc_)();
117  if ((diPhoCutCode & cutCode_) == 0x0)
118  return true;
119  }
120  }
121  return false;
122 }

References cutCode_, cutCodeFunc_, getGTfromDQMFile::obj, and egHLT::OffEvt::phos().

Member Data Documentation

◆ cutCode_

int egHLT::EgDiPhoCut::cutCode_
private

Definition at line 437 of file EgHLTDQMCut.h.

Referenced by pass().

◆ cutCodeFunc_

int(OffPho::* egHLT::EgDiPhoCut::cutCodeFunc_) () const
private

Definition at line 438 of file EgHLTDQMCut.h.

Referenced by pass().

egHLT::OffEvt::phos
const std::vector< OffPho > & phos() const
Definition: EgHLTOffEvt.h:50
egHLT::EgDiPhoCut::EgDiPhoCut
EgDiPhoCut(int cutCode, int(OffPho::*cutCodeFunc)() const)
Definition: EgHLTDQMCut.h:441
egHLT::EgDiPhoCut::cutCodeFunc_
int(OffPho::* cutCodeFunc_)() const
Definition: EgHLTDQMCut.h:438
getGTfromDQMFile.obj
obj
Definition: getGTfromDQMFile.py:32
egHLT::EgDiPhoCut::cutCode_
int cutCode_
Definition: EgHLTDQMCut.h:437