#include <L1GtHfBitCountsCondition.h>
Public Member Functions | |
const bool | evaluateCondition () const |
the core function to check if the condition matches | |
const L1GtHfBitCountsTemplate * | gtHfBitCountsTemplate () const |
get / set the pointer to a L1GtCondition | |
const L1GlobalTriggerPSB * | gtPSB () const |
get / set the pointer to PSB | |
L1GtHfBitCountsCondition (const L1GtCondition *, const L1GlobalTriggerPSB *) | |
from base template condition (from event setup usually) | |
L1GtHfBitCountsCondition () | |
L1GtHfBitCountsCondition (const L1GtHfBitCountsCondition &) | |
L1GtHfBitCountsCondition & | operator= (const L1GtHfBitCountsCondition &) |
void | print (std::ostream &myCout) const |
print condition | |
void | setGtHfBitCountsTemplate (const L1GtHfBitCountsTemplate *) |
void | setGtPSB (const L1GlobalTriggerPSB *) |
set the pointer to PSB | |
virtual | ~L1GtHfBitCountsCondition () |
Private Member Functions | |
void | copy (const L1GtHfBitCountsCondition &cp) |
copy function for copy constructor and operator= | |
Private Attributes | |
const L1GtHfBitCountsTemplate * | m_gtHfBitCountsTemplate |
pointer to a L1GtHfBitCountsTemplate | |
const L1GlobalTriggerPSB * | m_gtPSB |
pointer to PSB, to be able to get the trigger objects |
Description: evaluation of a CondHfBitCounts condition.
Implementation: <TODO: enter implementation details>
$Date$ $Revision$
Definition at line 34 of file L1GtHfBitCountsCondition.h.
L1GtHfBitCountsCondition::L1GtHfBitCountsCondition | ( | ) |
constructors default
Definition at line 39 of file L1GtHfBitCountsCondition.cc.
: L1GtConditionEvaluation() { //empty }
L1GtHfBitCountsCondition::L1GtHfBitCountsCondition | ( | const L1GtCondition * | bcTemplate, |
const L1GlobalTriggerPSB * | ptrPSB | ||
) |
from base template condition (from event setup usually)
Definition at line 47 of file L1GtHfBitCountsCondition.cc.
References L1GtConditionEvaluation::m_condMaxNumberObjects.
: L1GtConditionEvaluation(), m_gtHfBitCountsTemplate( static_cast<const L1GtHfBitCountsTemplate*> (bcTemplate)), m_gtPSB( ptrPSB) { // maximum number of objects received for the evaluation of the condition // no objects, in fact, just a count m_condMaxNumberObjects = 1; }
L1GtHfBitCountsCondition::L1GtHfBitCountsCondition | ( | const L1GtHfBitCountsCondition & | cp | ) |
Definition at line 74 of file L1GtHfBitCountsCondition.cc.
References copy().
: L1GtConditionEvaluation() { copy(cp); }
L1GtHfBitCountsCondition::~L1GtHfBitCountsCondition | ( | ) | [virtual] |
Definition at line 82 of file L1GtHfBitCountsCondition.cc.
{
// empty
}
void L1GtHfBitCountsCondition::copy | ( | const L1GtHfBitCountsCondition & | cp | ) | [private] |
copy function for copy constructor and operator=
Definition at line 61 of file L1GtHfBitCountsCondition.cc.
References L1GtConditionEvaluation::condLastResult(), L1GtConditionEvaluation::condMaxNumberObjects(), L1GtConditionEvaluation::getCombinationsInCond(), gtHfBitCountsTemplate(), gtPSB(), L1GtConditionEvaluation::m_combinationsInCond, L1GtConditionEvaluation::m_condLastResult, L1GtConditionEvaluation::m_condMaxNumberObjects, m_gtHfBitCountsTemplate, m_gtPSB, and L1GtConditionEvaluation::m_verbosity.
Referenced by L1GtHfBitCountsCondition(), and operator=().
{ m_gtHfBitCountsTemplate = cp.gtHfBitCountsTemplate(); m_gtPSB = cp.gtPSB(); m_condMaxNumberObjects = cp.condMaxNumberObjects(); m_condLastResult = cp.condLastResult(); m_combinationsInCond = cp.getCombinationsInCond(); m_verbosity = cp.m_verbosity; }
const bool L1GtHfBitCountsCondition::evaluateCondition | ( | ) | const [virtual] |
the core function to check if the condition matches
Implements L1GtConditionEvaluation.
Definition at line 110 of file L1GtHfBitCountsCondition.cc.
References L1GctHFBitCounts::bitCount(), L1GtConditionEvaluation::checkThreshold(), L1GtCondition::condGEq(), L1GtHfBitCountsTemplate::ObjectParameter::countIndex, L1GtHfBitCountsTemplate::ObjectParameter::countThreshold, L1GlobalTriggerPSB::getCandL1HfBitCounts(), m_gtHfBitCountsTemplate, m_gtPSB, and L1GtHfBitCountsTemplate::objectParameter().
{ // number of trigger objects in the condition // no objects, in fact, just a count int iCondition = 0; // condition result condResult will be set to true if the HF bit counts // passes the requirement bool condResult = false; // store the index of the HfBitCounts object // from the combination evaluated in the condition SingleCombInCond objectsInComb; // clear the m_combinationsInCond vector (*m_combinationsInCond).clear(); // get the HF bit counts (event / condition) const L1GctHFBitCounts* bitCounts = m_gtPSB->getCandL1HfBitCounts(); // protection against missing HF bit counts collection if (bitCounts == 0) { return false; } const L1GtHfBitCountsTemplate::ObjectParameter objPar = ( *(m_gtHfBitCountsTemplate->objectParameter()) )[iCondition]; // FIXME ask GCT to provide a method to retrieve it const unsigned int numberL1HfBitCounts = 4; const unsigned int cIndex = objPar.countIndex; if (cIndex >= numberL1HfBitCounts) { edm::LogError("L1GtHfBitCountsCondition") << "\nL1GtHfBitCountsCondition error: countIndex " << cIndex << "greater than GCT maximum index = " << numberL1HfBitCounts << "\n ==> condResult = false " << std::endl; return false; } const unsigned int countValue = bitCounts->bitCount(cIndex); // check countThreshold if ( !checkThreshold(objPar.countThreshold, countValue, m_gtHfBitCountsTemplate->condGEq()) ) { return false; } // index is always zero - the object is in fact a count int indexObj = 0; objectsInComb.push_back(indexObj); (*m_combinationsInCond).push_back(objectsInComb); // if we get here all checks were successful for this combination // set the general result for evaluateCondition to "true" condResult = true; return condResult; }
const L1GtHfBitCountsTemplate* L1GtHfBitCountsCondition::gtHfBitCountsTemplate | ( | ) | const [inline] |
get / set the pointer to a L1GtCondition
Definition at line 66 of file L1GtHfBitCountsCondition.h.
References m_gtHfBitCountsTemplate.
Referenced by copy().
{ return m_gtHfBitCountsTemplate; }
const L1GlobalTriggerPSB* L1GtHfBitCountsCondition::gtPSB | ( | ) | const [inline] |
get / set the pointer to PSB
Definition at line 73 of file L1GtHfBitCountsCondition.h.
References m_gtPSB.
Referenced by copy().
{ return m_gtPSB; }
L1GtHfBitCountsCondition & L1GtHfBitCountsCondition::operator= | ( | const L1GtHfBitCountsCondition & | cp | ) |
Definition at line 89 of file L1GtHfBitCountsCondition.cc.
References copy().
{ copy(cp); return *this; }
void L1GtHfBitCountsCondition::print | ( | std::ostream & | myCout | ) | const [virtual] |
print condition
Reimplemented from L1GtConditionEvaluation.
Definition at line 173 of file L1GtHfBitCountsCondition.cc.
References m_gtHfBitCountsTemplate, and L1GtHfBitCountsTemplate::print().
Referenced by L1GlobalTriggerGTL::run().
{ m_gtHfBitCountsTemplate->print(myCout); L1GtConditionEvaluation::print(myCout); }
void L1GtHfBitCountsCondition::setGtHfBitCountsTemplate | ( | const L1GtHfBitCountsTemplate * | bcTemplate | ) |
Definition at line 96 of file L1GtHfBitCountsCondition.cc.
References m_gtHfBitCountsTemplate.
{ m_gtHfBitCountsTemplate = bcTemplate; }
void L1GtHfBitCountsCondition::setGtPSB | ( | const L1GlobalTriggerPSB * | ptrPSB | ) |
set the pointer to PSB
Definition at line 103 of file L1GtHfBitCountsCondition.cc.
References m_gtPSB.
{ m_gtPSB = ptrPSB; }
const L1GtHfBitCountsTemplate* L1GtHfBitCountsCondition::m_gtHfBitCountsTemplate [private] |
pointer to a L1GtHfBitCountsTemplate
Definition at line 87 of file L1GtHfBitCountsCondition.h.
Referenced by copy(), evaluateCondition(), gtHfBitCountsTemplate(), print(), and setGtHfBitCountsTemplate().
const L1GlobalTriggerPSB* L1GtHfBitCountsCondition::m_gtPSB [private] |
pointer to PSB, to be able to get the trigger objects
Definition at line 90 of file L1GtHfBitCountsCondition.h.
Referenced by copy(), evaluateCondition(), gtPSB(), and setGtPSB().