CMS 3D CMS Logo

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

#include <GlobalObjectMap.h>

Public Member Functions

int algoBitNumber () const
 get / set bit number for algorithm in the object map More...
 
bool algoGtlResult () const
 
const std::string & algoName () const
 destructor More...
 
const std::vector< CombinationsInCond > & combinationVector () const
 
const CombinationsInCondgetCombinationsInCond (const std::string &condNameVal) const
 return all the combinations passing the requirements imposed in condition condNameVal More...
 
const CombinationsInCondgetCombinationsInCond (const int condNumberVal) const
 return all the combinations passing the requirements imposed in condition condNumberVal More...
 
const bool getConditionResult (const std::string &condNameVal) const
 return the result for the condition condNameVal More...
 
 GlobalObjectMap ()
 constructor(s) More...
 
const std::vector< L1TObjectTypeInCond > & objectTypeVector () const
 
const std::vector< GlobalLogicParser::OperandToken > & operandTokenVector () const
 
void print (std::ostream &myCout) const
 print the full object map More...
 
void reset ()
 reset the object map More...
 
void setAlgoBitNumber (int algoBitNumberValue)
 
void setAlgoGtlResult (bool algoGtlResultValue)
 
void setAlgoName (const std::string &algoNameValue)
 
void setCombinationVector (const std::vector< CombinationsInCond > &combinationVectorValue)
 
void setObjectTypeVector (const std::vector< L1TObjectTypeInCond > &objectTypeVectorValue)
 
void setOperandTokenVector (const std::vector< GlobalLogicParser::OperandToken > &operandTokenVectorValue)
 
void swapCombinationVector (std::vector< CombinationsInCond > &combinationVectorValue)
 
void swapObjectTypeVector (std::vector< L1TObjectTypeInCond > &objectTypeVectorValue)
 
void swapOperandTokenVector (std::vector< GlobalLogicParser::OperandToken > &operandTokenVectorValue)
 

Private Attributes

int m_algoBitNumber
 
bool m_algoGtlResult
 
std::string m_algoName
 
std::vector< CombinationsInCondm_combinationVector
 
std::vector< L1TObjectTypeInCondm_objectTypeVector
 
std::vector< GlobalLogicParser::OperandTokenm_operandTokenVector
 

Detailed Description

Description: map trigger objects to an algorithm and the conditions therein.

Implementation: <TODO: enter implementation details>

Author
: Vasile Mihai Ghete - HEPHY Vienna

Description: group typedefs used by GlobalObjectMap.

Implementation: <TODO: enter implementation details>

Author
: Vasile Mihai Ghete - HEPHY Vienna

Description: see header file.

Implementation: <TODO: enter implementation details>

Author
: Vasile Mihai Ghete - HEPHY Vienna

Definition at line 32 of file GlobalObjectMap.h.

Constructor & Destructor Documentation

GlobalObjectMap::GlobalObjectMap ( )
inline

constructor(s)

Definition at line 37 of file GlobalObjectMap.h.

37 {}

Member Function Documentation

int GlobalObjectMap::algoBitNumber ( ) const
inline

get / set bit number for algorithm in the object map

Definition at line 55 of file GlobalObjectMap.h.

References m_algoBitNumber.

Referenced by l1t::GtRecordDump::analyze(), and HLTL1TSeed::seedsL1TriggerObjectMaps().

56  {
57  return m_algoBitNumber;
58  }
bool GlobalObjectMap::algoGtlResult ( ) const
inline

get / set the GTL result for algorithm NOTE: FDL can mask an algorithm!

Definition at line 67 of file GlobalObjectMap.h.

References m_algoGtlResult.

Referenced by l1t::GtRecordDump::analyze(), and HLTL1TSeed::seedsL1TriggerObjectMaps().

67  {
68  return m_algoGtlResult;
69  }
const std::string& GlobalObjectMap::algoName ( ) const
inline

destructor

get / set name for algorithm in the object map

Definition at line 45 of file GlobalObjectMap.h.

References m_algoName.

Referenced by l1t::GtRecordDump::analyze(), and HLTL1TSeed::seedsL1TriggerObjectMaps().

46  {
47  return m_algoName;
48  }
std::string m_algoName
const std::vector<CombinationsInCond>& GlobalObjectMap::combinationVector ( ) const
inline

get / set the vector of combinations for the algorithm return a constant reference to the vector of combinations for the algorithm

Definition at line 77 of file GlobalObjectMap.h.

References m_combinationVector.

Referenced by HLTL1TSeed::seedsL1TriggerObjectMaps().

78  {
79  return m_combinationVector;
80  }
std::vector< CombinationsInCond > m_combinationVector
const CombinationsInCond * GlobalObjectMap::getCombinationsInCond ( const std::string &  condNameVal) const

return all the combinations passing the requirements imposed in condition condNameVal

Definition at line 37 of file GlobalObjectMap.cc.

References mps_fire::i, m_combinationVector, and m_operandTokenVector.

Referenced by l1t::GtRecordDump::analyze(), HLTL1TSeed::seedsL1TriggerObjectMaps(), and swapObjectTypeVector().

38  {
39 
40  for (size_t i = 0; i < m_operandTokenVector.size(); ++i) {
41 
42  if ((m_operandTokenVector[i]).tokenName == condNameVal) {
43  return &(m_combinationVector.at((m_operandTokenVector[i]).tokenNumber));
44  }
45 
46  }
47 
48  // return a null address - should not arrive here
49  edm::LogError("GlobalObjectMap")
50  << "\n\n ERROR: The requested condition with tokenName = " << condNameVal
51  << "\n does not exists in the operand token vector."
52  << "\n Returning zero pointer for getCombinationsInCond\n\n" << std::endl;
53 
54  return nullptr;
55 
56 }
std::vector< GlobalLogicParser::OperandToken > m_operandTokenVector
std::vector< CombinationsInCond > m_combinationVector
const CombinationsInCond * GlobalObjectMap::getCombinationsInCond ( const int  condNumberVal) const

return all the combinations passing the requirements imposed in condition condNumberVal

Definition at line 59 of file GlobalObjectMap.cc.

References mps_fire::i, m_combinationVector, and m_operandTokenVector.

59  {
60 
61  for (size_t i = 0; i < m_operandTokenVector.size(); ++i) {
62 
63  if ((m_operandTokenVector[i]).tokenNumber == condNumberVal) {
64  return &(m_combinationVector.at((m_operandTokenVector[i]).tokenNumber));
65  }
66 
67  }
68 
69  // return a null address - should not arrive here
70  edm::LogError("GlobalObjectMap")
71  << "\n\n ERROR: The requested condition with tokenNumber = " << condNumberVal
72  << "\n does not exists in the operand token vector."
73  << "\n Returning zero pointer for getCombinationsInCond\n\n" << std::endl;
74 
75  return nullptr;
76 
77 }
std::vector< GlobalLogicParser::OperandToken > m_operandTokenVector
std::vector< CombinationsInCond > m_combinationVector
const bool GlobalObjectMap::getConditionResult ( const std::string &  condNameVal) const

return the result for the condition condNameVal

Definition at line 79 of file GlobalObjectMap.cc.

References mps_fire::i, and m_operandTokenVector.

Referenced by swapObjectTypeVector().

79  {
80 
81  for (size_t i = 0; i < m_operandTokenVector.size(); ++i) {
82 
83  if ((m_operandTokenVector[i]).tokenName == condNameVal) {
84  return (m_operandTokenVector[i]).tokenResult;
85  }
86  }
87 
88  // return false - should not arrive here
89  edm::LogError("GlobalObjectMap")
90  << "\n\n ERROR: The requested condition with name = " << condNameVal
91  << "\n does not exists in the operand token vector."
92  << "\n Returning false for getConditionResult\n\n" << std::endl;
93  return false;
94 
95 }
std::vector< GlobalLogicParser::OperandToken > m_operandTokenVector
const std::vector<L1TObjectTypeInCond>& GlobalObjectMap::objectTypeVector ( ) const
inline

get / set the vector of object types return a constant reference to the vector of operand tokens

Definition at line 105 of file GlobalObjectMap.h.

References m_objectTypeVector.

Referenced by l1t::GtRecordDump::analyze(), and HLTL1TSeed::seedsL1TriggerObjectMaps().

105  {
106  return m_objectTypeVector;
107  }
std::vector< L1TObjectTypeInCond > m_objectTypeVector
const std::vector<GlobalLogicParser::OperandToken>& GlobalObjectMap::operandTokenVector ( ) const
inline

get / set the vector of operand tokens return a constant reference to the vector of operand tokens

Definition at line 91 of file GlobalObjectMap.h.

References m_operandTokenVector.

Referenced by l1t::GtRecordDump::analyze(), and HLTL1TSeed::seedsL1TriggerObjectMaps().

91  {
92  return m_operandTokenVector;
93  }
std::vector< GlobalLogicParser::OperandToken > m_operandTokenVector
void GlobalObjectMap::print ( std::ostream &  myCout) const

print the full object map

Definition at line 118 of file GlobalObjectMap.cc.

References popcon2dropbox::copy(), mps_fire::i, m_algoBitNumber, m_algoGtlResult, m_algoName, m_combinationVector, m_operandTokenVector, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by l1t::GlobalBoard::runGTL(), and swapObjectTypeVector().

119 {
120 
121  myCout << "GlobalObjectMap: print " << std::endl;
122 
123  myCout << " Algorithm name: " << m_algoName << std::endl;
124  myCout << " Bit number: " << m_algoBitNumber << std::endl;
125  myCout << " GTL result: " << m_algoGtlResult << std::endl;
126 
127  int operandTokenVectorSize = m_operandTokenVector.size();
128 
129  myCout << " Operand token vector size: " << operandTokenVectorSize;
130 
131  if (operandTokenVectorSize == 0) {
132  myCout << " - not properly initialized! " << std::endl;
133  }
134  else {
135  myCout << std::endl;
136 
137  for (int i = 0; i < operandTokenVectorSize; ++i) {
138 
139  myCout << " " << std::setw(5) << (m_operandTokenVector[i]).tokenNumber << "\t"
140  << std::setw(25) << (m_operandTokenVector[i]).tokenName << "\t"
141  << (m_operandTokenVector[i]).tokenResult
142  << std::endl;
143  }
144 
145  }
146 
147  myCout << " CombinationVector size: " << m_combinationVector.size() << std::endl;
148 
149  myCout << " conditions: " << std::endl;
150 
151  std::vector<CombinationsInCond>::const_iterator itVVV;
152  int iCond = 0;
153  for(itVVV = m_combinationVector.begin();
154  itVVV != m_combinationVector.end(); itVVV++) {
155 
156  std::string condName = (m_operandTokenVector[iCond]).tokenName;
157  bool condResult = (m_operandTokenVector[iCond]).tokenResult;
158 
159  myCout << " Condition " << condName << " evaluated to " << condResult
160  << std::endl;
161 
162  myCout << " List of combinations passing all requirements for this condition:"
163  << std::endl;
164 
165  myCout << " ";
166 
167  if ((*itVVV).empty()) {
168  myCout << "(none)";
169  } else {
170 
171  CombinationsInCond::const_iterator itVV;
172  for(itVV = (*itVVV).begin(); itVV != (*itVVV).end(); itVV++) {
173 
174  myCout << "( ";
175 
176  std::copy((*itVV).begin(), (*itVV).end(),
177  std::ostream_iterator<int> (myCout, " "));
178 
179  myCout << "); ";
180 
181  }
182 
183  }
184  iCond++;
185  myCout << "\n\n";
186  }
187 }
std::vector< GlobalLogicParser::OperandToken > m_operandTokenVector
std::vector< CombinationsInCond > m_combinationVector
std::string m_algoName
void GlobalObjectMap::reset ( void  )

reset the object map

Definition at line 98 of file GlobalObjectMap.cc.

References m_algoBitNumber, m_algoGtlResult, m_algoName, m_combinationVector, and m_operandTokenVector.

Referenced by swapObjectTypeVector().

99 {
100 
101  // name of the algorithm
102  m_algoName.clear();
103 
104  // bit number for algorithm
105  m_algoBitNumber = -1;
106 
107  // GTL result of the algorithm
108  m_algoGtlResult = false;
109 
110  // vector of operand tokens for an algorithm
111  m_operandTokenVector.clear();
112 
113  // vector of combinations for all conditions in an algorithm
114  m_combinationVector.clear();
115 
116 }
std::vector< GlobalLogicParser::OperandToken > m_operandTokenVector
std::vector< CombinationsInCond > m_combinationVector
std::string m_algoName
void GlobalObjectMap::setAlgoBitNumber ( int  algoBitNumberValue)
inline

Definition at line 60 of file GlobalObjectMap.h.

References m_algoBitNumber.

Referenced by l1t::GlobalBoard::runGTL().

61  {
62  m_algoBitNumber = algoBitNumberValue;
63  }
void GlobalObjectMap::setAlgoGtlResult ( bool  algoGtlResultValue)
inline

Definition at line 71 of file GlobalObjectMap.h.

References m_algoGtlResult.

Referenced by l1t::GlobalBoard::runGTL().

71  {
72  m_algoGtlResult = algoGtlResultValue;
73  }
void GlobalObjectMap::setAlgoName ( const std::string &  algoNameValue)
inline

Definition at line 50 of file GlobalObjectMap.h.

References m_algoName.

Referenced by l1t::GlobalBoard::runGTL().

50  {
51  m_algoName = algoNameValue;
52  }
std::string m_algoName
void GlobalObjectMap::setCombinationVector ( const std::vector< CombinationsInCond > &  combinationVectorValue)
inline

Definition at line 82 of file GlobalObjectMap.h.

References m_combinationVector.

82  {
83  m_combinationVector = combinationVectorValue;
84  }
std::vector< CombinationsInCond > m_combinationVector
void GlobalObjectMap::setObjectTypeVector ( const std::vector< L1TObjectTypeInCond > &  objectTypeVectorValue)
inline

Definition at line 108 of file GlobalObjectMap.h.

References m_objectTypeVector.

108  {
109  m_objectTypeVector = objectTypeVectorValue;
110  }
std::vector< L1TObjectTypeInCond > m_objectTypeVector
void GlobalObjectMap::setOperandTokenVector ( const std::vector< GlobalLogicParser::OperandToken > &  operandTokenVectorValue)
inline

Definition at line 95 of file GlobalObjectMap.h.

References m_operandTokenVector.

95  {
96  m_operandTokenVector = operandTokenVectorValue;
97  }
std::vector< GlobalLogicParser::OperandToken > m_operandTokenVector
void GlobalObjectMap::swapCombinationVector ( std::vector< CombinationsInCond > &  combinationVectorValue)
inline

Definition at line 85 of file GlobalObjectMap.h.

References m_combinationVector.

Referenced by l1t::GlobalBoard::runGTL().

85  {
86  m_combinationVector.swap(combinationVectorValue);
87  }
std::vector< CombinationsInCond > m_combinationVector
void GlobalObjectMap::swapObjectTypeVector ( std::vector< L1TObjectTypeInCond > &  objectTypeVectorValue)
inline

Definition at line 111 of file GlobalObjectMap.h.

References getCombinationsInCond(), getConditionResult(), m_objectTypeVector, print(), reset(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by l1t::GlobalBoard::runGTL().

111  {
112  m_objectTypeVector.swap(objectTypeVectorValue);
113  }
std::vector< L1TObjectTypeInCond > m_objectTypeVector
void GlobalObjectMap::swapOperandTokenVector ( std::vector< GlobalLogicParser::OperandToken > &  operandTokenVectorValue)
inline

Definition at line 98 of file GlobalObjectMap.h.

References m_operandTokenVector.

Referenced by l1t::GlobalBoard::runGTL().

98  {
99  m_operandTokenVector.swap(operandTokenVectorValue);
100  }
std::vector< GlobalLogicParser::OperandToken > m_operandTokenVector

Member Data Documentation

int GlobalObjectMap::m_algoBitNumber
private

Definition at line 140 of file GlobalObjectMap.h.

Referenced by algoBitNumber(), print(), reset(), and setAlgoBitNumber().

bool GlobalObjectMap::m_algoGtlResult
private

Definition at line 143 of file GlobalObjectMap.h.

Referenced by algoGtlResult(), print(), reset(), and setAlgoGtlResult().

std::string GlobalObjectMap::m_algoName
private

Definition at line 137 of file GlobalObjectMap.h.

Referenced by algoName(), print(), reset(), and setAlgoName().

std::vector<CombinationsInCond> GlobalObjectMap::m_combinationVector
private
std::vector<L1TObjectTypeInCond> GlobalObjectMap::m_objectTypeVector
private

Definition at line 153 of file GlobalObjectMap.h.

Referenced by objectTypeVector(), setObjectTypeVector(), and swapObjectTypeVector().

std::vector<GlobalLogicParser::OperandToken> GlobalObjectMap::m_operandTokenVector
private

vector of operand tokens for an algorithm (condition name, condition index, condition result)

Definition at line 147 of file GlobalObjectMap.h.

Referenced by getCombinationsInCond(), getConditionResult(), operandTokenVector(), print(), reset(), setOperandTokenVector(), and swapOperandTokenVector().