CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Attributes
egHLT::EgDiPhoUserCut< Key > Struct Template Reference

#include <EgHLTDQMCut.h>

Inheritance diagram for egHLT::EgDiPhoUserCut< Key >:
egHLT::EgHLTDQMCut< OffPho >

Public Member Functions

EgHLTDQMCut< OffPho > * clone () const override
 
 EgDiPhoUserCut (int(OffPho::*cutCodeFunc)(const Key &) const, const Key &key, int cutsNotToMask=~0x0)
 
bool pass (const OffPho &obj, const OffEvt &evt) const override
 
 ~EgDiPhoUserCut () override=default
 
- Public Member Functions inherited from egHLT::EgHLTDQMCut< OffPho >
 EgHLTDQMCut ()=default
 
virtual ~EgHLTDQMCut ()=default
 

Private Attributes

int(OffPho::* cutCodeFunc_ )(const Key &) const
 
int cutsNotToMask_
 
const Keykey_
 

Additional Inherited Members

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

Detailed Description

template<class Key>
struct egHLT::EgDiPhoUserCut< Key >

Definition at line 448 of file EgHLTDQMCut.h.

Constructor & Destructor Documentation

template<class Key>
egHLT::EgDiPhoUserCut< Key >::EgDiPhoUserCut ( int(OffPho::*)(const Key &) const  cutCodeFunc,
const Key key,
int  cutsNotToMask = ~0x0 
)
inline

Definition at line 455 of file EgHLTDQMCut.h.

Referenced by egHLT::EgDiPhoUserCut< Key >::clone().

456  : cutCodeFunc_(cutCodeFunc), key_(key), cutsNotToMask_(cutsNotToMask) {}
int(OffPho::* cutCodeFunc_)(const Key &) const
Definition: EgHLTDQMCut.h:450
template<class Key>
egHLT::EgDiPhoUserCut< Key >::~EgDiPhoUserCut ( )
overridedefault

Member Function Documentation

template<class Key>
EgHLTDQMCut<OffPho>* egHLT::EgDiPhoUserCut< Key >::clone ( void  ) const
inlineoverridevirtual

Implements egHLT::EgHLTDQMCut< OffPho >.

Definition at line 460 of file EgHLTDQMCut.h.

References egHLT::EgDiPhoUserCut< Key >::EgDiPhoUserCut().

460  {
461  return new EgDiPhoUserCut(*this);
462  } //default copy constructor is fine
EgDiPhoUserCut(int(OffPho::*cutCodeFunc)(const Key &) const, const Key &key, int cutsNotToMask=~0x0)
Definition: EgHLTDQMCut.h:455
template<class Key >
bool egHLT::EgDiPhoUserCut< Key >::pass ( const OffPho obj,
const OffEvt evt 
) const
overridevirtual

Implements egHLT::EgHLTDQMCut< OffPho >.

Definition at line 466 of file EgHLTDQMCut.h.

References egHLT::OffEvt::phos().

466  {
467  const std::vector<OffPho>& phos = evt.phos();
468  for (const auto& pho : phos) {
469  if (&pho != &obj) { //different phoctrons
470 
471  int diPhoCutCode = (obj.*cutCodeFunc_)(key_) | (pho.*cutCodeFunc_)(key_);
472  if ((diPhoCutCode & cutsNotToMask_) == 0x0)
473  return true;
474  }
475  }
476  return false;
477  }
int(OffPho::* cutCodeFunc_)(const Key &) const
Definition: EgHLTDQMCut.h:450

Member Data Documentation

template<class Key>
int(OffPho::* egHLT::EgDiPhoUserCut< Key >::cutCodeFunc_)(const Key &) const
private

Definition at line 450 of file EgHLTDQMCut.h.

template<class Key>
int egHLT::EgDiPhoUserCut< Key >::cutsNotToMask_
private

Definition at line 452 of file EgHLTDQMCut.h.

template<class Key>
const Key& egHLT::EgDiPhoUserCut< Key >::key_
private

Definition at line 451 of file EgHLTDQMCut.h.