CMS 3D CMS Logo

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 418 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 424 of file EgHLTDQMCut.h.

References MuonAssociatorByHits_cfi::obj, and egHLT::EgHLTDQMCut< T >::pass().

424 :cutCodeFunc_(cutCodeFunc),key_(key),cutsNotToMask_(cutsNotToMask){}
int(OffPho::* cutCodeFunc_)(const Key &) const
Definition: EgHLTDQMCut.h:420
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 428 of file EgHLTDQMCut.h.

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

Implements egHLT::EgHLTDQMCut< OffPho >.

Definition at line 432 of file EgHLTDQMCut.h.

References egHLT::OffEvt::phos().

433  {
434  const std::vector<OffPho>& phos = evt.phos();
435  for(const auto & pho : phos){
436  if(&pho!=&obj){ //different phoctrons
437 
438  int diPhoCutCode = (obj.*cutCodeFunc_)(key_) | (pho.*cutCodeFunc_)(key_);
439  if( (diPhoCutCode & cutsNotToMask_)==0x0) return true;
440  }
441  }
442  return false;
443  }
int(OffPho::* cutCodeFunc_)(const Key &) const
Definition: EgHLTDQMCut.h:420

Member Data Documentation

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

Definition at line 420 of file EgHLTDQMCut.h.

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

Definition at line 422 of file EgHLTDQMCut.h.

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

Definition at line 421 of file EgHLTDQMCut.h.