CMS 3D CMS Logo

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 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...
 
 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::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 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::L1GlobalTriggerObjectMap ( )
inline

constructor(s)

Definition at line 36 of file L1GlobalTriggerObjectMap.h.

36 {}

◆ ~L1GlobalTriggerObjectMap()

L1GlobalTriggerObjectMap::~L1GlobalTriggerObjectMap ( )
inline

destructor

Definition at line 39 of file L1GlobalTriggerObjectMap.h.

39 {}

Member Function Documentation

◆ algoBitNumber()

int L1GlobalTriggerObjectMap::algoBitNumber ( ) const
inline

get / set bit number for algorithm in the object map

Definition at line 48 of file L1GlobalTriggerObjectMap.h.

48 { return m_algoBitNumber; }

References m_algoBitNumber.

Referenced by ConvertObjectMapRecord::produce().

◆ algoGtlResult()

bool L1GlobalTriggerObjectMap::algoGtlResult ( ) const
inline

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

Definition at line 54 of file L1GlobalTriggerObjectMap.h.

54 { return m_algoGtlResult; }

References m_algoGtlResult.

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

◆ algoName()

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

get / set name for algorithm in the object map

Definition at line 43 of file L1GlobalTriggerObjectMap.h.

43 { return m_algoName; }

References m_algoName.

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

◆ combinationVector()

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

60 { return m_combinationVector; }

References m_combinationVector.

◆ getCombinationsInCond() [1/2]

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

return all the combinations passing the requirements imposed in condition condNumberVal

Definition at line 51 of file L1GlobalTriggerObjectMap.cc.

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

References mps_fire::i, m_combinationVector, and m_operandTokenVector.

◆ getCombinationsInCond() [2/2]

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

return all the combinations passing the requirements imposed in condition condNameVal

Definition at line 34 of file L1GlobalTriggerObjectMap.cc.

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

References mps_fire::i, m_combinationVector, and m_operandTokenVector.

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

◆ getConditionResult()

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

return the result for the condition condNameVal

Definition at line 68 of file L1GlobalTriggerObjectMap.cc.

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

References mps_fire::i, and m_operandTokenVector.

◆ objectTypeVector()

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

82 { return m_objectTypeVector; }

References m_objectTypeVector.

◆ operandTokenVector()

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

71 { return m_operandTokenVector; }

References m_operandTokenVector.

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

◆ print()

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

print the full object map

Definition at line 100 of file L1GlobalTriggerObjectMap.cc.

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

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

Referenced by L1GlobalTriggerGTL::run().

◆ reset()

void L1GlobalTriggerObjectMap::reset ( void  )

reset the object map

Definition at line 83 of file L1GlobalTriggerObjectMap.cc.

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

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

◆ setAlgoBitNumber()

void L1GlobalTriggerObjectMap::setAlgoBitNumber ( int  algoBitNumberValue)
inline

Definition at line 50 of file L1GlobalTriggerObjectMap.h.

50 { m_algoBitNumber = algoBitNumberValue; }

References m_algoBitNumber.

Referenced by L1GlobalTriggerGTL::run().

◆ setAlgoGtlResult()

void L1GlobalTriggerObjectMap::setAlgoGtlResult ( bool  algoGtlResultValue)
inline

Definition at line 56 of file L1GlobalTriggerObjectMap.h.

56 { m_algoGtlResult = algoGtlResultValue; }

References m_algoGtlResult.

Referenced by L1GlobalTriggerGTL::run().

◆ setAlgoName()

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

Definition at line 45 of file L1GlobalTriggerObjectMap.h.

45 { m_algoName = algoNameValue; }

References m_algoName.

Referenced by L1GlobalTriggerGTL::run().

◆ setCombinationVector()

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

Definition at line 62 of file L1GlobalTriggerObjectMap.h.

62  {
63  m_combinationVector = combinationVectorValue;
64  }

References m_combinationVector.

◆ setObjectTypeVector()

void L1GlobalTriggerObjectMap::setObjectTypeVector ( const std::vector< ObjectTypeInCond > &  objectTypeVectorValue)
inline

Definition at line 83 of file L1GlobalTriggerObjectMap.h.

83  {
84  m_objectTypeVector = objectTypeVectorValue;
85  }

References m_objectTypeVector.

◆ setOperandTokenVector()

void L1GlobalTriggerObjectMap::setOperandTokenVector ( const std::vector< L1GtLogicParser::OperandToken > &  operandTokenVectorValue)
inline

Definition at line 73 of file L1GlobalTriggerObjectMap.h.

73  {
74  m_operandTokenVector = operandTokenVectorValue;
75  }

References m_operandTokenVector.

◆ swapCombinationVector()

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

Definition at line 65 of file L1GlobalTriggerObjectMap.h.

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

References m_combinationVector.

Referenced by L1GlobalTriggerGTL::run().

◆ swapObjectTypeVector()

void L1GlobalTriggerObjectMap::swapObjectTypeVector ( std::vector< ObjectTypeInCond > &  objectTypeVectorValue)
inline

Definition at line 86 of file L1GlobalTriggerObjectMap.h.

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

References m_objectTypeVector.

◆ swapOperandTokenVector()

void L1GlobalTriggerObjectMap::swapOperandTokenVector ( std::vector< L1GtLogicParser::OperandToken > &  operandTokenVectorValue)
inline

Definition at line 76 of file L1GlobalTriggerObjectMap.h.

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

References m_operandTokenVector.

Referenced by L1GlobalTriggerGTL::run().

Member Data Documentation

◆ m_algoBitNumber

int L1GlobalTriggerObjectMap::m_algoBitNumber
private

Definition at line 112 of file L1GlobalTriggerObjectMap.h.

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

◆ m_algoGtlResult

bool L1GlobalTriggerObjectMap::m_algoGtlResult
private

Definition at line 115 of file L1GlobalTriggerObjectMap.h.

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

◆ m_algoName

std::string L1GlobalTriggerObjectMap::m_algoName
private

Definition at line 109 of file L1GlobalTriggerObjectMap.h.

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

◆ m_combinationVector

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

◆ m_objectTypeVector

std::vector<ObjectTypeInCond> L1GlobalTriggerObjectMap::m_objectTypeVector
private

◆ m_operandTokenVector

std::vector<L1GtLogicParser::OperandToken> L1GlobalTriggerObjectMap::m_operandTokenVector
private

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

Definition at line 119 of file L1GlobalTriggerObjectMap.h.

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

mps_fire.i
i
Definition: mps_fire.py:355
L1GlobalTriggerObjectMap::m_algoBitNumber
int m_algoBitNumber
Definition: L1GlobalTriggerObjectMap.h:112
filterCSVwithJSON.copy
copy
Definition: filterCSVwithJSON.py:36
L1GlobalTriggerObjectMap::m_objectTypeVector
std::vector< ObjectTypeInCond > m_objectTypeVector
Definition: L1GlobalTriggerObjectMap.h:125
L1GlobalTriggerObjectMap::m_algoGtlResult
bool m_algoGtlResult
Definition: L1GlobalTriggerObjectMap.h:115
L1GlobalTriggerObjectMap::m_combinationVector
std::vector< CombinationsInCond > m_combinationVector
Definition: L1GlobalTriggerObjectMap.h:122
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::LogError
Definition: MessageLogger.h:183
L1GlobalTriggerObjectMap::m_algoName
std::string m_algoName
Definition: L1GlobalTriggerObjectMap.h:109
L1GlobalTriggerObjectMap::m_operandTokenVector
std::vector< L1GtLogicParser::OperandToken > m_operandTokenVector
Definition: L1GlobalTriggerObjectMap.h:119