CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Attributes
GlobalObjectMapRecord Class Reference

#include <GlobalObjectMapRecord.h>

Public Member Functions

const CombinationsInCondgetCombinationsInCond (const std::string &algoNameVal, const std::string &condNameVal) const
 
const CombinationsInCondgetCombinationsInCond (const int algoBitNumberVal, const std::string &condNameVal) const
 
bool getConditionResult (const std::string &algoNameVal, const std::string &condNameVal) const
 
bool getConditionResult (const int algoBitNumberVal, const std::string &condNameVal) const
 
const GlobalObjectMapgetObjectMap (const std::string &algoNameVal) const
 return the object map for the algorithm algoNameVal More...
 
const GlobalObjectMapgetObjectMap (const int algoBitNumberVal) const
 return the object map for the algorithm with bit number const int algoBitNumberVal 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 ( )
inline

constructor(s)

Definition at line 32 of file GlobalObjectMapRecord.h.

32 {}
GlobalObjectMapRecord::~GlobalObjectMapRecord ( )
inline

destructor

Definition at line 35 of file GlobalObjectMapRecord.h.

35 {}

Member Function Documentation

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.

References m_gtObjectMap.

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 }
Log< level::Error, false > LogError
std::vector< GlobalObjectMap > m_gtObjectMap
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.

References m_gtObjectMap.

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 }
Log< level::Error, false > LogError
std::vector< GlobalObjectMap > m_gtObjectMap
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.

References m_gtObjectMap.

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 }
Log< level::Error, false > LogError
std::vector< GlobalObjectMap > m_gtObjectMap
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.

References m_gtObjectMap.

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 }
Log< level::Error, false > LogError
std::vector< GlobalObjectMap > m_gtObjectMap
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.

References m_gtObjectMap.

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 }
Log< level::Error, false > LogError
std::vector< GlobalObjectMap > m_gtObjectMap
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.

References m_gtObjectMap.

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 }
Log< level::Error, false > LogError
std::vector< GlobalObjectMap > m_gtObjectMap
const std::vector<GlobalObjectMap>& GlobalObjectMapRecord::gtObjectMap ( ) const
inline

get / set the vector of object maps

Definition at line 64 of file GlobalObjectMapRecord.h.

References m_gtObjectMap.

64 { return m_gtObjectMap; }
std::vector< GlobalObjectMap > m_gtObjectMap
void GlobalObjectMapRecord::setGtObjectMap ( const std::vector< GlobalObjectMap > &  gtObjectMapValue)
inline

Definition at line 66 of file GlobalObjectMapRecord.h.

References m_gtObjectMap.

66 { m_gtObjectMap = gtObjectMapValue; }
std::vector< GlobalObjectMap > m_gtObjectMap
void GlobalObjectMapRecord::swap ( GlobalObjectMapRecord rh)
inline

Definition at line 37 of file GlobalObjectMapRecord.h.

References m_gtObjectMap.

Referenced by swap().

37 { m_gtObjectMap.swap(rh.m_gtObjectMap); }
std::vector< GlobalObjectMap > m_gtObjectMap
void GlobalObjectMapRecord::swapGtObjectMap ( std::vector< GlobalObjectMap > &  gtObjectMapValue)
inline

Definition at line 68 of file GlobalObjectMapRecord.h.

References m_gtObjectMap.

68 { m_gtObjectMap.swap(gtObjectMapValue); }
std::vector< GlobalObjectMap > m_gtObjectMap

Member Data Documentation

std::vector<GlobalObjectMap> GlobalObjectMapRecord::m_gtObjectMap
private