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.

Referenced by clone().

441 : cutCode_(cutCode), cutCodeFunc_(cutCodeFunc) {}
int(OffPho::* cutCodeFunc_)() const
Definition: EgHLTDQMCut.h:438

Member Function Documentation

◆ clone()

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

Implements egHLT::EgHLTDQMCut< OffPho >.

Definition at line 443 of file EgHLTDQMCut.h.

References EgDiPhoCut().

443 { return new EgDiPhoCut(*this); }
EgDiPhoCut(int cutCode, int(OffPho::*cutCodeFunc)() const)
Definition: EgHLTDQMCut.h:441

◆ pass()

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

Implements egHLT::EgHLTDQMCut< OffPho >.

Definition at line 111 of file EgHLTDQMCut.cc.

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

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 }
const std::vector< OffPho > & phos() const
Definition: EgHLTOffEvt.h:50
int(OffPho::* cutCodeFunc_)() const
Definition: EgHLTDQMCut.h:438

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().