test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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
< ObjectTypeInCond > & 
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< ObjectTypeInCond > &objectTypeVectorValue)
 
void setOperandTokenVector (const std::vector< GlobalLogicParser::OperandToken > &operandTokenVectorValue)
 
void swapCombinationVector (std::vector< CombinationsInCond > &combinationVectorValue)
 
void swapObjectTypeVector (std::vector< ObjectTypeInCond > &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< ObjectTypeInCondm_objectTypeVector
 
std::vector
< GlobalLogicParser::OperandToken
m_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 38 of file GlobalObjectMap.h.

38 {}

Member Function Documentation

int GlobalObjectMap::algoBitNumber ( ) const
inline

get / set bit number for algorithm in the object map

Definition at line 56 of file GlobalObjectMap.h.

References m_algoBitNumber.

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

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

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

Definition at line 68 of file GlobalObjectMap.h.

References m_algoGtlResult.

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

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

destructor

get / set name for algorithm in the object map

Definition at line 46 of file GlobalObjectMap.h.

References m_algoName.

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

47  {
48  return m_algoName;
49  }
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 78 of file GlobalObjectMap.h.

References m_combinationVector.

Referenced by HLTL1TSeed::seedsL1TriggerObjectMaps().

79  {
80  return m_combinationVector;
81  }
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 i, m_combinationVector, and m_operandTokenVector.

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

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 0;
55 
56 }
int i
Definition: DBlmapReader.cc:9
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 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 0;
76 
77 }
int i
Definition: DBlmapReader.cc:9
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 i, and m_operandTokenVector.

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 }
int i
Definition: DBlmapReader.cc:9
std::vector< GlobalLogicParser::OperandToken > m_operandTokenVector
const std::vector<ObjectTypeInCond>& GlobalObjectMap::objectTypeVector ( ) const
inline

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

Definition at line 106 of file GlobalObjectMap.h.

References m_objectTypeVector.

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

106  {
107  return m_objectTypeVector;
108  }
std::vector< ObjectTypeInCond > 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 92 of file GlobalObjectMap.h.

References m_operandTokenVector.

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

92  {
93  return m_operandTokenVector;
94  }
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 filterCSVwithJSON::copy, i, m_algoBitNumber, m_algoGtlResult, m_algoName, m_combinationVector, m_operandTokenVector, and AlCaHLTBitMon_QueryRunRegistry::string.

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

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).size() == 0) {
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 }
int i
Definition: DBlmapReader.cc:9
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.

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 61 of file GlobalObjectMap.h.

References m_algoBitNumber.

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

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

Definition at line 72 of file GlobalObjectMap.h.

References m_algoGtlResult.

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

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

Definition at line 51 of file GlobalObjectMap.h.

References m_algoName.

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

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

Definition at line 83 of file GlobalObjectMap.h.

References m_combinationVector.

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

Definition at line 109 of file GlobalObjectMap.h.

References m_objectTypeVector.

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

Definition at line 96 of file GlobalObjectMap.h.

References m_operandTokenVector.

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

Definition at line 86 of file GlobalObjectMap.h.

References m_combinationVector.

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

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

Definition at line 112 of file GlobalObjectMap.h.

References m_objectTypeVector.

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

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

Definition at line 99 of file GlobalObjectMap.h.

References m_operandTokenVector.

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

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

Member Data Documentation

int GlobalObjectMap::m_algoBitNumber
private

Definition at line 141 of file GlobalObjectMap.h.

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

bool GlobalObjectMap::m_algoGtlResult
private

Definition at line 144 of file GlobalObjectMap.h.

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

std::string GlobalObjectMap::m_algoName
private

Definition at line 138 of file GlobalObjectMap.h.

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

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

Definition at line 154 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 148 of file GlobalObjectMap.h.

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