104 std::vector< const LVL1CTP::Lvl1Item* >
items;
105 std::vector<ROIB::CTPRoI> bitsBP =
result.cTPResult().TBP();
106 std::vector<ROIB::CTPRoI> bitsAP =
result.cTPResult().TAP();
107 std::vector<ROIB::CTPRoI> bitsAV =
result.cTPResult().TAV();
113 int ctpVersion =
result.cTPResult().header().formatVersion() & 0xf ;
114 CTPdataformatVersion
v(ctpVersion);
116 unsigned first_item = calib_flag ?
v.getMaxTrigItems()-3 : 0;
118 for (
unsigned i = first_item;
i < lvl1ItemConfig.size();
i++ ) {
119 if ( !lvl1ItemConfig[
i ] )
continue;
126 item->prescaleFactor() );
128 ATH_MSG_DEBUG(
"Set bits on "<<
item->name() <<
" PS="<<
item->prescaleFactor() <<
" BP=" <<getBit(bitsBP,
i)<<
" AP="<<getBit(bitsAP,
i)<<
" AV="<<getBit(bitsAV,
i));
133 auto lvl1Result = std::make_unique<LVL1CTP::Lvl1Result>(
true);
136 const std::vector<ROIB::CTPRoI> ctpRoIVecAV =
result.cTPResult().TAV();
137 for (
unsigned int iWord = 0; iWord < ctpRoIVecAV.size(); ++iWord) {
138 uint32_t roIWord = ctpRoIVecAV[iWord].roIWord();
139 lvl1Result->itemsAfterVeto().push_back(roIWord);
140 ATH_MSG_DEBUG(
"TAV word #" << iWord <<
" is 0x" << std::hex << std::setw( 8 ) << std::setfill(
'0' ) << roIWord << std::dec);
144 const std::vector<ROIB::CTPRoI> ctpRoIVecBP =
result.cTPResult().TBP();
145 for (
unsigned int iWord=0; iWord < ctpRoIVecBP.size(); ++iWord) {
146 uint32_t roIWord = ctpRoIVecBP[iWord].roIWord();
147 lvl1Result->itemsBeforePrescale().push_back(roIWord);
149 << std::setw( 8 ) << std::setfill(
'0' ) << roIWord << std::dec);
153 const std::vector<ROIB::CTPRoI> ctpRoIVecAP =
result.cTPResult().TAP();
154 for (
unsigned int iWord=0; iWord < ctpRoIVecAP.size(); ++iWord) {
155 uint32_t roIWord = ctpRoIVecAP[iWord].roIWord();
156 lvl1Result->itemsAfterPrescale().push_back(roIWord);
158 ATH_MSG_DEBUG(
"TAP word #" << iWord <<
" is 0x" << std::hex << std::setw( 8 ) << std::setfill(
'0' ) << roIWord << std::dec);
162 if (lvl1Result->itemsBeforePrescale().size() < 8) lvl1Result->itemsBeforePrescale().resize(8, 0);
163 if (lvl1Result->itemsAfterPrescale().size() < 8) lvl1Result->itemsAfterPrescale().resize(8, 0);
164 if (lvl1Result->itemsAfterVeto().size() < 8) lvl1Result->itemsAfterVeto().resize(8, 0);
165 *lvl1ResultOut = lvl1Result.get();