CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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 144 of file L1GtDefinitions.cc.

References BoardNull, and mps_fire::result.

144  {
145  char const *result= valueToKey(boardType, l1GtBoardTypeStringToEnumMap);
146  if (boardType == BoardNull) {
147  edm::LogInfo("L1GtDefinitions")
148  << "\n BoardNull means no valid board type defined!";
149  }
150  if (!result) {
151  edm::LogInfo("L1GtDefinitions") << "\n '" << boardType
152  << "' is not a recognized L1GtBoardType. "
153  << "\n Return BoardNull, which means no valid board type defined!";
154  return "BoardNull";
155  }
156  return result;
157 }
tuple result
Definition: mps_fire.py:95
L1GtBoardType l1GtBoardTypeStringToEnum ( const std::string &  label)

Definition at line 128 of file L1GtDefinitions.cc.

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

128  {
129  L1GtBoardType value = keyToValue(label.c_str(), l1GtBoardTypeStringToEnumMap);
130  if (value == (L1GtBoardType) - 1) {
131  edm::LogInfo("L1GtDefinitions") << "\n '" << label
132  << "' is not a recognized L1GtBoardType. \n Return BoardNull.";
133  value = BoardNull;
134  }
135 
136  if (value == BoardNull) {
137  edm::LogInfo("L1GtDefinitions")
138  << "\n BoardNull means no valid board type defined!";
139  }
140 
141  return value;
142 }
L1GtBoardType
board types in GT
std::string l1GtConditionCategoryEnumToString ( const L1GtConditionCategory conditionCategory)

Definition at line 248 of file L1GtDefinitions.cc.

References CondNull, and mps_fire::result.

Referenced by L1GtHwValidation::excludedAlgoList().

248  {
249  char const *result = valueToKey(conditionCategory, l1GtConditionCategoryStringToEnumMap);
250  if (conditionCategory == CondNull)
251  edm::LogInfo("L1GtDefinitions")
252  << "\n Return CondNull, which means no valid condition category defined!";
253 
254  if (!result) {
255  result = "CondNull";
256  edm::LogInfo("L1GtDefinitions") << "\n '" << conditionCategory
257  << "' is not a recognized L1GtConditionCategory. "
258  << "\n Return CondNull, which means no valid condition category defined!";
259  }
260 
261  return result;
262 }
tuple result
Definition: mps_fire.py:95
L1GtConditionCategory l1GtConditionCategoryStringToEnum ( const std::string &  label)

Definition at line 229 of file L1GtDefinitions.cc.

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

Referenced by L1GtHwValidation::L1GtHwValidation().

229  {
230  L1GtConditionCategory value = keyToValue(label.c_str(), l1GtConditionCategoryStringToEnumMap);
231  // in case of unrecognized L1GtConditionCategory, return CondNull
232  // to be dealt by the corresponding module
233  if (value == (L1GtConditionCategory) -1) {
234  edm::LogInfo("L1GtDefinitions") << "\n '" << label
235  << "' is not a recognized L1GtConditionCategory. \n Return CondNull.";
236 
237  value = CondNull;
238  }
239 
240  if (value == CondNull) {
241  edm::LogInfo("L1GtDefinitions")
242  << "\n CondNull means no valid condition category defined!";
243  }
244 
245  return value;
246 }
L1GtConditionCategory
condition categories
std::string l1GtConditionTypeEnumToString ( const L1GtConditionType conditionType)

Definition at line 215 of file L1GtDefinitions.cc.

References mps_fire::result, and TypeNull.

Referenced by L1GtHwValidation::excludedAlgoList().

215  {
216  const char *result = valueToKey(conditionType, l1GtConditionTypeStringToEnumMap);
217  if (conditionType == TypeNull)
218  edm::LogInfo("L1GtDefinitions")
219  << "\n Return TypeNull, which means no valid condition type defined!";
220  if (!result) {
221  result = "TypeNull";
222  edm::LogInfo("L1GtDefinitions") << "\n '" << conditionType
223  << "' is not a recognized L1GtConditionType. "
224  << "\n Return TypeNull, which means no valid condition type defined!";
225  }
226  return result;
227 }
tuple result
Definition: mps_fire.py:95
L1GtConditionType l1GtConditionTypeStringToEnum ( const std::string &  label)

Definition at line 195 of file L1GtDefinitions.cc.

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

Referenced by L1GtHwValidation::L1GtHwValidation().

195  {
196  L1GtConditionType value = keyToValue(label.c_str(), l1GtConditionTypeStringToEnumMap);
197 
198  // in case of unrecognized L1GtConditionType, return TypeNull
199  // to be dealt by the corresponding module
200  if (value == (L1GtConditionType) -1) {
201  edm::LogInfo("L1GtDefinitions") << "\n '" << label
202  << "' is not a recognized L1GtConditionType. \n Return TypeNull.";
203 
204  value = TypeNull;
205  }
206 
207  if (value == TypeNull) {
208  edm::LogInfo("L1GtDefinitions")
209  << "\n TypeNull means no valid condition type defined!";
210  }
211 
212  return value;
213 }
L1GtConditionType
std::string l1GtPsbQuadEnumToString ( const L1GtPsbQuad psbQuad)

Definition at line 180 of file L1GtDefinitions.cc.

References PsbQuadNull, and mps_fire::result.

180  {
181  char const*result = valueToKey(psbQuad, l1GtPsbQuadStringToEnumMap);
182  if (psbQuad == PsbQuadNull)
183  edm::LogInfo("L1GtDefinitions") << "\n PsbQuadNull means no valid PSB quadruplet defined!";
184  if (!result) {
185  result = "PsbQuadNull";
186  edm::LogInfo("L1GtDefinitions") << "\n '" << psbQuad
187  << "' is not a recognized L1GtPsbQuad. "
188  << "\n Return PsbQuadNull, which means no valid PSB quadruplet defined!";
189  }
190 
191  return result;
192 }
tuple result
Definition: mps_fire.py:95
L1GtPsbQuad l1GtPsbQuadStringToEnum ( const std::string &  label)

Definition at line 162 of file L1GtDefinitions.cc.

References PsbQuadNull, and relativeConstraints::value.

162  {
163  L1GtPsbQuad value = keyToValue(label.c_str(), l1GtPsbQuadStringToEnumMap);
164  // in case of unrecognized L1GtPsbQuad, return PsbQuadNull
165  // to be dealt by the corresponding module
166  if (value == -1) {
167  edm::LogInfo("L1GtDefinitions") << "\n '" << label
168  << "' is not a recognized L1GtPsbQuad. \n Return PsbQuadNull.";
169  value = PsbQuadNull;
170  }
171 
172  if (value == PsbQuadNull) {
173  edm::LogInfo("L1GtDefinitions")
174  << "\n PsbQuadNull means no valid PSB quadruplet defined!";
175  }
176 
177  return value;
178 }
L1GtPsbQuad
quadruples sent to GT via PSB