45 Registry(uint32_t aDetid, uint16_t firstStrip,
size_t indexInVector, uint16_t numberOfDigis)
73 produces<edm::DetSetVector<Phase2TrackerDigi>>(
"ProcessedRaw");
89 event.getByToken(
token_, buffers);
95 if (fed.
size() != 0) {
101 std::ostringstream
ss;
102 ss <<
" -------------------------------------------- " << endl;
103 ss <<
" buffer debug ------------------------------- " << endl;
104 ss <<
" -------------------------------------------- " << endl;
105 ss <<
" buffer size : " <<
buffer->bufferSize() << endl;
107 ss <<
" -------------------------------------------- " << endl;
108 ss <<
" tracker header debug ------------------------" << endl;
109 ss <<
" -------------------------------------------- " << endl;
110 LogTrace(
"Phase2TrackerDigiProducer") <<
ss.str();
116 ss <<
" Mode : " << hex << setw(2) << tr_header.
getDebugMode() << endl;
118 ss <<
" Readout : " << hex << setw(2) << tr_header.
getReadoutMode() << endl;
119 ss <<
" Condition Data : " << (tr_header.
getConditionData() ?
"Present" :
"Absent") <<
"\n";
120 ss <<
" Data Type : " << (tr_header.
getDataType() ?
"Real" :
"Fake") <<
"\n";
123 for (
int i = 15;
i >= 0;
i--) {
132 ss <<
" CBC stat : ";
137 LogTrace(
"Phase2TrackerDigiProducer") <<
ss.str();
140 ss <<
" -------------------------------------------- " << endl;
141 ss <<
" Payload ----------------------------------- " << endl;
142 ss <<
" -------------------------------------------- " << endl;
150 if (channel.
length() > 0) {
153 uint32_t detid =
mod.getDetid();
155 ss <<
dec <<
" id from cabling : " << detid << endl;
156 ss <<
dec <<
" reading channel : " << icbc <<
" on FE " << ife;
161 std::vector<Phase2TrackerDigi> stripsTop;
162 std::vector<Phase2TrackerDigi> stripsBottom;
174 stripsBottom.push_back(
189 LogTrace(
"Phase2TrackerDigiProducer") <<
ss.str();
209 std::vector<edm::DetSet<Phase2TrackerDigi>> sorted_and_merged;
216 std::vector<Phase2TrackerDigi>& digis = sorted_and_merged.back().data;
218 size_t len = it->length;
219 for (it2 = it + 1; (it2 != end) && (it2->detid == it->detid); ++it2) {
225 for (it2 = it + 0; (it2 != end) && (it2->detid == it->detid); ++it2) {
232 pr->swap(proc_raw_dsv);
static const char runNumber_[]
const Phase2TrackerCabling * cabling_
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
uint8_t stripIndex() const
uint32_t detid
public data members
size_t size() const
Lenght of the data buffer in bytes.
static const uint16_t CMS_FED_ID_MAX
void fedIndex(uint32_t aFedIndex, uint16_t &aFedId, uint16_t &aFedChannel)
std::unique_ptr< T, impl::DeviceDeleter > unique_ptr
edm::EDGetTokenT< FEDRawDataCollection > token_
Phase2Tracker::Phase2TrackerDigiProducer Phase2TrackerDigiProducer
void produce(edm::Event &, const edm::EventSetup &) override
static const int MAX_CBC_PER_FE
std::vector< Phase2TrackerDigi > proc_work_digis_
#define DEFINE_FWK_MODULE(type)
const Phase2TrackerModule & findFedCh(std::pair< unsigned int, unsigned int > fedch) const
std::vector< Registry > proc_work_registry_
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
Phase2TrackerDigiProducer(const edm::ParameterSet &pset)
constructor
void beginRun(edm::Run const &, edm::EventSetup const &) override
~Phase2TrackerDigiProducer() override=default
default constructor
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
static const int STRIPS_PER_CBC
const edm::ESGetToken< Phase2TrackerCabling, Phase2TrackerCablingRcd > ph2CablingESToken_
static const uint16_t FED_ID_MIN
T mod(const T &a, const T &b)
static const int MAX_FE_PER_FED
bool operator<(const Registry &other) const
< operator to sort registries
Registry(uint32_t aDetid, uint16_t firstStrip, size_t indexInVector, uint16_t numberOfDigis)
constructor