19 #include <ext/algorithm> 31 produces< edm::DetSetVector<Phase2TrackerDigi> >(
"ProcessedRaw");
63 event.getByToken(
token_, buffers );
77 std::ostringstream ss;
78 ss <<
" -------------------------------------------- " << endl;
79 ss <<
" buffer debug ------------------------------- " << endl;
80 ss <<
" -------------------------------------------- " << endl;
81 ss <<
" buffer size : " << buffer->
bufferSize() << endl;
82 ss <<
" fed id : " << fedIndex << endl;
83 ss <<
" -------------------------------------------- " << endl;
84 ss <<
" tracker header debug ------------------------" << endl;
85 ss <<
" -------------------------------------------- " << endl;
86 LogTrace(
"Phase2TrackerDigiProducer") << ss.str(); ss.clear(); ss.str(
"");
90 ss <<
" Mode : " << hex << setw(2) << tr_header.
getDebugMode() << endl;
91 ss <<
" Type : " << hex << setw(2) << (
int) tr_header.
getEventType() << endl;
92 ss <<
" Readout : " << hex << setw(2) << tr_header.
getReadoutMode() << endl;
93 ss <<
" Condition Data : " << ( tr_header.
getConditionData() ?
"Present" :
"Absent") <<
"\n";
94 ss <<
" Data Type : " << ( tr_header.
getDataType() ?
"Real" :
"Fake" ) <<
"\n";
97 for(
int i=15;
i>=0;
i--)
109 ss <<
" Nr CBC : " << hex << setw(16)<< (
int) tr_header.
getNumberOfCBC() << endl;
110 ss <<
" CBC stat : ";
113 ss << hex << setw(2) << (
int) tr_header.
CBCStatus()[
i] <<
" ";
116 LogTrace(
"Phase2TrackerDigiProducer") << ss.str(); ss.clear(); ss.str(
"");
117 ss <<
" -------------------------------------------- " << endl;
118 ss <<
" Payload ----------------------------------- " << endl;
119 ss <<
" -------------------------------------------- " << endl;
135 ss <<
dec <<
" id from cabling : " << detid << endl;
136 ss <<
dec <<
" reading channel : " << icbc <<
" on FE " << ife;
137 ss <<
dec <<
" with length : " << (
int) channel.
length() << endl;
141 std::vector<Phase2TrackerDigi> stripsTop;
142 std::vector<Phase2TrackerDigi> stripsBottom;
175 LogTrace(
"Phase2TrackerDigiProducer") << ss.str(); ss.clear(); ss.str(
"");
192 std::vector< edm::DetSet<Phase2TrackerDigi> > sorted_and_merged;
200 std::vector<Phase2TrackerDigi> & digis = sorted_and_merged.back().data;
202 size_t len = it->length;
203 for (it2 = it+1; (it2 !=
end) && (it2->detid == it->detid); ++it2) { len += it2->length; }
207 for (it2 = it+0; (it2 !=
end) && (it2->detid == it->detid); ++it2)
215 pr->
swap( proc_raw_dsv );
static const char runNumber_[]
const Phase2TrackerCabling * cabling_
T getParameter(std::string const &) const
const Phase2TrackerFEDChannel & channel(const uint8_t internalPhase2TrackerFEDChannelNum) const
const Phase2TrackerModule & findFedCh(std::pair< unsigned int, unsigned int > fedch) const
~Phase2TrackerDigiProducer()
default constructor
size_t bufferSize() const
static const uint16_t CMS_FED_ID_MAX
edm::EDGetTokenT< FEDRawDataCollection > token_
void swap(DetSetVector &other)
size_t size() const
Lenght of the data buffer in bytes.
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
virtual void produce(edm::Event &, const edm::EventSetup &) override
uint32_t getDetid() const
static const int MAX_CBC_PER_FE
std::vector< Phase2TrackerDigi > proc_work_digis_
uint8_t stripIndex() const
std::vector< Registry > proc_work_registry_
virtual void beginJob() override
Phase2TrackerDigiProducer(const edm::ParameterSet &pset)
constructor
virtual void beginRun(edm::Run const &, edm::EventSetup const &) override
virtual void endJob() override
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
static const int STRIPS_PER_CBC
static const uint16_t FED_ID_MIN
Phase2TrackerFEDHeader trackerHeader() const
T mod(const T &a, const T &b)
static const int MAX_FE_PER_FED
T const * product() const