CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
L1GtExternalCondition Class Reference

#include <L1GtExternalCondition.h>

Inheritance diagram for L1GtExternalCondition:
L1GtConditionEvaluation

Public Member Functions

const bool conditionResult () const
 get / set the result More...
 
const bool evaluateCondition () const override
 the core function to check if the condition matches More...
 
const L1GtExternalTemplategtExternalTemplate () const
 get / set the pointer to a L1GtCondition More...
 
 L1GtExternalCondition ()
 
 L1GtExternalCondition (const L1GtCondition *, const bool result)
 from base template condition (from event setup usually) More...
 
 L1GtExternalCondition (const L1GtExternalCondition &)
 
L1GtExternalConditionoperator= (const L1GtExternalCondition &)
 
void print (std::ostream &myCout) const override
 print condition More...
 
void setConditionResult (const bool result)
 
void setGtExternalTemplate (const L1GtExternalTemplate *)
 
 ~L1GtExternalCondition () override
 
- Public Member Functions inherited from L1GtConditionEvaluation
bool condLastResult () const
 get the latest result for the condition More...
 
int condMaxNumberObjects () const
 
void evaluateConditionStoreResult ()
 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...
 
 L1GtConditionEvaluation ()
 constructor More...
 
void setCondMaxNumberObjects (int condMaxNumberObjectsValue)
 
void setVerbosity (const int verbosity)
 
virtual ~L1GtConditionEvaluation ()
 destructor More...
 

Private Member Functions

void copy (const L1GtExternalCondition &cp)
 copy function for copy constructor and operator= More...
 

Private Attributes

bool m_conditionResult
 condition result More...
 
const L1GtExternalTemplatem_gtExternalTemplate
 pointer to a L1GtExternalTemplate More...
 

Additional Inherited Members

- Protected Member Functions inherited from L1GtConditionEvaluation
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 , class Type2 >
const bool checkThreshold (const Type1 &threshold, const Type2 &value, const bool condGEqValue) const
 
CombinationsInCondcombinationsInCond () const
 get all the object combinations (to fill it...) More...
 
- Protected Attributes inherited from L1GtConditionEvaluation
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

Description: evaluation of a CondExternal condition.

Implementation: Simply put the result read in the L1GtConditionEvaluation base class, to be similar with other conditions.

Author
: Vasile Mihai Ghete - HEPHY Vienna

Definition at line 32 of file L1GtExternalCondition.h.

Constructor & Destructor Documentation

L1GtExternalCondition::L1GtExternalCondition ( )

constructors default

Definition at line 29 of file L1GtExternalCondition.cc.

References m_conditionResult.

30 
31  m_conditionResult = false;
32 }
bool m_conditionResult
condition result
L1GtExternalCondition::L1GtExternalCondition ( const L1GtCondition externalTemplate,
const bool  result 
)

from base template condition (from event setup usually)

Definition at line 35 of file L1GtExternalCondition.cc.

References L1GtConditionEvaluation::m_condMaxNumberObjects.

39  static_cast<const L1GtExternalTemplate *>(externalTemplate)),
41 
42  // maximum number of objects received for the evaluation of the condition
43  // no object
45 }
const L1GtExternalTemplate * m_gtExternalTemplate
pointer to a L1GtExternalTemplate
bool m_conditionResult
condition result
L1GtExternalCondition::L1GtExternalCondition ( const L1GtExternalCondition cp)

Definition at line 60 of file L1GtExternalCondition.cc.

References copy().

62 
63  copy(cp);
64 }
void copy(const L1GtExternalCondition &cp)
copy function for copy constructor and operator=
L1GtExternalCondition::~L1GtExternalCondition ( )
override

Definition at line 67 of file L1GtExternalCondition.cc.

References operator=().

67  {
68 
69  // empty
70 }

Member Function Documentation

const bool L1GtExternalCondition::conditionResult ( ) const
inline

get / set the result

Definition at line 67 of file L1GtExternalCondition.h.

References m_conditionResult.

Referenced by copy().

67 { return m_conditionResult; }
bool m_conditionResult
condition result
void L1GtExternalCondition::copy ( const L1GtExternalCondition cp)
private

copy function for copy constructor and operator=

Definition at line 48 of file L1GtExternalCondition.cc.

References conditionResult(), L1GtConditionEvaluation::condLastResult(), L1GtConditionEvaluation::condMaxNumberObjects(), L1GtConditionEvaluation::getCombinationsInCond(), gtExternalTemplate(), L1GtConditionEvaluation::m_combinationsInCond, m_conditionResult, L1GtConditionEvaluation::m_condLastResult, L1GtConditionEvaluation::m_condMaxNumberObjects, m_gtExternalTemplate, and L1GtConditionEvaluation::m_verbosity.

Referenced by L1GtExternalCondition(), operator=(), and setConditionResult().

48  {
49 
52 
56 
58 }
const L1GtExternalTemplate * gtExternalTemplate() const
get / set the pointer to a L1GtCondition
bool m_condLastResult
the last result of evaluateCondition()
CombinationsInCond m_combinationsInCond
store all the object combinations evaluated to true in the condition
const L1GtExternalTemplate * m_gtExternalTemplate
pointer to a L1GtExternalTemplate
const bool conditionResult() const
get / set the result
CombinationsInCond const & getCombinationsInCond() const
get all the object combinations evaluated to true in the condition
bool m_conditionResult
condition result
bool condLastResult() const
get the latest result for the condition
const bool L1GtExternalCondition::evaluateCondition ( ) const
overridevirtual

the core function to check if the condition matches

Implements L1GtConditionEvaluation.

Definition at line 86 of file L1GtExternalCondition.cc.

References hitfit::clear(), L1GtConditionEvaluation::combinationsInCond(), and m_conditionResult.

86  {
87 
88  // clear the m_combinationsInCond vector
90 
91  //
92  return m_conditionResult;
93 }
CombinationsInCond & combinationsInCond() const
get all the object combinations (to fill it...)
void clear(CLHEP::HepGenMatrix &m)
Helper function: Reset all elements of a matrix to 0.
Definition: matutil.cc:167
bool m_conditionResult
condition result
const L1GtExternalTemplate* L1GtExternalCondition::gtExternalTemplate ( ) const
inline

get / set the pointer to a L1GtCondition

Definition at line 60 of file L1GtExternalCondition.h.

References m_gtExternalTemplate, and setGtExternalTemplate().

Referenced by copy().

60  {
61  return m_gtExternalTemplate;
62  }
const L1GtExternalTemplate * m_gtExternalTemplate
pointer to a L1GtExternalTemplate
L1GtExternalCondition & L1GtExternalCondition::operator= ( const L1GtExternalCondition cp)

Definition at line 74 of file L1GtExternalCondition.cc.

References copy().

Referenced by ~L1GtExternalCondition().

74  {
75  copy(cp);
76  return *this;
77 }
void copy(const L1GtExternalCondition &cp)
copy function for copy constructor and operator=
void L1GtExternalCondition::print ( std::ostream &  myCout) const
overridevirtual

print condition

Reimplemented from L1GtConditionEvaluation.

Definition at line 95 of file L1GtExternalCondition.cc.

References m_gtExternalTemplate, L1GtExternalTemplate::print(), and L1GtConditionEvaluation::print().

Referenced by L1GlobalTriggerGTL::run().

95  {
96 
97  m_gtExternalTemplate->print(myCout);
99 }
const L1GtExternalTemplate * m_gtExternalTemplate
pointer to a L1GtExternalTemplate
void print(std::ostream &myCout) const override
print the condition
virtual void print(std::ostream &myCout) const
print condition
void L1GtExternalCondition::setConditionResult ( const bool  result)
inline

Definition at line 69 of file L1GtExternalCondition.h.

References copy(), SimDataFormats::CaloAnalysis::cp, m_conditionResult, and mps_fire::result.

69  {
71  }
bool m_conditionResult
condition result
void L1GtExternalCondition::setGtExternalTemplate ( const L1GtExternalTemplate externalTemplate)

Definition at line 80 of file L1GtExternalCondition.cc.

References m_gtExternalTemplate.

Referenced by gtExternalTemplate().

81  {
82 
83  m_gtExternalTemplate = externalTemplate;
84 }
const L1GtExternalTemplate * m_gtExternalTemplate
pointer to a L1GtExternalTemplate

Member Data Documentation

bool L1GtExternalCondition::m_conditionResult
private

condition result

Definition at line 82 of file L1GtExternalCondition.h.

Referenced by conditionResult(), copy(), evaluateCondition(), L1GtExternalCondition(), and setConditionResult().

const L1GtExternalTemplate* L1GtExternalCondition::m_gtExternalTemplate
private

pointer to a L1GtExternalTemplate

Definition at line 79 of file L1GtExternalCondition.h.

Referenced by copy(), gtExternalTemplate(), print(), and setGtExternalTemplate().