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
L1GlobalTriggerObjectMap Class Reference

#include <L1GlobalTriggerObjectMap.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
 get / set name for algorithm in the object map 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...
 
 L1GlobalTriggerObjectMap ()
 constructor(s) More...
 
const std::vector
< ObjectTypeInCond > & 
objectTypeVector () const
 
const std::vector
< L1GtLogicParser::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< L1GtLogicParser::OperandToken > &operandTokenVectorValue)
 
void swapCombinationVector (std::vector< CombinationsInCond > &combinationVectorValue)
 
void swapObjectTypeVector (std::vector< ObjectTypeInCond > &objectTypeVectorValue)
 
void swapOperandTokenVector (std::vector< L1GtLogicParser::OperandToken > &operandTokenVectorValue)
 
 ~L1GlobalTriggerObjectMap ()
 destructor More...
 

Private Attributes

int m_algoBitNumber
 
bool m_algoGtlResult
 
std::string m_algoName
 
std::vector< CombinationsInCondm_combinationVector
 
std::vector< ObjectTypeInCondm_objectTypeVector
 
std::vector
< L1GtLogicParser::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 L1GlobalTriggerObjectMap.

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 33 of file L1GlobalTriggerObjectMap.h.

Constructor & Destructor Documentation

L1GlobalTriggerObjectMap::L1GlobalTriggerObjectMap ( )
inline

constructor(s)

Definition at line 39 of file L1GlobalTriggerObjectMap.h.

39 {}
L1GlobalTriggerObjectMap::~L1GlobalTriggerObjectMap ( )
inline

destructor

Definition at line 42 of file L1GlobalTriggerObjectMap.h.

42 {}

Member Function Documentation

int L1GlobalTriggerObjectMap::algoBitNumber ( ) const
inline

get / set bit number for algorithm in the object map

Definition at line 57 of file L1GlobalTriggerObjectMap.h.

References m_algoBitNumber.

Referenced by ConvertObjectMapRecord::produce(), and HLTL1TSeed::seedsL1TriggerObjectMaps().

58  {
59  return m_algoBitNumber;
60  }
bool L1GlobalTriggerObjectMap::algoGtlResult ( ) const
inline

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

Definition at line 69 of file L1GlobalTriggerObjectMap.h.

References m_algoGtlResult.

Referenced by CompareToObjectMapRecord::analyze(), ConvertObjectMapRecord::produce(), and HLTL1TSeed::seedsL1TriggerObjectMaps().

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

get / set name for algorithm in the object map

Definition at line 47 of file L1GlobalTriggerObjectMap.h.

References m_algoName.

Referenced by CompareToObjectMapRecord::analyze(), ConvertObjectMapRecord::produce(), and HLTL1TSeed::seedsL1TriggerObjectMaps().

48  {
49  return m_algoName;
50  }
const std::vector<CombinationsInCond>& L1GlobalTriggerObjectMap::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 79 of file L1GlobalTriggerObjectMap.h.

References m_combinationVector.

Referenced by HLTL1TSeed::seedsL1TriggerObjectMaps().

80  {
81  return m_combinationVector;
82  }
std::vector< CombinationsInCond > m_combinationVector
const CombinationsInCond * L1GlobalTriggerObjectMap::getCombinationsInCond ( const std::string &  condNameVal) const

return all the combinations passing the requirements imposed in condition condNameVal

Definition at line 38 of file L1GlobalTriggerObjectMap.cc.

References i, m_combinationVector, and m_operandTokenVector.

Referenced by CompareToObjectMapRecord::analyze(), ConvertObjectMapRecord::produce(), HLTL1TSeed::seedsL1TriggerObjectMaps(), and HLTLevel1GTSeed::seedsL1TriggerObjectMaps().

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

return all the combinations passing the requirements imposed in condition condNumberVal

Definition at line 60 of file L1GlobalTriggerObjectMap.cc.

References i, m_combinationVector, and m_operandTokenVector.

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

return the result for the condition condNameVal

Definition at line 80 of file L1GlobalTriggerObjectMap.cc.

References i, and m_operandTokenVector.

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

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

Definition at line 107 of file L1GlobalTriggerObjectMap.h.

References m_objectTypeVector.

Referenced by HLTL1TSeed::seedsL1TriggerObjectMaps().

107  {
108  return m_objectTypeVector;
109  }
std::vector< ObjectTypeInCond > m_objectTypeVector
const std::vector<L1GtLogicParser::OperandToken>& L1GlobalTriggerObjectMap::operandTokenVector ( ) const
inline

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

Definition at line 93 of file L1GlobalTriggerObjectMap.h.

References m_operandTokenVector.

Referenced by CompareToObjectMapRecord::analyze(), ConvertObjectMapRecord::produce(), HLTL1TSeed::seedsL1TriggerObjectMaps(), and HLTLevel1GTSeed::seedsL1TriggerObjectMaps().

93  {
94  return m_operandTokenVector;
95  }
std::vector< L1GtLogicParser::OperandToken > m_operandTokenVector
void L1GlobalTriggerObjectMap::print ( std::ostream &  myCout) const

print the full object map

Definition at line 119 of file L1GlobalTriggerObjectMap.cc.

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

Referenced by L1GlobalTriggerGTL::run(), and l1t::GtBoard::runGTL().

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

reset the object map

Definition at line 99 of file L1GlobalTriggerObjectMap.cc.

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

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

Definition at line 62 of file L1GlobalTriggerObjectMap.h.

References m_algoBitNumber.

Referenced by L1GlobalTriggerGTL::run(), and l1t::GtBoard::runGTL().

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

Definition at line 73 of file L1GlobalTriggerObjectMap.h.

References m_algoGtlResult.

Referenced by L1GlobalTriggerGTL::run(), and l1t::GtBoard::runGTL().

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

Definition at line 52 of file L1GlobalTriggerObjectMap.h.

References m_algoName.

Referenced by L1GlobalTriggerGTL::run(), and l1t::GtBoard::runGTL().

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

Definition at line 84 of file L1GlobalTriggerObjectMap.h.

References m_combinationVector.

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

Definition at line 110 of file L1GlobalTriggerObjectMap.h.

References m_objectTypeVector.

110  {
111  m_objectTypeVector = objectTypeVectorValue;
112  }
std::vector< ObjectTypeInCond > m_objectTypeVector
void L1GlobalTriggerObjectMap::setOperandTokenVector ( const std::vector< L1GtLogicParser::OperandToken > &  operandTokenVectorValue)
inline

Definition at line 97 of file L1GlobalTriggerObjectMap.h.

References m_operandTokenVector.

97  {
98  m_operandTokenVector = operandTokenVectorValue;
99  }
std::vector< L1GtLogicParser::OperandToken > m_operandTokenVector
void L1GlobalTriggerObjectMap::swapCombinationVector ( std::vector< CombinationsInCond > &  combinationVectorValue)
inline

Definition at line 87 of file L1GlobalTriggerObjectMap.h.

References m_combinationVector.

Referenced by L1GlobalTriggerGTL::run(), and l1t::GtBoard::runGTL().

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

Definition at line 113 of file L1GlobalTriggerObjectMap.h.

References m_objectTypeVector.

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

113  {
114  m_objectTypeVector.swap(objectTypeVectorValue);
115  }
std::vector< ObjectTypeInCond > m_objectTypeVector
void L1GlobalTriggerObjectMap::swapOperandTokenVector ( std::vector< L1GtLogicParser::OperandToken > &  operandTokenVectorValue)
inline

Definition at line 100 of file L1GlobalTriggerObjectMap.h.

References m_operandTokenVector.

Referenced by L1GlobalTriggerGTL::run(), and l1t::GtBoard::runGTL().

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

Member Data Documentation

int L1GlobalTriggerObjectMap::m_algoBitNumber
private

Definition at line 142 of file L1GlobalTriggerObjectMap.h.

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

bool L1GlobalTriggerObjectMap::m_algoGtlResult
private

Definition at line 145 of file L1GlobalTriggerObjectMap.h.

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

std::string L1GlobalTriggerObjectMap::m_algoName
private

Definition at line 139 of file L1GlobalTriggerObjectMap.h.

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

std::vector<CombinationsInCond> L1GlobalTriggerObjectMap::m_combinationVector
private
std::vector<ObjectTypeInCond> L1GlobalTriggerObjectMap::m_objectTypeVector
private
std::vector<L1GtLogicParser::OperandToken> L1GlobalTriggerObjectMap::m_operandTokenVector
private

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

Definition at line 149 of file L1GlobalTriggerObjectMap.h.

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