#include <L1GtAlgorithmEvaluation.h>
Public Types | |
typedef ConditionEvaluationMap::const_iterator | CItEvalMap |
typedef __gnu_cxx::hash_map < std::string, L1GtConditionEvaluation * > | ConditionEvaluationMap |
typedef ConditionEvaluationMap::iterator | ItEvalMap |
Public Types inherited from L1GtLogicParser | |
enum | OperationType { OP_NULL =1, OP_INVALID =2, OP_AND =4, OP_OR =8, OP_NOT =16, OP_OPERAND =32, OP_OPENBRACKET =64, OP_CLOSEBRACKET =128 } |
typedef std::vector< TokenRPN > | RpnVector |
Public Member Functions | |
void | evaluateAlgorithm (const int chipNumber, const std::vector< ConditionEvaluationMap > &) |
evaluate an algorithm More... | |
const std::vector < CombinationsInCond > * | gtAlgoCombinationVector () const |
const bool & | gtAlgoResult () const |
get / set the result of the algorithm More... | |
L1GtAlgorithmEvaluation () | |
constructor More... | |
L1GtAlgorithmEvaluation (const L1GtAlgorithm &) | |
constructor from an algorithm from event setup More... | |
L1GtAlgorithmEvaluation (L1GtAlgorithmEvaluation &) | |
copy constructor More... | |
void | print (std::ostream &myCout) const |
void | setGtAlgoResult (const bool algoResult) |
virtual | ~L1GtAlgorithmEvaluation () |
destructor More... | |
Public Member Functions inherited from L1GtLogicParser | |
void | buildOperandTokenVector () |
void | buildOperandTokenVectorNumExp () |
bool | buildRpnVector (const std::string &) |
build the rpn vector More... | |
bool | checkLogicalExpression (std::string &) |
check a logical expression for correctness - add/remove spaces if needed More... | |
void | clearRpnVector () |
clear possible old rpn vector More... | |
void | convertIntToNameLogicalExpression (const std::map< int, std::string > &intToNameMap) |
void | convertNameToIntLogicalExpression (const std::map< std::string, int > &nameToIntMap) |
virtual const bool | expressionResult () const |
virtual const bool | expressionResultNumExp () const |
std::vector < L1GtLogicParser::OperandToken > | expressionSeedsOperandList () |
L1GtLogicParser () | |
constructor(s) More... | |
L1GtLogicParser (const RpnVector &, const std::vector< OperandToken > &) | |
L1GtLogicParser (const std::string &logicalExpressionVal) | |
L1GtLogicParser (std::string &logicalExpressionVal) | |
L1GtLogicParser (const std::string logicalExpressionVal, const std::string numericalExpressionVal) | |
from a logical and a numerical expression More... | |
L1GtLogicParser (const std::string &logicalExpressionVal, const std::string &numericalExpressionVal, const bool dummy) | |
std::string | logicalExpression () const |
return the logical expression More... | |
std::string | numericalExpression () const |
return the numerical expression More... | |
int | operandIndex (const std::string &operandNameVal) const |
return the position index of the operand in the logical expression More... | |
std::string | operandName (const int iOperand) const |
return the name of the (iOperand)th operand in the logical expression More... | |
bool | operandResult (const std::string &operandNameVal) const |
bool | operandResult (const int tokenNumberVal) const |
bool | operandResultNumExp (const std::string &operandNameVal) const |
bool | operandResultNumExp (const int iOperand) const |
std::vector< OperandToken > & | operandTokenVector () |
return the vector of operand tokens More... | |
const std::vector< OperandToken > & | operandTokenVector () const |
RpnVector | rpnVector () const |
return the RPN vector More... | |
virtual | ~L1GtLogicParser () |
destructor More... | |
Private Attributes | |
std::vector< CombinationsInCond > | m_algoCombinationVector |
bool | m_algoResult |
algorithm result More... | |
Additional Inherited Members | |
Protected Member Functions inherited from L1GtLogicParser | |
void | addBracketSpaces (const std::string &, std::string &) |
add spaces before and after parantheses More... | |
virtual OperationType | getOperation (const std::string &tokenString, OperationType lastOperation, TokenRPN &rpnToken) const |
const OperationRule * | getRuleFromType (OperationType t) |
get the rule entry to an operation type More... | |
bool | setLogicalExpression (const std::string &) |
set the logical expression - check for correctness the input string More... | |
bool | setNumericalExpression (const std::string &) |
Protected Attributes inherited from L1GtLogicParser | |
std::string | m_logicalExpression |
logical expression to be parsed More... | |
std::string | m_numericalExpression |
std::vector< OperandToken > | m_operandTokenVector |
vector of operand tokens More... | |
RpnVector | m_rpnVector |
RPN vector - equivalent to the logical expression. More... | |
Static Protected Attributes inherited from L1GtLogicParser | |
static struct OperationRule | m_operationRules [] |
Description: Evaluation of a L1 Global Trigger algorithm.
Implementation: <TODO: enter implementation details>
$Date$ $Revision$
Definition at line 67 of file L1GtAlgorithmEvaluation.h.
typedef ConditionEvaluationMap::const_iterator L1GtAlgorithmEvaluation::CItEvalMap |
Definition at line 86 of file L1GtAlgorithmEvaluation.h.
typedef __gnu_cxx::hash_map<std::string, L1GtConditionEvaluation*> L1GtAlgorithmEvaluation::ConditionEvaluationMap |
Definition at line 85 of file L1GtAlgorithmEvaluation.h.
typedef ConditionEvaluationMap::iterator L1GtAlgorithmEvaluation::ItEvalMap |
Definition at line 87 of file L1GtAlgorithmEvaluation.h.
L1GtAlgorithmEvaluation::L1GtAlgorithmEvaluation | ( | ) |
constructor
Definition at line 48 of file L1GtAlgorithmEvaluation.cc.
References m_algoResult.
L1GtAlgorithmEvaluation::L1GtAlgorithmEvaluation | ( | const L1GtAlgorithm & | alg | ) |
constructor from an algorithm from event setup
Definition at line 57 of file L1GtAlgorithmEvaluation.cc.
References L1GtAlgorithm::algoLogicalExpression(), L1GtAlgorithm::algoRpnVector(), m_algoResult, L1GtLogicParser::m_logicalExpression, and L1GtLogicParser::m_rpnVector.
L1GtAlgorithmEvaluation::L1GtAlgorithmEvaluation | ( | L1GtAlgorithmEvaluation & | cp | ) |
copy constructor
Definition at line 70 of file L1GtAlgorithmEvaluation.cc.
References gtAlgoCombinationVector(), gtAlgoResult(), L1GtLogicParser::logicalExpression(), m_algoCombinationVector, m_algoResult, L1GtLogicParser::m_logicalExpression, L1GtLogicParser::m_rpnVector, and L1GtLogicParser::rpnVector().
|
virtual |
void L1GtAlgorithmEvaluation::evaluateAlgorithm | ( | const int | chipNumber, |
const std::vector< ConditionEvaluationMap > & | conditionResultMaps | ||
) |
evaluate an algorithm
Definition at line 92 of file L1GtAlgorithmEvaluation.cc.
References edm::hlt::Exception, spr::find(), m_algoCombinationVector, m_algoResult, L1GtLogicParser::m_logicalExpression, L1GtLogicParser::m_operandTokenVector, L1GtLogicParser::m_rpnVector, L1GtLogicParser::OP_AND, L1GtLogicParser::OP_NOT, L1GtLogicParser::OP_OPERAND, L1GtLogicParser::OP_OR, L1GtLogicParser::OperandToken::tokenName, L1GtLogicParser::OperandToken::tokenNumber, and L1GtLogicParser::OperandToken::tokenResult.
Referenced by L1GlobalTriggerGTL::run().
|
inline |
get all the object combinations evaluated to true in the conditions from the algorithm
Definition at line 105 of file L1GtAlgorithmEvaluation.h.
References m_algoCombinationVector.
Referenced by L1GtAlgorithmEvaluation(), and L1GlobalTriggerGTL::run().
|
inline |
get / set the result of the algorithm
Definition at line 92 of file L1GtAlgorithmEvaluation.h.
References m_algoResult.
Referenced by L1GtAlgorithmEvaluation(), and L1GlobalTriggerGTL::run().
void L1GtAlgorithmEvaluation::print | ( | std::ostream & | myCout | ) | const |
Definition at line 207 of file L1GtAlgorithmEvaluation.cc.
References i, m_algoCombinationVector, m_algoResult, and L1GtLogicParser::m_operandTokenVector.
Referenced by L1GlobalTriggerGTL::run().
|
inline |
Definition at line 96 of file L1GtAlgorithmEvaluation.h.
References m_algoResult.
|
private |
Definition at line 117 of file L1GtAlgorithmEvaluation.h.
Referenced by evaluateAlgorithm(), gtAlgoCombinationVector(), L1GtAlgorithmEvaluation(), and print().
|
private |
algorithm result
Definition at line 115 of file L1GtAlgorithmEvaluation.h.
Referenced by evaluateAlgorithm(), gtAlgoResult(), L1GtAlgorithmEvaluation(), print(), and setGtAlgoResult().