19 #include <ext/algorithm>
26 :
runNumber_(0), cabling_(nullptr), cacheId_(0) {
28 produces<edm::DetSetVector<Phase2TrackerDigi>>(
"ProcessedRaw");
52 event.getByToken(
token_, buffers);
58 if (fed.
size() != 0) {
64 std::ostringstream
ss;
65 ss <<
" -------------------------------------------- " << endl;
66 ss <<
" buffer debug ------------------------------- " << endl;
67 ss <<
" -------------------------------------------- " << endl;
68 ss <<
" buffer size : " <<
buffer->bufferSize() << endl;
69 ss <<
" fed id : " << fedIndex << endl;
70 ss <<
" -------------------------------------------- " << endl;
71 ss <<
" tracker header debug ------------------------" << endl;
72 ss <<
" -------------------------------------------- " << endl;
73 LogTrace(
"Phase2TrackerDigiProducer") <<
ss.str();
79 ss <<
" Mode : " << hex << setw(2) << tr_header.
getDebugMode() << endl;
82 ss <<
" Condition Data : " << (tr_header.
getConditionData() ?
"Present" :
"Absent") <<
"\n";
83 ss <<
" Data Type : " << (tr_header.
getDataType() ?
"Real" :
"Fake") <<
"\n";
86 for (
int i = 15;
i >= 0;
i--) {
100 LogTrace(
"Phase2TrackerDigiProducer") <<
ss.str();
103 ss <<
" -------------------------------------------- " << endl;
104 ss <<
" Payload ----------------------------------- " << endl;
105 ss <<
" -------------------------------------------- " << endl;
113 if (channel.
length() > 0) {
116 uint32_t detid =
mod.getDetid();
118 ss <<
dec <<
" id from cabling : " << detid << endl;
119 ss <<
dec <<
" reading channel : " << icbc <<
" on FE " << ife;
124 std::vector<Phase2TrackerDigi> stripsTop;
125 std::vector<Phase2TrackerDigi> stripsBottom;
137 stripsBottom.push_back(
152 LogTrace(
"Phase2TrackerDigiProducer") <<
ss.str();
172 std::vector<edm::DetSet<Phase2TrackerDigi>> sorted_and_merged;
179 std::vector<Phase2TrackerDigi>& digis = sorted_and_merged.back().data;
181 size_t len = it->length;
182 for (it2 = it + 1; (it2 !=
end) && (it2->detid == it->detid); ++it2) {
188 for (it2 = it + 0; (it2 !=
end) && (it2->detid == it->detid); ++it2) {
195 pr->swap(proc_raw_dsv);