CMS 3D CMS Logo

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

#include <GlobalObjectMapRecord.h>

Public Member Functions

const CombinationsInCondgetCombinationsInCond (const int algoBitNumberVal, const std::string &condNameVal) const
 
const CombinationsInCondgetCombinationsInCond (const std::string &algoNameVal, const std::string &condNameVal) const
 
bool getConditionResult (const int algoBitNumberVal, const std::string &condNameVal) const
 
bool getConditionResult (const std::string &algoNameVal, const std::string &condNameVal) const
 
const GlobalObjectMapgetObjectMap (const int algoBitNumberVal) const
 return the object map for the algorithm with bit number const int algoBitNumberVal More...
 
const GlobalObjectMapgetObjectMap (const std::string &algoNameVal) const
 return the object map for the algorithm algoNameVal More...
 
 GlobalObjectMapRecord ()
 constructor(s) More...
 
const std::vector< GlobalObjectMap > & gtObjectMap () const
 get / set the vector of object maps More...
 
void setGtObjectMap (const std::vector< GlobalObjectMap > &gtObjectMapValue)
 
void swap (GlobalObjectMapRecord &rh)
 
void swapGtObjectMap (std::vector< GlobalObjectMap > &gtObjectMapValue)
 
 ~GlobalObjectMapRecord ()
 destructor More...
 

Private Attributes

std::vector< GlobalObjectMapm_gtObjectMap
 

Detailed Description

Description: map trigger objects to algorithms and conditions.

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 29 of file GlobalObjectMapRecord.h.

Constructor & Destructor Documentation

◆ GlobalObjectMapRecord()

GlobalObjectMapRecord::GlobalObjectMapRecord ( )
inline

constructor(s)

Definition at line 32 of file GlobalObjectMapRecord.h.

32 {}

◆ ~GlobalObjectMapRecord()

GlobalObjectMapRecord::~GlobalObjectMapRecord ( )
inline

destructor

Definition at line 35 of file GlobalObjectMapRecord.h.

35 {}

Member Function Documentation

◆ getCombinationsInCond() [1/2]

const CombinationsInCond * GlobalObjectMapRecord::getCombinationsInCond ( const int  algoBitNumberVal,
const std::string &  condNameVal 
) const

return all the combinations passing the requirements imposed in condition condNameVal from algorithm with bit number algoBitNumberVal

Definition at line 88 of file GlobalObjectMapRecord.cc.

89  {
90  for (std::vector<GlobalObjectMap>::const_iterator itObj = m_gtObjectMap.begin(); itObj != m_gtObjectMap.end();
91  ++itObj) {
92  if (itObj->algoBitNumber() == algoBitNumberVal) {
93  return itObj->getCombinationsInCond(condNameVal);
94  }
95  }
96 
97  // no (algoBitNumber, condName) found, return zero pointer!
98  edm::LogError("GlobalObjectMapRecord")
99  << "\n\n ERROR: The requested \n (algorithm bit number, condition name) = (" << algoBitNumberVal << ", "
100  << condNameVal << ") \n does not exists in the trigger menu."
101  << "\n Returning zero pointer for getCombinationsInCond\n\n"
102  << std::endl;
103 
104  return nullptr;
105 }

References m_gtObjectMap.

◆ getCombinationsInCond() [2/2]

const CombinationsInCond * GlobalObjectMapRecord::getCombinationsInCond ( const std::string &  algoNameVal,
const std::string &  condNameVal 
) const

return all the combinations passing the requirements imposed in condition condNameVal from algorithm with name algoNameVal

Definition at line 67 of file GlobalObjectMapRecord.cc.

68  {
69  for (std::vector<GlobalObjectMap>::const_iterator itObj = m_gtObjectMap.begin(); itObj != m_gtObjectMap.end();
70  ++itObj) {
71  if (itObj->algoName() == algoNameVal) {
72  return itObj->getCombinationsInCond(condNameVal);
73  }
74  }
75 
76  // no (algoName, condName) found, return zero pointer!
77  edm::LogError("GlobalObjectMapRecord") << "\n\n ERROR: The requested \n (algorithm name, condition name) = ("
78  << algoNameVal << ", " << condNameVal
79  << ") \n does not exists in the trigger menu."
80  << "\n Returning zero pointer for getCombinationsInCond\n\n"
81  << std::endl;
82 
83  return nullptr;
84 }

References m_gtObjectMap.

◆ getConditionResult() [1/2]

bool GlobalObjectMapRecord::getConditionResult ( const int  algoBitNumberVal,
const std::string &  condNameVal 
) const

return the result for the condition condNameVal from algorithm with bit number algoBitNumberVal

Definition at line 129 of file GlobalObjectMapRecord.cc.

129  {
130  for (std::vector<GlobalObjectMap>::const_iterator itObj = m_gtObjectMap.begin(); itObj != m_gtObjectMap.end();
131  ++itObj) {
132  if (itObj->algoBitNumber() == algoBitNumberVal) {
133  return itObj->getConditionResult(condNameVal);
134  }
135  }
136 
137  // no (algoBitNumber, condName) found, return false!
138  edm::LogError("GlobalObjectMapRecord")
139  << "\n\n ERROR: The requested \n (algorithm bit number, condition name) = (" << algoBitNumberVal << ", "
140  << condNameVal << ") \n does not exists in the trigger menu."
141  << "\n Returning false for condition result! Unknown result, in fact!\n\n"
142  << std::endl;
143 
144  return false;
145 }

References m_gtObjectMap.

◆ getConditionResult() [2/2]

bool GlobalObjectMapRecord::getConditionResult ( const std::string &  algoNameVal,
const std::string &  condNameVal 
) const

return the result for the condition condNameVal from algorithm with name algoNameVal

Definition at line 109 of file GlobalObjectMapRecord.cc.

109  {
110  for (std::vector<GlobalObjectMap>::const_iterator itObj = m_gtObjectMap.begin(); itObj != m_gtObjectMap.end();
111  ++itObj) {
112  if (itObj->algoName() == algoNameVal) {
113  return itObj->getConditionResult(condNameVal);
114  }
115  }
116 
117  // no (algoName, condName) found, return false!
118  edm::LogError("GlobalObjectMapRecord") << "\n\n ERROR: The requested \n (algorithm name, condition name) = ("
119  << algoNameVal << ", " << condNameVal
120  << ") \n does not exists in the trigger menu."
121  << "\n Returning false for condition result! Unknown result, in fact!\n\n"
122  << std::endl;
123 
124  return false;
125 }

References m_gtObjectMap.

◆ getObjectMap() [1/2]

const GlobalObjectMap * GlobalObjectMapRecord::getObjectMap ( const int  algoBitNumberVal) const

return the object map for the algorithm with bit number const int algoBitNumberVal

Definition at line 48 of file GlobalObjectMapRecord.cc.

48  {
49  for (std::vector<GlobalObjectMap>::const_iterator itObj = m_gtObjectMap.begin(); itObj != m_gtObjectMap.end();
50  ++itObj) {
51  if (itObj->algoBitNumber() == algoBitNumberVal) {
52  return &((*itObj));
53  }
54  }
55 
56  // no algoBitNumberVal found, return zero pointer!
57  edm::LogError("GlobalObjectMapRecord") << "\n\n ERROR: The requested algorithm with bit number = "
58  << algoBitNumberVal << "\n does not exists in the trigger menu."
59  << "\n Returning zero pointer for getObjectMap\n\n"
60  << std::endl;
61 
62  return nullptr;
63 }

References m_gtObjectMap.

◆ getObjectMap() [2/2]

const GlobalObjectMap * GlobalObjectMapRecord::getObjectMap ( const std::string &  algoNameVal) const

return the object map for the algorithm algoNameVal

Definition at line 30 of file GlobalObjectMapRecord.cc.

30  {
31  for (std::vector<GlobalObjectMap>::const_iterator itObj = m_gtObjectMap.begin(); itObj != m_gtObjectMap.end();
32  ++itObj) {
33  if (itObj->algoName() == algoNameVal) {
34  return &((*itObj));
35  }
36  }
37 
38  // no algoName found, return zero pointer!
39  edm::LogError("GlobalObjectMapRecord") << "\n\n ERROR: The requested algorithm name = " << algoNameVal
40  << "\n does not exists in the trigger menu."
41  << "\n Returning zero pointer for getObjectMap\n\n"
42  << std::endl;
43 
44  return nullptr;
45 }

References m_gtObjectMap.

Referenced by HLTL1TSeed::seedsL1TriggerObjectMaps().

◆ gtObjectMap()

const std::vector<GlobalObjectMap>& GlobalObjectMapRecord::gtObjectMap ( ) const
inline

get / set the vector of object maps

Definition at line 64 of file GlobalObjectMapRecord.h.

64 { return m_gtObjectMap; }

References m_gtObjectMap.

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

◆ setGtObjectMap()

void GlobalObjectMapRecord::setGtObjectMap ( const std::vector< GlobalObjectMap > &  gtObjectMapValue)
inline

Definition at line 66 of file GlobalObjectMapRecord.h.

66 { m_gtObjectMap = gtObjectMapValue; }

References m_gtObjectMap.

◆ swap()

void GlobalObjectMapRecord::swap ( GlobalObjectMapRecord rh)
inline

Definition at line 37 of file GlobalObjectMapRecord.h.

37 { m_gtObjectMap.swap(rh.m_gtObjectMap); }

References m_gtObjectMap.

◆ swapGtObjectMap()

void GlobalObjectMapRecord::swapGtObjectMap ( std::vector< GlobalObjectMap > &  gtObjectMapValue)
inline

Definition at line 68 of file GlobalObjectMapRecord.h.

68 { m_gtObjectMap.swap(gtObjectMapValue); }

References m_gtObjectMap.

Member Data Documentation

◆ m_gtObjectMap

std::vector<GlobalObjectMap> GlobalObjectMapRecord::m_gtObjectMap
private
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
GlobalObjectMapRecord::m_gtObjectMap
std::vector< GlobalObjectMap > m_gtObjectMap
Definition: GlobalObjectMapRecord.h:71