CMS 3D CMS Logo

EgEleTrigCut< T > Struct Template Reference

#include <DQMOffline/Trigger/interface/EgHLTDQMCut.h>

Inheritance diagram for EgEleTrigCut< T >:

EgHLTDQMCut< T >

List of all members.

Public Types

enum  CutLogic { AND, OR }

Public Member Functions

EgHLTDQMCut< T > * clone () const
 EgEleTrigCut (TrigCodes::TrigBitSet bitsToPass, CutLogic passLogic=OR, TrigCodes::TrigBitSet bitsToFail=0x0, CutLogic failLogic=AND)
bool pass (const T &obj, const EgHLTOffData &evtData) const
 ~EgEleTrigCut ()

Private Attributes

TrigCodes::TrigBitSet bitsToFail_
TrigCodes::TrigBitSet bitsToPass_
CutLogic failLogic_
CutLogic passLogic_


Detailed Description

template<class T>
struct EgEleTrigCut< T >

Definition at line 139 of file EgHLTDQMCut.h.


Member Enumeration Documentation

template<class T>
enum EgEleTrigCut::CutLogic

Enumerator:
AND 
OR 

Definition at line 141 of file EgHLTDQMCut.h.

00141 {AND,OR};


Constructor & Destructor Documentation

template<class T>
EgEleTrigCut< T >::EgEleTrigCut ( TrigCodes::TrigBitSet  bitsToPass,
CutLogic  passLogic = OR,
TrigCodes::TrigBitSet  bitsToFail = 0x0,
CutLogic  failLogic = AND 
) [inline]

Definition at line 151 of file EgHLTDQMCut.h.

00151                                                                                                                                :
00152     bitsToPass_(bitsToPass),passLogic_(passLogic),bitsToFail_(bitsToFail),failLogic_(failLogic){}
  ~EgEleTrigCut(){}

template<class T>
EgEleTrigCut< T >::~EgEleTrigCut (  )  [inline]

Definition at line 153 of file EgHLTDQMCut.h.

00153 {}


Member Function Documentation

template<class T>
EgHLTDQMCut<T>* EgEleTrigCut< T >::clone ( void   )  const [inline, virtual]

Implements EgHLTDQMCut< T >.

Definition at line 156 of file EgHLTDQMCut.h.

00156 {return new EgEleTrigCut(*this);}

template<class T>
bool EgEleTrigCut< T >::pass ( const T &  obj,
const EgHLTOffData evtData 
) const [inline, virtual]

Implements EgHLTDQMCut< T >.

Definition at line 159 of file EgHLTDQMCut.h.

References EgEleTrigCut< T >::AND, EgEleTrigCut< T >::bitsToFail_, EgEleTrigCut< T >::bitsToPass_, EgEleTrigCut< T >::failLogic_, and EgEleTrigCut< T >::passLogic_.

00160 {
00161   TrigCodes::TrigBitSet passMasked = bitsToPass_&obj.trigBits();
00162   TrigCodes::TrigBitSet failMasked = bitsToFail_&obj.trigBits();
00163   
00164   bool passResult = passLogic_==AND ? passMasked==bitsToPass_ : passMasked!=0x0;
00165   bool failResult = failLogic_==AND ? failMasked==bitsToFail_ : failMasked!=0x0;
00166   if(bitsToFail_==0x0) failResult=false; //ensuring it has no effect if bits not specified
00167   return passResult && !failResult;
00168  
00169 }


Member Data Documentation

template<class T>
TrigCodes::TrigBitSet EgEleTrigCut< T >::bitsToFail_ [private]

Definition at line 147 of file EgHLTDQMCut.h.

Referenced by EgEleTrigCut< T >::pass().

template<class T>
TrigCodes::TrigBitSet EgEleTrigCut< T >::bitsToPass_ [private]

Definition at line 145 of file EgHLTDQMCut.h.

Referenced by EgEleTrigCut< T >::pass().

template<class T>
CutLogic EgEleTrigCut< T >::failLogic_ [private]

Definition at line 148 of file EgHLTDQMCut.h.

Referenced by EgEleTrigCut< T >::pass().

template<class T>
CutLogic EgEleTrigCut< T >::passLogic_ [private]

Definition at line 146 of file EgHLTDQMCut.h.

Referenced by EgEleTrigCut< T >::pass().


The documentation for this struct was generated from the following file:
Generated on Tue Jun 9 18:20:11 2009 for CMSSW by  doxygen 1.5.4