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 int condNumberVal) const
 return all the combinations passing the requirements imposed in condition condNumberVal More...
 
const CombinationsInCondgetCombinationsInCond (const std::string &condNameVal) const
 return all the combinations passing the requirements imposed in condition condNameVal 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::GlobalObjectMap ( )
inline

constructor(s)

Definition at line 35 of file GlobalObjectMap.h.

35 {}

Member Function Documentation

◆ algoBitNumber()

int GlobalObjectMap::algoBitNumber ( ) const
inline

get / set bit number for algorithm in the object map

Definition at line 47 of file GlobalObjectMap.h.

47 { return m_algoBitNumber; }

References m_algoBitNumber.

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

◆ algoGtlResult()

bool GlobalObjectMap::algoGtlResult ( ) const
inline

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

Definition at line 53 of file GlobalObjectMap.h.

53 { return m_algoGtlResult; }

References m_algoGtlResult.

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

◆ algoName()

const std::string& GlobalObjectMap::algoName ( ) const
inline

destructor

get / set name for algorithm in the object map

Definition at line 42 of file GlobalObjectMap.h.

42 { return m_algoName; }

References m_algoName.

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

◆ combinationVector()

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

59 { return m_combinationVector; }

References m_combinationVector.

Referenced by HLTL1TSeed::seedsL1TriggerObjectMaps().

◆ getCombinationsInCond() [1/2]

const CombinationsInCond * GlobalObjectMap::getCombinationsInCond ( const int  condNumberVal) const

return all the combinations passing the requirements imposed in condition condNumberVal

Definition at line 50 of file GlobalObjectMap.cc.

50  {
51  for (size_t i = 0; i < m_operandTokenVector.size(); ++i) {
52  if ((m_operandTokenVector[i]).tokenNumber == condNumberVal) {
53  return &(m_combinationVector.at((m_operandTokenVector[i]).tokenNumber));
54  }
55  }
56 
57  // return a null address - should not arrive here
58  edm::LogError("GlobalObjectMap") << "\n\n ERROR: The requested condition with tokenNumber = " << condNumberVal
59  << "\n does not exists in the operand token vector."
60  << "\n Returning zero pointer for getCombinationsInCond\n\n"
61  << std::endl;
62 
63  return nullptr;
64 }

References mps_fire::i, m_combinationVector, and m_operandTokenVector.

◆ getCombinationsInCond() [2/2]

const CombinationsInCond * GlobalObjectMap::getCombinationsInCond ( const std::string &  condNameVal) const

return all the combinations passing the requirements imposed in condition condNameVal

Definition at line 33 of file GlobalObjectMap.cc.

33  {
34  for (size_t i = 0; i < m_operandTokenVector.size(); ++i) {
35  if ((m_operandTokenVector[i]).tokenName == condNameVal) {
36  return &(m_combinationVector.at((m_operandTokenVector[i]).tokenNumber));
37  }
38  }
39 
40  // return a null address - should not arrive here
41  edm::LogError("GlobalObjectMap") << "\n\n ERROR: The requested condition with tokenName = " << condNameVal
42  << "\n does not exists in the operand token vector."
43  << "\n Returning zero pointer for getCombinationsInCond\n\n"
44  << std::endl;
45 
46  return nullptr;
47 }

References mps_fire::i, m_combinationVector, and m_operandTokenVector.

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

◆ getConditionResult()

const bool GlobalObjectMap::getConditionResult ( const std::string &  condNameVal) const

return the result for the condition condNameVal

Definition at line 66 of file GlobalObjectMap.cc.

66  {
67  for (size_t i = 0; i < m_operandTokenVector.size(); ++i) {
68  if ((m_operandTokenVector[i]).tokenName == condNameVal) {
69  return (m_operandTokenVector[i]).tokenResult;
70  }
71  }
72 
73  // return false - should not arrive here
74  edm::LogError("GlobalObjectMap") << "\n\n ERROR: The requested condition with name = " << condNameVal
75  << "\n does not exists in the operand token vector."
76  << "\n Returning false for getConditionResult\n\n"
77  << std::endl;
78  return false;
79 }

References mps_fire::i, and m_operandTokenVector.

◆ objectTypeVector()

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

81 { return m_objectTypeVector; }

References m_objectTypeVector.

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

◆ operandTokenVector()

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

70 { return m_operandTokenVector; }

References m_operandTokenVector.

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

◆ print()

void GlobalObjectMap::print ( std::ostream &  myCout) const

print the full object map

Definition at line 98 of file GlobalObjectMap.cc.

98  {
99  myCout << "GlobalObjectMap: print " << std::endl;
100 
101  myCout << " Algorithm name: " << m_algoName << std::endl;
102  myCout << " Bit number: " << m_algoBitNumber << std::endl;
103  myCout << " GTL result: " << m_algoGtlResult << std::endl;
104 
105  int operandTokenVectorSize = m_operandTokenVector.size();
106 
107  myCout << " Operand token vector size: " << operandTokenVectorSize;
108 
109  if (operandTokenVectorSize == 0) {
110  myCout << " - not properly initialized! " << std::endl;
111  } else {
112  myCout << std::endl;
113 
114  for (int i = 0; i < operandTokenVectorSize; ++i) {
115  myCout << " " << std::setw(5) << (m_operandTokenVector[i]).tokenNumber << "\t" << std::setw(25)
116  << (m_operandTokenVector[i]).tokenName << "\t" << (m_operandTokenVector[i]).tokenResult << std::endl;
117  }
118  }
119 
120  myCout << " CombinationVector size: " << m_combinationVector.size() << std::endl;
121 
122  myCout << " conditions: " << std::endl;
123 
124  std::vector<CombinationsInCond>::const_iterator itVVV;
125  int iCond = 0;
126  for (itVVV = m_combinationVector.begin(); itVVV != m_combinationVector.end(); itVVV++) {
127  std::string condName = (m_operandTokenVector[iCond]).tokenName;
128  bool condResult = (m_operandTokenVector[iCond]).tokenResult;
129 
130  myCout << " Condition " << condName << " evaluated to " << condResult << std::endl;
131 
132  myCout << " List of combinations passing all requirements for this condition:" << std::endl;
133 
134  myCout << " ";
135 
136  if ((*itVVV).empty()) {
137  myCout << "(none)";
138  } else {
139  CombinationsInCond::const_iterator itVV;
140  for (itVV = (*itVVV).begin(); itVV != (*itVVV).end(); itVV++) {
141  myCout << "( ";
142 
143  std::copy((*itVV).begin(), (*itVV).end(), std::ostream_iterator<int>(myCout, " "));
144 
145  myCout << "); ";
146  }
147  }
148  iCond++;
149  myCout << "\n\n";
150  }
151 }

References filterCSVwithJSON::copy, mps_fire::i, m_algoBitNumber, m_algoGtlResult, m_algoName, m_combinationVector, m_operandTokenVector, and AlCaHLTBitMon_QueryRunRegistry::string.

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

◆ reset()

void GlobalObjectMap::reset ( void  )

reset the object map

Definition at line 81 of file GlobalObjectMap.cc.

81  {
82  // name of the algorithm
83  m_algoName.clear();
84 
85  // bit number for algorithm
86  m_algoBitNumber = -1;
87 
88  // GTL result of the algorithm
89  m_algoGtlResult = false;
90 
91  // vector of operand tokens for an algorithm
92  m_operandTokenVector.clear();
93 
94  // vector of combinations for all conditions in an algorithm
95  m_combinationVector.clear();
96 }

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

◆ setAlgoBitNumber()

void GlobalObjectMap::setAlgoBitNumber ( int  algoBitNumberValue)
inline

Definition at line 49 of file GlobalObjectMap.h.

49 { m_algoBitNumber = algoBitNumberValue; }

References m_algoBitNumber.

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

◆ setAlgoGtlResult()

void GlobalObjectMap::setAlgoGtlResult ( bool  algoGtlResultValue)
inline

Definition at line 55 of file GlobalObjectMap.h.

55 { m_algoGtlResult = algoGtlResultValue; }

References m_algoGtlResult.

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

◆ setAlgoName()

void GlobalObjectMap::setAlgoName ( const std::string &  algoNameValue)
inline

Definition at line 44 of file GlobalObjectMap.h.

44 { m_algoName = algoNameValue; }

References m_algoName.

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

◆ setCombinationVector()

void GlobalObjectMap::setCombinationVector ( const std::vector< CombinationsInCond > &  combinationVectorValue)
inline

Definition at line 61 of file GlobalObjectMap.h.

61  {
62  m_combinationVector = combinationVectorValue;
63  }

References m_combinationVector.

◆ setObjectTypeVector()

void GlobalObjectMap::setObjectTypeVector ( const std::vector< L1TObjectTypeInCond > &  objectTypeVectorValue)
inline

Definition at line 82 of file GlobalObjectMap.h.

82  {
83  m_objectTypeVector = objectTypeVectorValue;
84  }

References m_objectTypeVector.

◆ setOperandTokenVector()

void GlobalObjectMap::setOperandTokenVector ( const std::vector< GlobalLogicParser::OperandToken > &  operandTokenVectorValue)
inline

Definition at line 72 of file GlobalObjectMap.h.

72  {
73  m_operandTokenVector = operandTokenVectorValue;
74  }

References m_operandTokenVector.

◆ swapCombinationVector()

void GlobalObjectMap::swapCombinationVector ( std::vector< CombinationsInCond > &  combinationVectorValue)
inline

Definition at line 64 of file GlobalObjectMap.h.

64  {
65  m_combinationVector.swap(combinationVectorValue);
66  }

References m_combinationVector.

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

◆ swapObjectTypeVector()

void GlobalObjectMap::swapObjectTypeVector ( std::vector< L1TObjectTypeInCond > &  objectTypeVectorValue)
inline

Definition at line 85 of file GlobalObjectMap.h.

85  {
86  m_objectTypeVector.swap(objectTypeVectorValue);
87  }

References m_objectTypeVector.

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

◆ swapOperandTokenVector()

void GlobalObjectMap::swapOperandTokenVector ( std::vector< GlobalLogicParser::OperandToken > &  operandTokenVectorValue)
inline

Definition at line 75 of file GlobalObjectMap.h.

75  {
76  m_operandTokenVector.swap(operandTokenVectorValue);
77  }

References m_operandTokenVector.

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

Member Data Documentation

◆ m_algoBitNumber

int GlobalObjectMap::m_algoBitNumber
private

Definition at line 111 of file GlobalObjectMap.h.

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

◆ m_algoGtlResult

bool GlobalObjectMap::m_algoGtlResult
private

Definition at line 114 of file GlobalObjectMap.h.

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

◆ m_algoName

std::string GlobalObjectMap::m_algoName
private

Definition at line 108 of file GlobalObjectMap.h.

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

◆ m_combinationVector

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

◆ m_objectTypeVector

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

Definition at line 124 of file GlobalObjectMap.h.

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

◆ m_operandTokenVector

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

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

Definition at line 118 of file GlobalObjectMap.h.

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

mps_fire.i
i
Definition: mps_fire.py:428
filterCSVwithJSON.copy
copy
Definition: filterCSVwithJSON.py:36
GlobalObjectMap::m_algoGtlResult
bool m_algoGtlResult
Definition: GlobalObjectMap.h:114
GlobalObjectMap::m_algoBitNumber
int m_algoBitNumber
Definition: GlobalObjectMap.h:111
GlobalObjectMap::m_objectTypeVector
std::vector< L1TObjectTypeInCond > m_objectTypeVector
Definition: GlobalObjectMap.h:124
GlobalObjectMap::m_operandTokenVector
std::vector< GlobalLogicParser::OperandToken > m_operandTokenVector
Definition: GlobalObjectMap.h:118
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
GlobalObjectMap::m_algoName
std::string m_algoName
Definition: GlobalObjectMap.h:108
GlobalObjectMap::m_combinationVector
std::vector< CombinationsInCond > m_combinationVector
Definition: GlobalObjectMap.h:121