122 LogDebug(
"L1TExtCondProducer") <<
"L1TExtCondProducer::produce function called...\n";
136 std::map<std::string, unsigned int> extBitMap = gtParser.
getExternalSignals(utml1GtMenu);
142 bool TriggerRulePrefireVetoBit(
false);
148 const auto& tcdsRecord = *tcdsRecordH.
product();
150 uint64_t thisEvent = (tcdsRecord.getBXID() - 1) + tcdsRecord.getOrbitNr() * 3564ull;
152 std::vector<uint64_t> eventHistory;
153 for (
auto&& l1a : tcdsRecord.getFullL1aHistory()) {
154 eventHistory.push_back(thisEvent - ((l1a.getBXID() - 1) + l1a.getOrbitNr() * 3564ull));
158 if (eventHistory.size() < 4) {
159 edm::LogError(
"L1TExtCondProducer") <<
"Unexpectedly small L1A history from TCDSRecord";
163 if (eventHistory[0] < 3ull) {
164 edm::LogError(
"L1TExtCondProducer") <<
"Found an L1A in an impossible location?! (1 in 3)";
167 if (eventHistory[0] == 3ull)
168 TriggerRulePrefireVetoBit =
true;
171 if (eventHistory[0] < 25ull and eventHistory[1] < 25ull) {
172 edm::LogError(
"L1TExtCondProducer") <<
"Found an L1A in an impossible location?! (2 in 25)";
174 if (eventHistory[0] < 25ull and eventHistory[1] == 25ull)
175 TriggerRulePrefireVetoBit =
true;
178 if (eventHistory[0] < 100ull and eventHistory[1] < 100ull and eventHistory[2] < 100ull) {
179 edm::LogError(
"L1TExtCondProducer") <<
"Found an L1A in an impossible location?! (3 in 100)";
181 if (eventHistory[0] < 100ull and eventHistory[1] < 100ull and eventHistory[2] == 100ull)
182 TriggerRulePrefireVetoBit =
true;
185 if (eventHistory[0] < 240ull and eventHistory[1] < 240ull and eventHistory[2] < 240ull and
186 eventHistory[3] < 240ull) {
187 edm::LogError(
"L1TExtCondProducer") <<
"Found an L1A in an impossible location?! (4 in 240)";
189 if (eventHistory[0] < 240ull and eventHistory[1] < 240ull and eventHistory[2] < 240ull and
190 eventHistory[3] == 240ull)
191 TriggerRulePrefireVetoBit =
true;
232 if (TriggerRulePrefireVetoBit)
237 extCond->push_back(iBx, extCond_bx);