CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
egHLT::EgObjTrigCut< T > Struct Template Reference

#include <EgHLTDQMCut.h>

Inheritance diagram for egHLT::EgObjTrigCut< T >:
egHLT::EgHLTDQMCut< T >

Public Types

enum  CutLogic { AND, OR }
 

Public Member Functions

EgHLTDQMCut< T > * clone () const override
 
 EgObjTrigCut (TrigCodes::TrigBitSet bitsToPass, CutLogic passLogic=OR, TrigCodes::TrigBitSet bitsToFail=TrigCodes::TrigBitSet(), CutLogic failLogic=AND)
 
bool pass (const T &obj, const OffEvt &evt) const override
 
 ~EgObjTrigCut () override=default
 
- Public Member Functions inherited from egHLT::EgHLTDQMCut< T >
 EgHLTDQMCut ()=default
 
virtual ~EgHLTDQMCut ()=default
 

Private Attributes

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

Additional Inherited Members

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

Detailed Description

template<class T>
struct egHLT::EgObjTrigCut< T >

Definition at line 172 of file EgHLTDQMCut.h.

Member Enumeration Documentation

◆ CutLogic

template<class T >
enum egHLT::EgObjTrigCut::CutLogic
Enumerator
AND 
OR 

Definition at line 174 of file EgHLTDQMCut.h.

174 { AND, OR };

Constructor & Destructor Documentation

◆ EgObjTrigCut()

template<class T >
egHLT::EgObjTrigCut< T >::EgObjTrigCut ( TrigCodes::TrigBitSet  bitsToPass,
CutLogic  passLogic = OR,
TrigCodes::TrigBitSet  bitsToFail = TrigCodes::TrigBitSet(),
CutLogic  failLogic = AND 
)
inline

Definition at line 184 of file EgHLTDQMCut.h.

188  : bitsToPass_(bitsToPass), passLogic_(passLogic), bitsToFail_(bitsToFail), failLogic_(failLogic) {}

Referenced by egHLT::EgObjTrigCut< T >::clone().

◆ ~EgObjTrigCut()

template<class T >
egHLT::EgObjTrigCut< T >::~EgObjTrigCut ( )
overridedefault

Member Function Documentation

◆ clone()

template<class T >
EgHLTDQMCut<T>* egHLT::EgObjTrigCut< T >::clone ( void  ) const
inlineoverridevirtual

Implements egHLT::EgHLTDQMCut< T >.

Definition at line 192 of file EgHLTDQMCut.h.

192 { return new EgObjTrigCut(*this); }

References egHLT::EgObjTrigCut< T >::EgObjTrigCut().

◆ pass()

template<class T >
bool egHLT::EgObjTrigCut< T >::pass ( const T obj,
const OffEvt evt 
) const
overridevirtual

Implements egHLT::EgHLTDQMCut< T >.

Definition at line 196 of file EgHLTDQMCut.h.

196  {
197  TrigCodes::TrigBitSet passMasked = bitsToPass_ & obj.trigBits();
198  TrigCodes::TrigBitSet failMasked = bitsToFail_ & obj.trigBits();
199 
200  bool passResult = passLogic_ == AND ? passMasked == bitsToPass_ : passMasked != 0x0;
201  bool failResult = failLogic_ == AND ? failMasked == bitsToFail_ : failMasked != 0x0;
202  if (bitsToFail_ == 0x0)
203  failResult = false; //ensuring it has no effect if bits not specified
204  return passResult && !failResult;
205  }

References reco::tau::qcuts::AND(), and getGTfromDQMFile::obj.

Member Data Documentation

◆ bitsToFail_

template<class T >
TrigCodes::TrigBitSet egHLT::EgObjTrigCut< T >::bitsToFail_
private

Definition at line 180 of file EgHLTDQMCut.h.

◆ bitsToPass_

template<class T >
TrigCodes::TrigBitSet egHLT::EgObjTrigCut< T >::bitsToPass_
private

Definition at line 178 of file EgHLTDQMCut.h.

◆ failLogic_

template<class T >
CutLogic egHLT::EgObjTrigCut< T >::failLogic_
private

Definition at line 181 of file EgHLTDQMCut.h.

◆ passLogic_

template<class T >
CutLogic egHLT::EgObjTrigCut< T >::passLogic_
private

Definition at line 179 of file EgHLTDQMCut.h.

egHLT::EgObjTrigCut::AND
Definition: EgHLTDQMCut.h:174
egHLT::EgObjTrigCut::OR
Definition: EgHLTDQMCut.h:174
egHLT::EgObjTrigCut::failLogic_
CutLogic failLogic_
Definition: EgHLTDQMCut.h:181
egHLT::TrigCodes::TrigBitSet
std::bitset< maxNrBits_ > TrigBitSet
Definition: EgHLTTrigCodes.h:23
getGTfromDQMFile.obj
obj
Definition: getGTfromDQMFile.py:32
egHLT::EgObjTrigCut::EgObjTrigCut
EgObjTrigCut(TrigCodes::TrigBitSet bitsToPass, CutLogic passLogic=OR, TrigCodes::TrigBitSet bitsToFail=TrigCodes::TrigBitSet(), CutLogic failLogic=AND)
Definition: EgHLTDQMCut.h:184
egHLT::EgObjTrigCut::passLogic_
CutLogic passLogic_
Definition: EgHLTDQMCut.h:179
egHLT::EgObjTrigCut::bitsToPass_
TrigCodes::TrigBitSet bitsToPass_
Definition: EgHLTDQMCut.h:178
egHLT::EgObjTrigCut::bitsToFail_
TrigCodes::TrigBitSet bitsToFail_
Definition: EgHLTDQMCut.h:180