14 if (max_bx - min_bx >= 128 || min_bx < -3564) {
16 <<
"Out-of-range input for min_bx, max_bx (" << min_bx <<
": " << max_bx <<
")";
19 std::map<RPCLBLink, std::vector<RPCLBRecord> > mlb_lbrecords;
24 ; digi_range != digi_range_end ; ++digi_range) {
26 std::pair<RPCInverseLBLinkMap::map_type::const_iterator
27 , RPCInverseLBLinkMap::map_type::const_iterator> lookup_range(lb_map.getMap().equal_range(digi_range_value.first.rawId()));
30 ; digi != digi_range_value.second.second ; ++digi) {
31 if (digi->bx() < min_bx || digi->bx() > max_bx) {
35 for (RPCInverseLBLinkMap::map_type::const_iterator link_it = lookup_range.first
36 ; link_it != lookup_range.second ; ++link_it) {
37 if (link_it->second.second.hasStrip(digi->strip())) {
38 unsigned int channel(link_it->second.second.getChannel(digi->strip()));
41 mlb_link.setLinkBoard().setConnector();
43 , lb_link.getLinkBoard(),
false, 0, lb_link.getConnector()
44 , (channel > 8 ? 1 : 0), 0x01 << ((channel - 1) % 8) ));
52 for (
std::map<
RPCLBLink, std::vector<RPCLBRecord> >::iterator mlb_lbrecords_it = mlb_lbrecords.begin()
53 ; mlb_lbrecords_it != mlb_lbrecords.end() ; ++mlb_lbrecords_it) {
54 std::vector<RPCLBRecord> &
input(mlb_lbrecords_it->second);
57 std::vector<std::pair<int, RPCLBRecord> > bx_lbrecord;
58 bx_lbrecord.reserve(
input.size());
62 for (std::vector<RPCLBRecord>::const_iterator input_it =
input.begin() + 1
63 ; input_it <=
input.end() ; ++input_it) {
64 if (input_it !=
input.end()
65 && ((last_lbrecord.getRecord() & ~
RPCLBRecord::partition_data_mask_)
66 == (input_it->getRecord() & ~
RPCLBRecord::partition_data_mask_))) {
67 last_lbrecord.set(last_lbrecord.getRecord() | input_it->getRecord());
69 unsigned int last_bcn(last_lbrecord.getBCN());
73 unsigned int delay(
idx - last_bcn);
74 if (ignore_eod && delay == 8) {
77 bx_lbrecord.back().second.setEOD(
true);
78 last_lbrecord.setEOD(
true);
81 last_lbrecord.setDelay(delay);
82 last_bcn = (3564 + bcn + min_bx +
idx) % 3564;
83 last_lbrecord.setBCN(last_bcn);
84 last_lbrecord.setBC0(last_bcn == 0);
85 bx_lbrecord.push_back(std::pair<int, RPCLBRecord>(min_bx +
idx, last_lbrecord));
88 bx_lbrecord.back().second.setEOD(
true);
90 if (input_it !=
input.end()) {
91 last_lbrecord = *input_it;
97 , std::vector<std::pair<int, RPCLBRecord> > >::
value_type(mlb_lbrecords_it->first
static std::string const input
Container::value_type value_type
std::pair< IndexType, std::pair< DigiRangeIterator, DigiRangeIterator > > value_type
std::vector< RPCDigi >::const_iterator const_iterator