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

35 {}
GlobalObjectMapRecord::~GlobalObjectMapRecord ( )
inline

destructor

Definition at line 38 of file GlobalObjectMapRecord.h.

38 {}

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 81 of file GlobalObjectMapRecord.cc.

References m_gtObjectMap.

83 {
84 
85  for (std::vector<GlobalObjectMap>::const_iterator itObj = m_gtObjectMap.begin();
86  itObj != m_gtObjectMap.end(); ++itObj) {
87 
88  if ( itObj->algoName() == algoNameVal ) {
89 
90  return itObj->getCombinationsInCond(condNameVal);
91 
92  }
93  }
94 
95  // no (algoName, condName) found, return zero pointer!
96  edm::LogError("GlobalObjectMapRecord")
97  << "\n\n ERROR: The requested \n (algorithm name, condition name) = ("
98  << algoNameVal << ", " << condNameVal
99  << ") \n does not exists in the trigger menu."
100  << "\n Returning zero pointer for getCombinationsInCond\n\n"
101  << std::endl;
102 
103  return 0;
104 
105 }
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 109 of file GlobalObjectMapRecord.cc.

References m_gtObjectMap.

111 {
112 
113  for (std::vector<GlobalObjectMap>::const_iterator itObj = m_gtObjectMap.begin();
114  itObj != m_gtObjectMap.end(); ++itObj) {
115 
116  if ( itObj->algoBitNumber() == algoBitNumberVal ) {
117  return itObj->getCombinationsInCond(condNameVal);
118  }
119  }
120 
121  // no (algoBitNumber, condName) found, return zero pointer!
122  edm::LogError("GlobalObjectMapRecord")
123  << "\n\n ERROR: The requested \n (algorithm bit number, condition name) = ("
124  << algoBitNumberVal << ", " << condNameVal
125  << ") \n does not exists in the trigger menu."
126  << "\n Returning zero pointer for getCombinationsInCond\n\n"
127  << std::endl;
128 
129  return 0;
130 
131 }
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 135 of file GlobalObjectMapRecord.cc.

References m_gtObjectMap.

137 {
138 
139  for (std::vector<GlobalObjectMap>::const_iterator itObj = m_gtObjectMap.begin();
140  itObj != m_gtObjectMap.end(); ++itObj) {
141 
142  if ( itObj->algoName() == algoNameVal ) {
143  return itObj->getConditionResult(condNameVal);
144  }
145  }
146 
147  // no (algoName, condName) found, return false!
148  edm::LogError("GlobalObjectMapRecord")
149  << "\n\n ERROR: The requested \n (algorithm name, condition name) = ("
150  << algoNameVal << ", " << condNameVal
151  << ") \n does not exists in the trigger menu."
152  << "\n Returning false for condition result! Unknown result, in fact!\n\n"
153  << std::endl;
154 
155  return false;
156 
157 }
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 161 of file GlobalObjectMapRecord.cc.

References m_gtObjectMap.

163 {
164 
165  for (std::vector<GlobalObjectMap>::const_iterator itObj = m_gtObjectMap.begin();
166  itObj != m_gtObjectMap.end(); ++itObj) {
167 
168  if ( itObj->algoBitNumber() == algoBitNumberVal ) {
169  return itObj->getConditionResult(condNameVal);
170  }
171  }
172 
173  // no (algoBitNumber, condName) found, return false!
174  edm::LogError("GlobalObjectMapRecord")
175  << "\n\n ERROR: The requested \n (algorithm bit number, condition name) = ("
176  << algoBitNumberVal << ", " << condNameVal
177  << ") \n does not exists in the trigger menu."
178  << "\n Returning false for condition result! Unknown result, in fact!\n\n"
179  << std::endl;
180 
181  return false;
182 
183 }
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 32 of file GlobalObjectMapRecord.cc.

References m_gtObjectMap.

33  {
34 
35  for (std::vector<GlobalObjectMap>::const_iterator
36  itObj = m_gtObjectMap.begin(); itObj != m_gtObjectMap.end(); ++itObj) {
37 
38  if (itObj->algoName() == algoNameVal) {
39 
40  return &((*itObj));
41  }
42 
43  }
44 
45  // no algoName found, return zero pointer!
46  edm::LogError("GlobalObjectMapRecord")
47  << "\n\n ERROR: The requested algorithm name = " << algoNameVal
48  << "\n does not exists in the trigger menu."
49  << "\n Returning zero pointer for getObjectMap\n\n" << std::endl;
50 
51  return 0;
52 
53 }
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 56 of file GlobalObjectMapRecord.cc.

References m_gtObjectMap.

57  {
58 
59  for (std::vector<GlobalObjectMap>::const_iterator
60  itObj = m_gtObjectMap.begin(); itObj != m_gtObjectMap.end(); ++itObj) {
61 
62  if (itObj->algoBitNumber() == algoBitNumberVal) {
63 
64  return &((*itObj));
65  }
66 
67  }
68 
69  // no algoBitNumberVal found, return zero pointer!
70  edm::LogError("GlobalObjectMapRecord")
71  << "\n\n ERROR: The requested algorithm with bit number = " << algoBitNumberVal
72  << "\n does not exists in the trigger menu."
73  << "\n Returning zero pointer for getObjectMap\n\n" << std::endl;
74 
75  return 0;
76 
77 }
std::vector< GlobalObjectMap > m_gtObjectMap
const std::vector<GlobalObjectMap>& GlobalObjectMapRecord::gtObjectMap ( ) const
inline

get / set the vector of object maps

Definition at line 73 of file GlobalObjectMapRecord.h.

References m_gtObjectMap.

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

Definition at line 78 of file GlobalObjectMapRecord.h.

References m_gtObjectMap.

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

Definition at line 40 of file GlobalObjectMapRecord.h.

References m_gtObjectMap.

Referenced by swap().

40  {
42  }
std::vector< GlobalObjectMap > m_gtObjectMap
void GlobalObjectMapRecord::swapGtObjectMap ( std::vector< GlobalObjectMap > &  gtObjectMapValue)
inline

Definition at line 83 of file GlobalObjectMapRecord.h.

References m_gtObjectMap.

84  {
85  m_gtObjectMap.swap(gtObjectMapValue);
86  }
std::vector< GlobalObjectMap > m_gtObjectMap

Member Data Documentation

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