CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Functions
L1GtDefinitions.cc File Reference
#include "CondFormats/L1TObjects/interface/L1GtDefinitions.h"
#include <cstring>
#include "FWCore/MessageLogger/interface/MessageLogger.h"

Go to the source code of this file.

Functions

std::string l1GtBoardTypeEnumToString (const L1GtBoardType &boardType)
 
L1GtBoardType l1GtBoardTypeStringToEnum (const std::string &label)
 
std::string l1GtConditionCategoryEnumToString (const L1GtConditionCategory &conditionCategory)
 
L1GtConditionCategory l1GtConditionCategoryStringToEnum (const std::string &label)
 
std::string l1GtConditionTypeEnumToString (const L1GtConditionType &conditionType)
 
L1GtConditionType l1GtConditionTypeStringToEnum (const std::string &label)
 
std::string l1GtPsbQuadEnumToString (const L1GtPsbQuad &psbQuad)
 
L1GtPsbQuad l1GtPsbQuadStringToEnum (const std::string &label)
 

Function Documentation

std::string l1GtBoardTypeEnumToString ( const L1GtBoardType boardType)

Definition at line 134 of file L1GtDefinitions.cc.

References BoardNull, and mps_fire::result.

134  {
135  char const* result = valueToKey(boardType, l1GtBoardTypeStringToEnumMap);
136  if (boardType == BoardNull) {
137  edm::LogInfo("L1GtDefinitions") << "\n BoardNull means no valid board type defined!";
138  }
139  if (!result) {
140  edm::LogInfo("L1GtDefinitions") << "\n '" << boardType << "' is not a recognized L1GtBoardType. "
141  << "\n Return BoardNull, which means no valid board type defined!";
142  return "BoardNull";
143  }
144  return result;
145 }
tuple result
Definition: mps_fire.py:311
Log< level::Info, false > LogInfo
L1GtBoardType l1GtBoardTypeStringToEnum ( const std::string &  label)

Definition at line 120 of file L1GtDefinitions.cc.

References BoardNull, l1t::BoardNull, and relativeConstraints::value.

120  {
121  L1GtBoardType value = keyToValue(label.c_str(), l1GtBoardTypeStringToEnumMap);
122  if (value == (L1GtBoardType)-1) {
123  edm::LogInfo("L1GtDefinitions") << "\n '" << label << "' is not a recognized L1GtBoardType. \n Return BoardNull.";
124  value = BoardNull;
125  }
126 
127  if (value == BoardNull) {
128  edm::LogInfo("L1GtDefinitions") << "\n BoardNull means no valid board type defined!";
129  }
130 
131  return value;
132 }
char const * label
Log< level::Info, false > LogInfo
L1GtBoardType
board types in GT
std::string l1GtConditionCategoryEnumToString ( const L1GtConditionCategory conditionCategory)

Definition at line 227 of file L1GtDefinitions.cc.

References CondNull, and mps_fire::result.

Referenced by L1GtHwValidation::excludedAlgoList().

227  {
228  char const* result = valueToKey(conditionCategory, l1GtConditionCategoryStringToEnumMap);
229  if (conditionCategory == CondNull)
230  edm::LogInfo("L1GtDefinitions") << "\n Return CondNull, which means no valid condition category defined!";
231 
232  if (!result) {
233  result = "CondNull";
234  edm::LogInfo("L1GtDefinitions") << "\n '" << conditionCategory << "' is not a recognized L1GtConditionCategory. "
235  << "\n Return CondNull, which means no valid condition category defined!";
236  }
237 
238  return result;
239 }
tuple result
Definition: mps_fire.py:311
Log< level::Info, false > LogInfo
L1GtConditionCategory l1GtConditionCategoryStringToEnum ( const std::string &  label)

Definition at line 209 of file L1GtDefinitions.cc.

References CondNull, l1t::CondNull, and relativeConstraints::value.

Referenced by L1GtHwValidation::L1GtHwValidation().

209  {
210  L1GtConditionCategory value = keyToValue(label.c_str(), l1GtConditionCategoryStringToEnumMap);
211  // in case of unrecognized L1GtConditionCategory, return CondNull
212  // to be dealt by the corresponding module
213  if (value == (L1GtConditionCategory)-1) {
214  edm::LogInfo("L1GtDefinitions") << "\n '" << label
215  << "' is not a recognized L1GtConditionCategory. \n Return CondNull.";
216 
217  value = CondNull;
218  }
219 
220  if (value == CondNull) {
221  edm::LogInfo("L1GtDefinitions") << "\n CondNull means no valid condition category defined!";
222  }
223 
224  return value;
225 }
char const * label
Log< level::Info, false > LogInfo
L1GtConditionCategory
condition categories
std::string l1GtConditionTypeEnumToString ( const L1GtConditionType conditionType)

Definition at line 197 of file L1GtDefinitions.cc.

References mps_fire::result, and TypeNull.

Referenced by L1GtHwValidation::excludedAlgoList().

197  {
198  const char* result = valueToKey(conditionType, l1GtConditionTypeStringToEnumMap);
199  if (conditionType == TypeNull)
200  edm::LogInfo("L1GtDefinitions") << "\n Return TypeNull, which means no valid condition type defined!";
201  if (!result) {
202  result = "TypeNull";
203  edm::LogInfo("L1GtDefinitions") << "\n '" << conditionType << "' is not a recognized L1GtConditionType. "
204  << "\n Return TypeNull, which means no valid condition type defined!";
205  }
206  return result;
207 }
tuple result
Definition: mps_fire.py:311
Log< level::Info, false > LogInfo
L1GtConditionType l1GtConditionTypeStringToEnum ( const std::string &  label)

Definition at line 178 of file L1GtDefinitions.cc.

References TypeNull, l1t::TypeNull, and relativeConstraints::value.

Referenced by L1GtHwValidation::L1GtHwValidation().

178  {
179  L1GtConditionType value = keyToValue(label.c_str(), l1GtConditionTypeStringToEnumMap);
180 
181  // in case of unrecognized L1GtConditionType, return TypeNull
182  // to be dealt by the corresponding module
183  if (value == (L1GtConditionType)-1) {
184  edm::LogInfo("L1GtDefinitions") << "\n '" << label
185  << "' is not a recognized L1GtConditionType. \n Return TypeNull.";
186 
187  value = TypeNull;
188  }
189 
190  if (value == TypeNull) {
191  edm::LogInfo("L1GtDefinitions") << "\n TypeNull means no valid condition type defined!";
192  }
193 
194  return value;
195 }
L1GtConditionType
char const * label
Log< level::Info, false > LogInfo
std::string l1GtPsbQuadEnumToString ( const L1GtPsbQuad psbQuad)

Definition at line 165 of file L1GtDefinitions.cc.

References PsbQuadNull, and mps_fire::result.

165  {
166  char const* result = valueToKey(psbQuad, l1GtPsbQuadStringToEnumMap);
167  if (psbQuad == PsbQuadNull)
168  edm::LogInfo("L1GtDefinitions") << "\n PsbQuadNull means no valid PSB quadruplet defined!";
169  if (!result) {
170  result = "PsbQuadNull";
171  edm::LogInfo("L1GtDefinitions") << "\n '" << psbQuad << "' is not a recognized L1GtPsbQuad. "
172  << "\n Return PsbQuadNull, which means no valid PSB quadruplet defined!";
173  }
174 
175  return result;
176 }
tuple result
Definition: mps_fire.py:311
Log< level::Info, false > LogInfo
L1GtPsbQuad l1GtPsbQuadStringToEnum ( const std::string &  label)

Definition at line 149 of file L1GtDefinitions.cc.

References PsbQuadNull, and relativeConstraints::value.

149  {
150  L1GtPsbQuad value = keyToValue(label.c_str(), l1GtPsbQuadStringToEnumMap);
151  // in case of unrecognized L1GtPsbQuad, return PsbQuadNull
152  // to be dealt by the corresponding module
153  if (value == (L1GtPsbQuad)-1) {
154  edm::LogInfo("L1GtDefinitions") << "\n '" << label << "' is not a recognized L1GtPsbQuad. \n Return PsbQuadNull.";
155  value = PsbQuadNull;
156  }
157 
158  if (value == PsbQuadNull) {
159  edm::LogInfo("L1GtDefinitions") << "\n PsbQuadNull means no valid PSB quadruplet defined!";
160  }
161 
162  return value;
163 }
char const * label
Log< level::Info, false > LogInfo
L1GtPsbQuad
quadruples sent to GT via PSB