CMS 3D CMS Logo

Public Member Functions | Private Attributes

egHLT::EgDiPhoUserCut< Key > Struct Template Reference

#include <EgHLTDQMCut.h>

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

List of all members.

Public Member Functions

EgHLTDQMCut< OffPho > * clone () const
 EgDiPhoUserCut (int(OffPho::*cutCodeFunc)(const Key &) const, const Key &key, int cutsNotToMask=~0x0)
bool pass (const OffPho &obj, const OffEvt &evt) const
 ~EgDiPhoUserCut ()

Private Attributes

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

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.

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

:cutCodeFunc_(cutCodeFunc),key_(key),cutsNotToMask_(cutsNotToMask){}
template<class Key>
egHLT::EgDiPhoUserCut< Key >::~EgDiPhoUserCut ( ) [inline]

Definition at line 425 of file EgHLTDQMCut.h.

{}

Member Function Documentation

template<class Key>
EgHLTDQMCut<OffPho>* egHLT::EgDiPhoUserCut< Key >::clone ( void  ) const [inline, virtual]

Implements egHLT::EgHLTDQMCut< OffPho >.

Definition at line 428 of file EgHLTDQMCut.h.

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

{return new EgDiPhoUserCut(*this);} //default copy constructor is fine
template<class Key >
bool egHLT::EgDiPhoUserCut< Key >::pass ( const OffPho obj,
const OffEvt evt 
) const [virtual]

Implements egHLT::EgHLTDQMCut< OffPho >.

Definition at line 432 of file EgHLTDQMCut.h.

References egHLT::OffEvt::phos().

    { 
      const std::vector<OffPho>& phos = evt.phos();
      for(size_t phoNr=0;phoNr<phos.size();phoNr++){
        if(&phos[phoNr]!=&obj){ //different phoctrons
        
          int diPhoCutCode = (obj.*cutCodeFunc_)(key_) | (phos[phoNr].*cutCodeFunc_)(key_);
          if( (diPhoCutCode & cutsNotToMask_)==0x0) return true;
        }
      }
      return false;
    }

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.