125 LogDebug(
"L1TExtCondProducer") <<
"L1TExtCondProducer::produce function called...\n";
138 std::map<std::string, unsigned int> extBitMap = gtParser.
getExternalSignals(utml1GtMenu);
144 bool TriggerRulePrefireVetoBit(
false);
150 const auto& tcdsRecord = *tcdsRecordH.
product();
152 uint64_t thisEvent = (tcdsRecord.getBXID() - 1) + tcdsRecord.getOrbitNr() * 3564ull;
154 std::vector<uint64_t> eventHistory;
155 for (
auto&& l1a : tcdsRecord.getFullL1aHistory()) {
156 eventHistory.push_back(thisEvent - ((l1a.getBXID() - 1) + l1a.getOrbitNr() * 3564ull));
160 if (eventHistory.size() < 4) {
161 edm::LogError(
"L1TExtCondProducer") <<
"Unexpectedly small L1A history from TCDSRecord";
165 if (eventHistory[0] < 3ull) {
166 edm::LogError(
"L1TExtCondProducer") <<
"Found an L1A in an impossible location?! (1 in 3)";
169 if (eventHistory[0] == 3ull)
170 TriggerRulePrefireVetoBit =
true;
173 if (eventHistory[0] < 25ull and eventHistory[1] < 25ull) {
174 edm::LogError(
"L1TExtCondProducer") <<
"Found an L1A in an impossible location?! (2 in 25)";
176 if (eventHistory[0] < 25ull and eventHistory[1] == 25ull)
177 TriggerRulePrefireVetoBit =
true;
180 if (eventHistory[0] < 100ull and eventHistory[1] < 100ull and eventHistory[2] < 100ull) {
181 edm::LogError(
"L1TExtCondProducer") <<
"Found an L1A in an impossible location?! (3 in 100)";
183 if (eventHistory[0] < 100ull and eventHistory[1] < 100ull and eventHistory[2] == 100ull)
184 TriggerRulePrefireVetoBit =
true;
187 if (eventHistory[0] < 240ull and eventHistory[1] < 240ull and eventHistory[2] < 240ull and
188 eventHistory[3] < 240ull) {
189 edm::LogError(
"L1TExtCondProducer") <<
"Found an L1A in an impossible location?! (4 in 240)";
191 if (eventHistory[0] < 240ull and eventHistory[1] < 240ull and eventHistory[2] < 240ull and
192 eventHistory[3] == 240ull)
193 TriggerRulePrefireVetoBit =
true;
234 if (TriggerRulePrefireVetoBit)
239 extCond->push_back(iBx, extCond_bx);