#include <CondFormats/L1TObjects/interface/L1GtAlgorithm.h>
Public Member Functions | |
const int | algoBitNumber () const |
get / set algorithm bit number | |
const int | algoChipNumber (const int numberConditionChips, const int pinsOnConditionChip, const std::vector< int > &orderConditionChip) const |
get the condition chip number the algorithm is located on | |
const int | algoChipNumber () const |
get / set algorithm bit number | |
const std::string | algoLogicalExpression () const |
get / set the logical expression for the algorithm | |
const std::string | algoName () const |
get / set algorithm name | |
const int | algoOutputPin (const int numberConditionChips, const int pinsOnConditionChip, const std::vector< int > &orderConditionChip) const |
get the output pin on the condition chip for the algorithm | |
const std::vector < L1GtLogicParser::TokenRPN > & | algoRpnVector () const |
return the RPN vector | |
L1GtAlgorithm (const std::string &, const std::string &, const int) | |
name, logical expression and bit number | |
L1GtAlgorithm (const std::string &, const std::string &) | |
name and logical expression | |
L1GtAlgorithm (const std::string &algoNameValue) | |
name only | |
L1GtAlgorithm () | |
constructor(s) empty | |
virtual void | print (std::ostream &myCout) const |
print condition | |
void | setAlgoBitNumber (const int algoBitNumberValue) |
void | setAlgoChipNumber (const int algoChipNumberValue) |
void | setAlgoLogicalExpresssion (const std::string &logicalExpression) |
void | setAlgoName (const std::string &algoNameValue) |
virtual | ~L1GtAlgorithm () |
destructor | |
Private Attributes | |
int | m_algoBitNumber |
bit number (determined by output pin, chip number, chip order) the result for the algorithm is found at m_algoBitNumber position in the decision word vector<bool> | |
int | m_algoChipNumber |
chip number (redundant with bit number) | |
std::string | m_algoLogicalExpression |
algorithm logical expresssion | |
std::string | m_algoName |
algorithm name | |
std::vector < L1GtLogicParser::TokenRPN > | m_algoRpnVector |
algorithm RPN vector |
Implementation: <TODO: enter implementation details>
$Date$ $Revision$
Definition at line 30 of file L1GtAlgorithm.h.
L1GtAlgorithm::L1GtAlgorithm | ( | ) |
constructor(s) empty
Definition at line 28 of file L1GtAlgorithm.cc.
References m_algoBitNumber, and m_algoChipNumber.
00029 { 00030 // default values for private members not set 00031 // the other private members are C++ initialized 00032 m_algoBitNumber = -1; 00033 m_algoChipNumber = -1; 00034 00035 }
L1GtAlgorithm::L1GtAlgorithm | ( | const std::string & | algoNameValue | ) |
name only
Definition at line 38 of file L1GtAlgorithm.cc.
References m_algoBitNumber, m_algoChipNumber, and m_algoName.
00039 { 00040 m_algoName = algoNameValue; 00041 00042 // default values for private members not set 00043 // the other private members are C++ initialized 00044 m_algoBitNumber = -1; 00045 m_algoChipNumber = -1; 00046 00047 }
L1GtAlgorithm::L1GtAlgorithm | ( | const std::string & | algoNameValue, | |
const std::string & | algoLogicalExpressionValue | |||
) |
name and logical expression
Definition at line 50 of file L1GtAlgorithm.cc.
References m_algoBitNumber, m_algoChipNumber, m_algoLogicalExpression, m_algoName, m_algoRpnVector, and L1GtLogicParser::rpnVector().
00052 { 00053 m_algoName = algoNameValue; 00054 00055 m_algoLogicalExpression = algoLogicalExpressionValue; 00056 00057 L1GtLogicParser logicParser(m_algoLogicalExpression); 00058 m_algoRpnVector = logicParser.rpnVector(); 00059 00060 // default values for private members not set 00061 m_algoBitNumber = -1; 00062 m_algoChipNumber = -1; 00063 }
L1GtAlgorithm::L1GtAlgorithm | ( | const std::string & | algoNameValue, | |
const std::string & | algoLogicalExpressionValue, | |||
const | int | |||
) |
name, logical expression and bit number
Definition at line 66 of file L1GtAlgorithm.cc.
References m_algoBitNumber, m_algoChipNumber, m_algoLogicalExpression, m_algoName, m_algoRpnVector, and L1GtLogicParser::rpnVector().
00069 { 00070 m_algoName = algoNameValue; 00071 00072 m_algoLogicalExpression = algoLogicalExpressionValue; 00073 00074 m_algoBitNumber = algoBitNumberValue; 00075 00076 L1GtLogicParser logicParser(m_algoLogicalExpression); 00077 m_algoRpnVector = logicParser.rpnVector(); 00078 00079 // default values for private members not set 00080 m_algoChipNumber = -1; 00081 00082 }
L1GtAlgorithm::~L1GtAlgorithm | ( | ) | [virtual] |
const int L1GtAlgorithm::algoBitNumber | ( | ) | const [inline] |
get / set algorithm bit number
Definition at line 81 of file L1GtAlgorithm.h.
References m_algoBitNumber.
Referenced by L1GtTriggerMenuXmlParser::insertAlgorithmIntoMap(), and L1GtTriggerMenuXmlParser::insertTechTriggerIntoMap().
00082 { 00083 return m_algoBitNumber; 00084 }
const int L1GtAlgorithm::algoChipNumber | ( | const int | numberConditionChips, | |
const int | pinsOnConditionChip, | |||
const std::vector< int > & | orderConditionChip | |||
) | const |
get the condition chip number the algorithm is located on
Definition at line 93 of file L1GtAlgorithm.cc.
References m_algoBitNumber.
00096 { 00097 int posChip = (m_algoBitNumber/pinsOnConditionChip) + 1; 00098 for (int iChip = 0; iChip < numberConditionChips; ++iChip) { 00099 if (posChip == orderConditionChip[iChip]) { 00100 return iChip; 00101 } 00102 } 00103 00104 // chip number not found 00105 return -1; 00106 }
const int L1GtAlgorithm::algoChipNumber | ( | ) | const [inline] |
get / set algorithm bit number
Definition at line 92 of file L1GtAlgorithm.h.
References m_algoChipNumber.
Referenced by algoOutputPin(), and L1GtTriggerMenuXmlParser::insertAlgorithmIntoMap().
00093 { 00094 return m_algoChipNumber; 00095 }
const std::string L1GtAlgorithm::algoLogicalExpression | ( | ) | const [inline] |
get / set the logical expression for the algorithm
Definition at line 65 of file L1GtAlgorithm.h.
References m_algoLogicalExpression.
Referenced by L1GtAlgorithmEvaluation::L1GtAlgorithmEvaluation().
00066 { 00067 return m_algoLogicalExpression; 00068 }
const std::string L1GtAlgorithm::algoName | ( | ) | const [inline] |
get / set algorithm name
Definition at line 54 of file L1GtAlgorithm.h.
References m_algoName.
Referenced by L1GtTriggerMenuXmlParser::insertAlgorithmIntoMap(), and L1GtTriggerMenuXmlParser::insertTechTriggerIntoMap().
00055 { 00056 return m_algoName; 00057 }
const int L1GtAlgorithm::algoOutputPin | ( | const int | numberConditionChips, | |
const int | pinsOnConditionChip, | |||
const std::vector< int > & | orderConditionChip | |||
) | const |
get the output pin on the condition chip for the algorithm
Definition at line 109 of file L1GtAlgorithm.cc.
References algoChipNumber(), and m_algoBitNumber.
Referenced by L1GtTriggerMenuXmlParser::insertAlgorithmIntoMap().
00112 { 00113 00114 int iChip = algoChipNumber(numberConditionChips, pinsOnConditionChip, orderConditionChip); 00115 00116 int outputPin = m_algoBitNumber - (orderConditionChip[iChip] -1)*pinsOnConditionChip + 1; 00117 00118 return outputPin; 00119 }
const std::vector<L1GtLogicParser::TokenRPN>& L1GtAlgorithm::algoRpnVector | ( | ) | const [inline] |
return the RPN vector
Definition at line 76 of file L1GtAlgorithm.h.
References m_algoRpnVector.
Referenced by L1GtAlgorithmEvaluation::L1GtAlgorithmEvaluation().
00076 { 00077 return m_algoRpnVector; 00078 }
void L1GtAlgorithm::print | ( | std::ostream & | myCout | ) | const [virtual] |
print condition
Definition at line 124 of file L1GtAlgorithm.cc.
References lat::endl(), i, m_algoBitNumber, m_algoChipNumber, m_algoLogicalExpression, m_algoName, and m_algoRpnVector.
Referenced by L1GtTriggerMenuXmlParser::workTechTrigger().
00124 { 00125 00126 myCout << std::endl; 00127 00128 myCout << " Algorithm name: " << m_algoName << std::endl; 00129 00130 myCout << " Bit number: " << m_algoBitNumber; 00131 if (m_algoBitNumber < 0) { 00132 myCout << " - not properly initialized! " << std::endl; 00133 } 00134 else { 00135 myCout << std::endl; 00136 } 00137 00138 myCout << " Located on chip number: " << m_algoChipNumber; 00139 if (m_algoChipNumber < 0) { 00140 myCout << " - not properly initialized! " << std::endl; 00141 } 00142 else { 00143 myCout << std::endl; 00144 } 00145 00146 myCout << " Logical expresssion: " << m_algoLogicalExpression << std::endl; 00147 00148 int rpnVectorSize = m_algoRpnVector.size(); 00149 00150 myCout << " RPN vector size: " << rpnVectorSize; 00151 00152 if (rpnVectorSize == 0) { 00153 myCout << " - not properly initialized! " << std::endl; 00154 } 00155 else { 00156 myCout << std::endl; 00157 00158 for (int i = 0; i < rpnVectorSize; ++i) { 00159 00160 myCout << " ( " << (m_algoRpnVector[i]).operation << ", " 00161 << (m_algoRpnVector[i]).operand << " )" << std::endl; 00162 } 00163 00164 } 00165 00166 myCout << std::endl; 00167 }
Definition at line 86 of file L1GtAlgorithm.h.
References m_algoBitNumber.
00087 { 00088 m_algoBitNumber = algoBitNumberValue; 00089 }
Definition at line 97 of file L1GtAlgorithm.h.
References m_algoChipNumber.
00098 { 00099 m_algoChipNumber = algoChipNumberValue; 00100 }
void L1GtAlgorithm::setAlgoLogicalExpresssion | ( | const std::string & | logicalExpression | ) | [inline] |
Definition at line 70 of file L1GtAlgorithm.h.
References m_algoLogicalExpression.
00071 { 00072 m_algoLogicalExpression = logicalExpression; 00073 }
void L1GtAlgorithm::setAlgoName | ( | const std::string & | algoNameValue | ) | [inline] |
Definition at line 59 of file L1GtAlgorithm.h.
References m_algoName.
00060 { 00061 m_algoName = algoNameValue; 00062 }
int L1GtAlgorithm::m_algoBitNumber [private] |
bit number (determined by output pin, chip number, chip order) the result for the algorithm is found at m_algoBitNumber position in the decision word vector<bool>
Definition at line 132 of file L1GtAlgorithm.h.
Referenced by algoBitNumber(), algoChipNumber(), algoOutputPin(), L1GtAlgorithm(), print(), and setAlgoBitNumber().
int L1GtAlgorithm::m_algoChipNumber [private] |
chip number (redundant with bit number)
Definition at line 135 of file L1GtAlgorithm.h.
Referenced by algoChipNumber(), L1GtAlgorithm(), print(), and setAlgoChipNumber().
std::string L1GtAlgorithm::m_algoLogicalExpression [private] |
algorithm logical expresssion
Definition at line 124 of file L1GtAlgorithm.h.
Referenced by algoLogicalExpression(), L1GtAlgorithm(), print(), and setAlgoLogicalExpresssion().
std::string L1GtAlgorithm::m_algoName [private] |
algorithm name
Definition at line 121 of file L1GtAlgorithm.h.
Referenced by algoName(), L1GtAlgorithm(), print(), and setAlgoName().
std::vector<L1GtLogicParser::TokenRPN> L1GtAlgorithm::m_algoRpnVector [private] |
algorithm RPN vector
Definition at line 127 of file L1GtAlgorithm.h.
Referenced by algoRpnVector(), L1GtAlgorithm(), and print().