20 : m_maxBxWindow{3}, m_debug{
false} {
21 m_ptr_rpcGeom = &rpcGeom;
24 m_lbin = std::make_unique<RBCLinkBoardGLSignal>(&m_data);
49 std::cout <<
"looping over digis 1 ..." << std::endl;
51 auto digiItr = detUnit.second.first;
52 int bx = (*digiItr).bx();
56 std::cout <<
"RBCProcessRPCDigis> found a bx bigger than max allowed: " <<
bx << std::endl;
61 const RPCRoll* roll = dynamic_cast<const RPCRoll*>((*m_ptr_rpcGeom)->roll(
id));
65 std::cout <<
"RBCProcessRPCDigis: roll is forward" << std::endl;
74 int rollid =
id.roll();
79 digipos = 30000 + digipos;
81 digipos = 30000 + digipos;
84 digipos = 20000 + digipos;
86 digipos = 20000 + digipos;
89 std::cout <<
"Bx: " <<
bx <<
'\t' <<
"Wheel: " <<
wheel <<
'\t' <<
"Sector: " << sector <<
'\t'
90 <<
"Station: " <<
station <<
'\t' <<
"Layer: " <<
layer <<
'\t' <<
"B-Layer: " << blayer <<
'\t'
91 <<
"Roll id: " << rollid <<
'\t' <<
"Digi at: " << digipos <<
'\n';
109 (*wheelCounter).second.incrementSector(sector);
112 std::cout <<
"looping over digis 2 ..." << std::endl;
128 std::cout <<
"RBCProcessRPCDigis: DataSize: " <<
m_data.size() <<
" ndigis " << ndigis << std::endl;
131 wheelCounter.second.evalCounters();
133 wheelCounter.second.printSummary();
148 constexpr
int maxWheels = 5;
149 constexpr
int maxRbcBrds = 6;
151 dataVec.reserve(maxWheels);
152 for (
int i = 0;
i < maxWheels; ++
i) {
153 auto&
block = dataVec.emplace_back();
157 for (
int j = 0;
j < maxRbcBrds; ++
j) {
160 block.m_orsignals[
j].input_sec[0].reset();
161 block.m_orsignals[
j].input_sec[1].reset();
162 block.m_orsignals[
j].needmapping =
false;
163 block.m_orsignals[
j].hasData =
false;
168 std::cout <<
"initialize: completed" << std::endl;
173 int bx = vecData.first;
181 for (
auto&
item : vecData.second) {
182 for (
int k = 0;
k < 6; ++
k) {
183 int code = bxsign * (1000000 *
abs(
bx) + 10000 *
item.wheelIdx() + 100 *
item.m_sec1[
k] + 1 *
item.m_sec2[
k]);
186 signal->needmapping =
false;
189 m_data.emplace(code, signal);
195 std::cout <<
"builddata: completed. size of data: " <<
m_data.size() << std::endl;
203 blayer = ((_station - 1) * 2) + _layer;
205 blayer = _station + 2;
235 block.m_orsignals[
pos].hasData =
true;
241 std::cout <<
"setDigiAt completed" << std::endl;
247 std::cout <<
"Bitpos: " << bitpos << std::endl;
248 signals.set(bitpos,
true);
252 std::cout <<
"RBCProcessRPCDigis> Output starts" << std::endl;
258 std::cout <<
"RBCProcessRPCDigis> Output ends" << std::endl;