File indexing completed on 2024-04-06 12:02:22
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018 #include "CondFormats/L1TObjects/interface/L1GtCondition.h"
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028 L1GtCondition::L1GtCondition() {
0029 m_condCategory = CondNull;
0030 m_condType = TypeNull;
0031 m_condChipNr = -1;
0032 m_condGEq = false;
0033
0034
0035 }
0036
0037
0038 L1GtCondition::L1GtCondition(const std::string& cName) {
0039 m_condName = cName;
0040
0041 m_condCategory = CondNull;
0042 m_condType = TypeNull;
0043 m_condChipNr = -1;
0044 }
0045
0046
0047 L1GtCondition::L1GtCondition(const std::string& cName,
0048 const L1GtConditionCategory& cCategory,
0049 const L1GtConditionType& cType) {
0050 m_condName = cName;
0051 m_condCategory = cCategory;
0052 m_condType = cType;
0053
0054 m_condChipNr = -1;
0055 }
0056
0057 L1GtCondition::~L1GtCondition() {
0058
0059 }
0060
0061
0062 const int L1GtCondition::nrObjects() const {
0063 switch (m_condType) {
0064 case TypeNull:
0065 case TypeExternal:
0066 case TypeCastor:
0067 case TypeBptx: {
0068 return 0;
0069 }
0070
0071 break;
0072 case Type1s: {
0073 return 1;
0074 }
0075
0076 break;
0077 case Type2s:
0078 case Type2wsc:
0079 case Type2cor: {
0080 return 2;
0081 }
0082
0083 break;
0084 case Type3s: {
0085 return 3;
0086 }
0087
0088 break;
0089 case Type4s: {
0090 return 4;
0091 }
0092
0093 break;
0094 case TypeETT:
0095 case TypeETM:
0096 case TypeHTT:
0097 case TypeHTM:
0098 case TypeJetCounts:
0099 case TypeHfBitCounts:
0100 case TypeHfRingEtSums: {
0101 return 1;
0102 }
0103
0104 break;
0105 default: {
0106
0107 return 0;
0108 } break;
0109 }
0110 }
0111
0112
0113
0114 const bool L1GtCondition::wsc() const {
0115 if (m_condType == Type2wsc) {
0116 return true;
0117 }
0118
0119 return false;
0120 }
0121
0122
0123
0124 const bool L1GtCondition::corr() const {
0125 if (m_condType == Type2cor) {
0126 return true;
0127 }
0128
0129 return false;
0130 }
0131
0132
0133 void L1GtCondition::print(std::ostream& myCout) const {
0134 myCout << "\n Condition name: " << m_condName << std::endl;
0135
0136 switch (m_condCategory) {
0137 case CondNull: {
0138 myCout << " Condition category: "
0139 << "CondNull"
0140 << " - it means not defined!" << std::endl;
0141 }
0142
0143 break;
0144 case CondMuon: {
0145 myCout << " Condition category: "
0146 << "CondMuon" << std::endl;
0147 }
0148
0149 break;
0150 case CondCalo: {
0151 myCout << " Condition category: "
0152 << "CondCalo" << std::endl;
0153 }
0154
0155 break;
0156 case CondEnergySum: {
0157 myCout << " Condition category: "
0158 << "CondEnergySum" << std::endl;
0159 }
0160
0161 break;
0162 case CondJetCounts: {
0163 myCout << " Condition category: "
0164 << "CondJetCounts" << std::endl;
0165 }
0166
0167 break;
0168 case CondCorrelation: {
0169 myCout << " Condition category: "
0170 << "CondCorrelation" << std::endl;
0171 }
0172
0173 break;
0174 case CondCastor: {
0175 myCout << " Condition category: "
0176 << "CondCastor" << std::endl;
0177 }
0178
0179 break;
0180 case CondHfBitCounts: {
0181 myCout << " Condition category: "
0182 << "CondHfBitCounts" << std::endl;
0183 }
0184
0185 break;
0186 case CondHfRingEtSums: {
0187 myCout << " Condition category: "
0188 << "CondHfRingEtSums" << std::endl;
0189 }
0190
0191 break;
0192 case CondBptx: {
0193 myCout << " Condition category: "
0194 << "CondBptx" << std::endl;
0195 }
0196
0197 break;
0198 case CondExternal: {
0199 myCout << " Condition category: "
0200 << "CondExternal" << std::endl;
0201 }
0202
0203 break;
0204 default: {
0205 myCout << " Condition category: " << m_condCategory
0206 << " - no such category defined. Check L1GtConditionCategory enum." << std::endl;
0207
0208 } break;
0209 }
0210
0211 switch (m_condType) {
0212 case TypeNull: {
0213 myCout << " Condition type: "
0214 << "TypeNull"
0215 << " - it means not defined!" << std::endl;
0216 }
0217
0218 break;
0219 case Type1s: {
0220 myCout << " Condition type: "
0221 << "Type1s" << std::endl;
0222 }
0223
0224 break;
0225 case Type2s: {
0226 myCout << " Condition type: "
0227 << "Type2s" << std::endl;
0228 }
0229
0230 break;
0231 case Type2wsc: {
0232 myCout << " Condition type: "
0233 << "Type2wsc" << std::endl;
0234 }
0235
0236 break;
0237 case Type2cor: {
0238 myCout << " Condition type: "
0239 << "Type2cor" << std::endl;
0240 }
0241
0242 break;
0243 case Type3s: {
0244 myCout << " Condition type: "
0245 << "Type3s" << std::endl;
0246 }
0247
0248 break;
0249 case Type4s: {
0250 myCout << " Condition type: "
0251 << "Type4s" << std::endl;
0252 }
0253
0254 break;
0255 case TypeETM: {
0256 myCout << " Condition type: "
0257 << "TypeETM" << std::endl;
0258 }
0259
0260 break;
0261 case TypeETT: {
0262 myCout << " Condition type: "
0263 << "TypeETT" << std::endl;
0264 }
0265
0266 break;
0267 case TypeHTT: {
0268 myCout << " Condition type: "
0269 << "TypeHTT" << std::endl;
0270 }
0271
0272 break;
0273 case TypeHTM: {
0274 myCout << " Condition type: "
0275 << "TypeHTM" << std::endl;
0276 }
0277
0278 break;
0279 case TypeJetCounts: {
0280 myCout << " Condition type: "
0281 << "TypeJetCounts" << std::endl;
0282 }
0283
0284 break;
0285 case TypeCastor: {
0286 myCout << " Condition type: "
0287 << "TypeCastor" << std::endl;
0288 }
0289
0290 break;
0291 case TypeHfBitCounts: {
0292 myCout << " Condition type: "
0293 << "TypeHfBitCounts" << std::endl;
0294 }
0295
0296 break;
0297 case TypeHfRingEtSums: {
0298 myCout << " Condition type: "
0299 << "TypeHfRingEtSums" << std::endl;
0300 }
0301
0302 break;
0303 case TypeBptx: {
0304 myCout << " Condition type: "
0305 << "TypeBptx" << std::endl;
0306 }
0307
0308 break;
0309 case TypeExternal: {
0310 myCout << " Condition type: "
0311 << "TypeExternal" << std::endl;
0312 }
0313
0314 break;
0315 default: {
0316 myCout << " Condition type: " << m_condType << " - no such type defined. Check L1GtConditionType enum."
0317 << std::endl;
0318 } break;
0319 }
0320
0321 myCout << " Object types: ";
0322
0323 for (unsigned int i = 0; i < m_objectType.size(); ++i) {
0324 switch (m_objectType[i]) {
0325 case Mu: {
0326 myCout << " Mu ";
0327 }
0328
0329 break;
0330 case NoIsoEG: {
0331 myCout << " NoIsoEG ";
0332 }
0333
0334 break;
0335 case IsoEG: {
0336 myCout << " IsoEG ";
0337 }
0338
0339 break;
0340 case CenJet: {
0341 myCout << " CenJet ";
0342 }
0343
0344 break;
0345 case ForJet: {
0346 myCout << " ForJet ";
0347 }
0348
0349 break;
0350 case TauJet: {
0351 myCout << " TauJet ";
0352 }
0353
0354 break;
0355 case ETM: {
0356 myCout << " ETM ";
0357 }
0358
0359 break;
0360 case ETT: {
0361 myCout << " ETT ";
0362 }
0363
0364 break;
0365 case HTT: {
0366 myCout << " HTT ";
0367 }
0368
0369 break;
0370 case HTM: {
0371 myCout << " HTM ";
0372 }
0373
0374 break;
0375 case JetCounts: {
0376 myCout << " JetCounts ";
0377 }
0378
0379 break;
0380 case HfBitCounts: {
0381 myCout << " HfBitCounts ";
0382 }
0383
0384 break;
0385 case HfRingEtSums: {
0386 myCout << " HfRingEtSums ";
0387 }
0388
0389 break;
0390 case BPTX: {
0391 myCout << " BPTX ";
0392 }
0393
0394 break;
0395 case GtExternal: {
0396 myCout << " GtExternal ";
0397 }
0398
0399 break;
0400 default: {
0401 myCout << " Unknown type " << m_objectType[i];
0402 } break;
0403 }
0404 }
0405
0406 myCout << std::endl;
0407
0408 myCout << " \" >= \" flag: " << m_condGEq << std::endl;
0409
0410 myCout << " Condition chip: " << m_condChipNr;
0411
0412 if (m_condChipNr < 0) {
0413 myCout << " - not properly initialized! ";
0414 }
0415
0416 myCout << std::endl;
0417 }
0418
0419
0420 std::ostream& operator<<(std::ostream& os, const L1GtCondition& result) {
0421 result.print(os);
0422 return os;
0423 }