16 #include <Event/Event.h>
17 #include <Event/EventTypes.h>
18 #include <Event/Eventiterator.h>
19 #include <Event/fileEventiterator.h>
66 std::cout <<
"Fetching next Event" << evt->
getEvtSequence() << std::endl;
85 for (
int i = 0;
i < npackets;
i++)
95 std::cout <<
"Number of feeid in RCDAQ events: " << num_feeId <<
" for packet "
100 for (
int i_fee{0}; i_fee < num_feeId; ++i_fee)
105 auto num_strobes =
plist[
i]->
iValue(feeId,
"NR_STROBES");
106 auto num_L1Trgs =
plist[
i]->
iValue(feeId,
"NR_PHYS_TRG");
107 for (
int iL1 = 0; iL1 < num_L1Trgs; ++iL1)
109 auto l1Trg_bco =
plist[
i]->
lValue(feeId, iL1,
"L1_IR_BCO");
115 for (
int i_strb{0}; i_strb < num_strobes; ++i_strb)
117 auto strb_bco =
plist[
i]->
lValue(feeId, i_strb,
"TRG_IR_BCO");
118 auto strb_bc =
plist[
i]->
iValue(feeId, i_strb,
"TRG_IR_BC");
119 auto num_hits =
plist[
i]->
iValue(feeId, i_strb,
"TRG_NR_HITS");
122 std::cout <<
"evtno: " << EventSequence <<
", Fee: " << feeId;
123 std::cout <<
" Layer: " << link.layer <<
" Stave: " << link.stave;
124 std::cout <<
" GBT: " << link.gbtid <<
", bco: 0x" << std::hex << strb_bco << std::dec;
125 std::cout <<
", n_hits: " << num_hits << std::endl;
127 for (
int i_hit{0}; i_hit < num_hits; ++i_hit)
129 auto chip_bc =
plist[
i]->
iValue(feeId, i_strb, i_hit,
"HIT_BC");
130 auto chip_id =
plist[
i]->
iValue(feeId, i_strb, i_hit,
"HIT_CHIP_ID");
131 auto chip_row =
plist[
i]->
iValue(feeId, i_strb, i_hit,
"HIT_ROW");
132 auto chip_col =
plist[
i]->
iValue(feeId, i_strb, i_hit,
"HIT_COL");
179 std::cout <<
"ERROR: lv1Bco: 0x" << std::hex << lv1Bco << std::dec
180 <<
" is less than minimun strobe bco 0x" << std::hex
192 if (what ==
"ALL" || what ==
"FEE")
196 std::cout <<
"Beam clock 0x" << std::hex << bcliter.first << std::dec << std::endl;
197 for (
const auto feeiter : bcliter.second)
199 std::cout <<
"FEM: " << feeiter << std::endl;
203 if (what ==
"ALL" || what ==
"FEEBCLK")
207 std::cout <<
"FEE" << bcliter.first <<
" bclk: 0x"
208 << std::hex << bcliter.second << std::dec << std::endl;
211 if (what ==
"ALL" || what ==
"STORAGE")
215 std::cout <<
"Beam clock 0x" << std::hex << bcliter.first << std::dec << std::endl;
216 for (
const auto &feeiter : bcliter.second)
218 std::cout <<
"fee: " << feeiter->get_stave_id()
219 <<
" at " << std::hex << feeiter << std::dec << std::endl;
223 if (what ==
"ALL" || what ==
"STACK")
227 std::cout <<
"stacked bclk: 0x" << std::hex << iter << std::dec << std::endl;
230 if (what ==
"ALL" || what ==
"GET_NR_STROBES")
234 std::cout <<
"Total number of strobes for feeid: " << iter.first <<
", " << iter.second << std::endl;
241 std::vector<uint64_t> toclearbclk;
244 if (iter.first <= bclk)
246 for (
auto pktiter : iter.second)
250 toclearbclk.push_back(iter.first);
262 for (
auto iter : toclearbclk)
266 m_MvtxRawHitMap.erase(iter);
283 std::cout << iter.first <<
" my bclk 0x" << std::hex << iter.second
284 <<
" req: 0x" << bclk << std::dec << std::endl;
288 if (iter.second <= bclk)
292 std::cout <<
"FEE " << iter.first <<
" beamclock 0x" << std::hex << iter.second
293 <<
" smaller than req bclk: 0x" << bclk << std::dec << std::endl;
327 if (bcliter.second <= lowest_bclk)
364 MvtxRawEvtHeader* mvtxEH = findNode::getClass<MvtxRawEvtHeaderv1>(detNode,
"MVTXRAWEVTHEADER");
369 detNode->addNode(newNode);
372 MvtxRawHitContainer *mvtxhitcont = findNode::getClass<MvtxRawHitContainer>(detNode,
"MVTXRAWHIT");
377 detNode->addNode(newNode);