CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes
l1t::ConditionEvaluation Class Referenceabstract

#include <ConditionEvaluation.h>

Inheritance diagram for l1t::ConditionEvaluation:
l1t::CaloCondition l1t::CorrCondition l1t::EnergySumCondition l1t::ExternalCondition l1t::MuCondition

Public Member Functions

 ConditionEvaluation ()
 constructor More...
 
bool condLastResult () const
 get the latest result for the condition More...
 
int condMaxNumberObjects () const
 
virtual const bool evaluateCondition (const int bxEval) const =0
 the core function to check if the condition matches More...
 
void evaluateConditionStoreResult (const int bxEval)
 call evaluateCondition and save last result More...
 
CombinationsInCond const & getCombinationsInCond () const
 get all the object combinations evaluated to true in the condition More...
 
virtual std::string getNumericExpression () const
 get numeric expression More...
 
virtual void print (std::ostream &myCout) const
 print condition More...
 
void setCondMaxNumberObjects (int condMaxNumberObjectsValue)
 
void setVerbosity (const int verbosity)
 
virtual ~ConditionEvaluation ()
 destructor More...
 

Protected Member Functions

template<class Type1 >
const bool checkBit (const Type1 &mask, const unsigned int bitNumber) const
 check if a bit with a given number is set in a mask More...
 
template<class Type1 >
const bool checkRangeDeltaEta (const unsigned int obj1Eta, const unsigned int obj2Eta, const Type1 &lowerR, const Type1 &upperR, const unsigned int nEtaBits) const
 check if a value is in a given range More...
 
template<class Type1 >
const bool checkRangeDeltaPhi (const unsigned int obj1Phi, const unsigned int obj2Phi, const Type1 &lowerR, const Type1 &upperR) const
 check if a value is in a given range More...
 
template<class Type1 >
const bool checkRangeEta (const unsigned int bitNumber, const Type1 &W1beginR, const Type1 &W1endR, const Type1 &W2beginR, const Type1 &W2endR, const unsigned int nEtaBits) const
 check if a value is in a given range and outside of a veto range More...
 
template<class Type1 >
const bool checkRangePhi (const unsigned int bitNumber, const Type1 &W1beginR, const Type1 &W1endR, const Type1 &W2beginR, const Type1 &W2endR) const
 check if a value is in a given range and outside of a veto range More...
 
template<class Type1 , class Type2 >
const bool checkThreshold (const Type1 &thresholdL, const Type1 &thresholdH, const Type2 &value, bool condGEqValue) const
 
CombinationsInCondcombinationsInCond () const
 get all the object combinations (to fill it...) More...
 

Protected Attributes

CombinationsInCond m_combinationsInCond
 store all the object combinations evaluated to true in the condition More...
 
bool m_condLastResult
 the last result of evaluateCondition() More...
 
int m_condMaxNumberObjects
 
int m_verbosity
 verbosity level More...
 

Detailed Description

Definition at line 39 of file ConditionEvaluation.h.

Constructor & Destructor Documentation

l1t::ConditionEvaluation::ConditionEvaluation ( )
inline

constructor

Definition at line 45 of file ConditionEvaluation.h.

virtual l1t::ConditionEvaluation::~ConditionEvaluation ( )
inlinevirtual

destructor

Definition at line 52 of file ConditionEvaluation.h.

Member Function Documentation

template<class Type1 >
const bool ConditionEvaluation::checkBit ( const Type1 &  mask,
const unsigned int  bitNumber 
) const
protected

check if a bit with a given number is set in a mask

Definition at line 198 of file ConditionEvaluation.h.

template<class Type1 >
const bool ConditionEvaluation::checkRangeDeltaEta ( const unsigned int  obj1Eta,
const unsigned int  obj2Eta,
const Type1 &  lowerR,
const Type1 &  upperR,
const unsigned int  nEtaBits 
) const
protected

check if a value is in a given range

Definition at line 396 of file ConditionEvaluation.h.

template<class Type1 >
const bool ConditionEvaluation::checkRangeDeltaPhi ( const unsigned int  obj1Phi,
const unsigned int  obj2Phi,
const Type1 &  lowerR,
const Type1 &  upperR 
) const
protected

check if a value is in a given range

Definition at line 455 of file ConditionEvaluation.h.

template<class Type1 >
const bool ConditionEvaluation::checkRangeEta ( const unsigned int  bitNumber,
const Type1 &  W1beginR,
const Type1 &  W1endR,
const Type1 &  W2beginR,
const Type1 &  W2endR,
const unsigned int  nEtaBits 
) const
protected

check if a value is in a given range and outside of a veto range

Definition at line 229 of file ConditionEvaluation.h.

template<class Type1 >
const bool ConditionEvaluation::checkRangePhi ( const unsigned int  bitNumber,
const Type1 &  W1beginR,
const Type1 &  W1endR,
const Type1 &  W2beginR,
const Type1 &  W2endR 
) const
protected

check if a value is in a given range and outside of a veto range

Definition at line 320 of file ConditionEvaluation.h.

template<class Type1 , class Type2 >
const bool ConditionEvaluation::checkThreshold ( const Type1 &  thresholdL,
const Type1 &  thresholdH,
const Type2 &  value,
bool  condGEqValue 
) const
protected

check if a value is greater than a threshold or greater-or-equal depending on the value of the condGEqValue flag

Definition at line 160 of file ConditionEvaluation.h.

CombinationsInCond& l1t::ConditionEvaluation::combinationsInCond ( ) const
inlineprotected

get all the object combinations (to fill it...)

Definition at line 105 of file ConditionEvaluation.h.

bool l1t::ConditionEvaluation::condLastResult ( ) const
inline

get the latest result for the condition

Definition at line 67 of file ConditionEvaluation.h.

Referenced by l1t::ExternalCondition::copy().

int l1t::ConditionEvaluation::condMaxNumberObjects ( ) const
inline

get / set the maximum number of objects received for the evaluation of the condition

Definition at line 58 of file ConditionEvaluation.h.

Referenced by l1t::ExternalCondition::copy().

virtual const bool l1t::ConditionEvaluation::evaluateCondition ( const int  bxEval) const
pure virtual

the core function to check if the condition matches

Implemented in l1t::CorrCondition, l1t::CaloCondition, l1t::MuCondition, l1t::EnergySumCondition, and l1t::ExternalCondition.

void l1t::ConditionEvaluation::evaluateConditionStoreResult ( const int  bxEval)
inline

call evaluateCondition and save last result

Definition at line 72 of file ConditionEvaluation.h.

CombinationsInCond const& l1t::ConditionEvaluation::getCombinationsInCond ( ) const
inline

get all the object combinations evaluated to true in the condition

Definition at line 90 of file ConditionEvaluation.h.

Referenced by l1t::ExternalCondition::copy().

virtual std::string l1t::ConditionEvaluation::getNumericExpression ( ) const
inlinevirtual

get numeric expression

Definition at line 80 of file ConditionEvaluation.h.

void ConditionEvaluation::print ( std::ostream &  myCout) const
virtual

print condition

Reimplemented in l1t::CorrCondition, l1t::CaloCondition, l1t::MuCondition, l1t::EnergySumCondition, and l1t::ExternalCondition.

Definition at line 32 of file ConditionEvaluation.cc.

References begin, filterCSVwithJSON::copy, end, m_combinationsInCond, m_condLastResult, and m_condMaxNumberObjects.

Referenced by l1t::ExternalCondition::print().

32  {
33 
34  myCout << "\n ConditionEvaluation print...\n" << std::endl;
35  myCout << " Maximum number of objects in condition: " << m_condMaxNumberObjects << std::endl;
36  myCout << " Condition result: " << m_condLastResult << std::endl;
37 
38  CombinationsInCond::const_iterator itVV;
39  std::ostringstream myCout1;
40 
41  for (itVV = (m_combinationsInCond).begin(); itVV != (m_combinationsInCond).end(); itVV++) {
42 
43  myCout1 << "( ";
44 
45  std::copy((*itVV).begin(), (*itVV).end(), std::ostream_iterator<int> (myCout1, " "));
46 
47  myCout1 << "); ";
48 
49  }
50 
51  myCout
52  << "\n List of combinations passing all requirements for this condition: \n "
53  << myCout1.str()
54  << " \n"
55  << std::endl;
56 
57 }
#define end
Definition: vmac.h:37
CombinationsInCond m_combinationsInCond
store all the object combinations evaluated to true in the condition
bool m_condLastResult
the last result of evaluateCondition()
#define begin
Definition: vmac.h:30
void l1t::ConditionEvaluation::setCondMaxNumberObjects ( int  condMaxNumberObjectsValue)
inline

Definition at line 62 of file ConditionEvaluation.h.

void l1t::ConditionEvaluation::setVerbosity ( const int  verbosity)
inline

Definition at line 98 of file ConditionEvaluation.h.

Member Data Documentation

CombinationsInCond l1t::ConditionEvaluation::m_combinationsInCond
mutableprotected

store all the object combinations evaluated to true in the condition

Definition at line 149 of file ConditionEvaluation.h.

Referenced by print().

bool l1t::ConditionEvaluation::m_condLastResult
protected

the last result of evaluateCondition()

Definition at line 146 of file ConditionEvaluation.h.

Referenced by print().

int l1t::ConditionEvaluation::m_condMaxNumberObjects
protected

maximum number of objects received for the evaluation of the condition usually retrieved from event setup

Definition at line 143 of file ConditionEvaluation.h.

Referenced by l1t::ExternalCondition::ExternalCondition(), and print().

int l1t::ConditionEvaluation::m_verbosity
protected

verbosity level

Definition at line 152 of file ConditionEvaluation.h.

Referenced by l1t::ExternalCondition::copy().