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

Constructor & Destructor Documentation

◆ EgDiPhoUserCut()

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

Definition at line 454 of file EgHLTDQMCut.h.

455  : cutCodeFunc_(cutCodeFunc), key_(key), cutsNotToMask_(cutsNotToMask) {}

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

◆ ~EgDiPhoUserCut()

template<class Key>
egHLT::EgDiPhoUserCut< Key >::~EgDiPhoUserCut ( )
overridedefault

Member Function Documentation

◆ clone()

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

Implements egHLT::EgHLTDQMCut< OffPho >.

Definition at line 459 of file EgHLTDQMCut.h.

459  {
460  return new EgDiPhoUserCut(*this);
461  } //default copy constructor is fine

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

◆ pass()

template<class Key >
bool egHLT::EgDiPhoUserCut< Key >::pass ( const OffPho obj,
const OffEvt evt 
) const
overridevirtual

Implements egHLT::EgHLTDQMCut< OffPho >.

Definition at line 465 of file EgHLTDQMCut.h.

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

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

Member Data Documentation

◆ cutCodeFunc_

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

Definition at line 449 of file EgHLTDQMCut.h.

◆ cutsNotToMask_

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

Definition at line 451 of file EgHLTDQMCut.h.

◆ key_

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

Definition at line 450 of file EgHLTDQMCut.h.

egHLT::EgDiPhoUserCut::key_
const Key & key_
Definition: EgHLTDQMCut.h:450
egHLT::EgDiPhoUserCut::cutCodeFunc_
int(OffPho::* cutCodeFunc_)(const Key &) const
Definition: EgHLTDQMCut.h:449
egHLT::EgDiPhoUserCut::EgDiPhoUserCut
EgDiPhoUserCut(int(OffPho::*cutCodeFunc)(const Key &) const, const Key &key, int cutsNotToMask=~0x0)
Definition: EgHLTDQMCut.h:454
getGTfromDQMFile.obj
obj
Definition: getGTfromDQMFile.py:32
egHLT::EgDiPhoUserCut::cutsNotToMask_
int cutsNotToMask_
Definition: EgHLTDQMCut.h:451
crabWrapper.key
key
Definition: crabWrapper.py:19