118 auto algoBlockIt = algoBlocks.begin();
134 for (std::size_t
idx = 0;
idx < 64 && algoBlockIt != algoBlocks.end();
idx++, algoBlockIt++) {
135 auto& [alogName, algoBlock] = *algoBlockIt;
137 idx, algoBlock.decisionBeforeBxMaskAndPrescale());
139 idx, algoBlock.decisionBeforePrescale());
141 algoBlock.decisionFinal());
146 for (std::size_t
idx = 0;
idx < 64 && algoBlockIt != algoBlocks.end();
idx++, algoBlockIt++) {
147 auto& [alogName, algoBlock] = *algoBlockIt;
149 idx, algoBlock.decisionBeforeBxMaskAndPrescale());
151 idx, algoBlock.decisionBeforePrescale());
153 algoBlock.decisionFinal());
158 for (std::size_t
idx = 0;
idx < 64 && algoBlockIt != algoBlocks.end();
idx++, algoBlockIt++) {
159 auto& [
algoName, algoBlock] = *algoBlockIt;
161 idx, algoBlock.decisionBeforeBxMaskAndPrescale());
163 idx, algoBlock.decisionBeforePrescale());
165 idx, algoBlock.decisionFinal());
169 bool vetoed =
false, vetoedPreview =
false;
170 int finOrByTypes = 0, finOrPreviewByTypes = 0;
171 for (
auto algoBlockIt = algoBlocks.begin(); algoBlockIt != algoBlocks.end(); algoBlockIt++) {
172 auto& [alogName, algoBlock] = *algoBlockIt;
173 vetoed |= (algoBlock.isVeto() && algoBlock.decisionFinal());
174 vetoedPreview |= (algoBlock.isVeto() && algoBlock.decisionFinalPreview());
175 finOrByTypes |= algoBlock.decisionFinal() ? algoBlock.triggerTypes() : 0;
176 finOrPreviewByTypes |= algoBlock.decisionFinalPreview() ? algoBlock.triggerTypes() : 0;
180 ap_uint<64> finOrBits(0);
181 finOrBits(7, 0) = finOrByTypes;
182 finOrBits(15, 8) = finOrPreviewByTypes;
183 finOrBits(23, 16) = vetoed ? 0 : finOrByTypes;
184 finOrBits(31, 24) = vetoedPreview ? 0 : finOrPreviewByTypes;
std::map< l1t::demo::LinkId, std::vector< ap_uint< 64 > > > linkData_
Logical ID for link within any given time slice (e.g. ["tracks", 0] -> ["tracks", 17] for links from ...
void addEvent(const EventData &data)
std::map< std::string, P2GTAlgoBlock > P2GTAlgoBlockMap
const std::array< unsigned int, 3 > channelsMid_
const unsigned int maxEvents_
const edm::EDGetTokenT< P2GTAlgoBlockMap > algoBlocksToken_
unsigned int eventCounter_
const unsigned int channelFinOr_
Class representing information phase-2 ATCA I/O data corresponding to a single event, with logical channel IDs (essentially string-uint pairs, e.g. tracks-0 to tracks-17).
const std::array< unsigned int, 3 > channelsHigh_
const std::array< unsigned int, 3 > channelsLow_
l1t::demo::BoardDataWriter boardDataWriter_