33 dataLabel_ = consumes<RPCDigiCollection>(
pset.getParameter<
edm::InputTag>(
"InputLabel"));
35 produces<FEDRawDataCollection>();
45 if (recordWatcher_.check(es)) {
47 LogTrace(
"") <<
"record has CHANGED!!, initialise readout map!";
50 theCabling = readoutMapping->
convert();
51 LogTrace(
"") <<
" READOUT MAP VERSION: " << theCabling->version() << endl;
54 auto buffers = std::make_unique<FEDRawDataCollection>();
57 pair<int, int> rpcFEDS(790, 792);
58 for (
int id = rpcFEDS.first;
id <= rpcFEDS.second; ++
id) {
60 unsigned int lvl1_ID =
ev.id().event();
83 vector<Word64> dataWords;
85 typedef vector<EventRecords>::const_iterator IR;
86 for (IR ir = merged.begin(), irEnd = merged.end(); ir != irEnd; ++ir) {
87 Word64 w = (((
Word64(ir->recordBX().data()) << 16) | ir->recordSLD().data()) << 16 | ir->recordCD().data()) << 16 |
89 dataWords.push_back(
w);
97 int dataSize = (nHeaders + nTrailers + dataWords.size()) *
sizeof(
Word64);
103 unsigned char* pHeader = raw->
data();
105 int source_ID =
fedId;
111 for (
unsigned int idata = 0; idata < dataWords.size(); idata++) {
112 Word64*
word = reinterpret_cast<Word64*>(pHeader + (idata + 1) *
sizeof(
Word64));
113 *
word = dataWords[idata];
119 unsigned char* pTrailer = pHeader + raw->
size() -
sizeof(
Word64);
134 vector<EventRecords> dataRecords;
137 for (DigiRangeIterator it = digis->begin(); it != digis->end(); it++) {
139 uint32_t rawDetId = rpcDetId.
rawId();
141 for (vector<RPCDigi>::const_iterator
id =
range.first;
id !=
range.second;
id++) {
143 vector<EventRecords> rawFromDigi = formatter.
recordPack(rawDetId, digi, trigger_BX);
144 dataRecords.insert(dataRecords.end(), rawFromDigi.begin(), rawFromDigi.end());
151 LogTrace(
"RPCRawDataPacker") <<
" size of data: " << dataRecords.size();
152 vector<EventRecords> merged = EventRecords::mergeRecords(dataRecords);
153 LogTrace(
"") <<
" size of megred: " << merged.size();