46 uint32_t
word[2] = {0, 0};
50 const uint32_t rocmsk = 0x3e00000;
51 const uint32_t chnlmsk = 0xfc000000;
53 for (
int jk = 1; jk < 9; jk++)
55 for (
int jk = 1; jk < 9; jk++)
63 for (
size_t iw = 0; iw < 2; iw++) {
65 roc = ((
word[iw] & rocmsk) >> 21);
69 if ((
chan > 4) && (
chan < 10) && (fifcnt != 2)) {
73 if ((
chan > 9) && (
chan < 14) && (fifcnt != 3)) {
77 if ((
chan > 13) && (
chan < 19) && (fifcnt != 4)) {
81 if ((
chan > 18) && (
chan < 23) && (fifcnt != 5)) {
85 if ((
chan > 22) && (
chan < 28) && (fifcnt != 6)) {
89 if ((
chan > 27) && (
chan < 32) && (fifcnt != 7)) {
93 if ((
chan > 31) && (fifcnt != 8)) {
100 gap[fifcnt] = (0x1000 + (
word[iw] & 0xff));
104 if ((
roc == 27) && ((fif2cnt + dumcnt) < 6)) {
106 dum[fifcnt] = (0x1000 + (
word[iw] & 0xff));
107 }
else if ((
roc == 27) && ((fif2cnt + dumcnt) > 6)) {
115 if (((fif2cnt + dumcnt) == 6) && (dumcnt > 0))
121 if ((gapcnt > 0) && ((dumcnt + fif2cnt) > 5))
127 }
else if ((gapcnt > 0) && ((dumcnt + fif2cnt) < 6))
135 totword = (
gap[1] & 0xff);
137 }
else if (
gap[2] > 0) {
138 totword = (
gap[2] & 0xff);
140 }
else if (dum[1] > 0) {
141 totword = (dum[1] & 0xff);
143 }
else if (dum[2] > 0) {
144 totword = (dum[2] & 0xff);
149 totword = totword | ((
gap[3] & 0xff) << 8);
151 }
else if (
gap[4] > 0) {
152 totword = totword | ((
gap[4] & 0xff) << 8);
154 }
else if (dum[3] > 0) {
155 totword = totword | ((dum[3] & 0xff) << 8);
157 }
else if (dum[4] > 0) {
158 totword = totword | ((dum[4] & 0xff) << 8);
163 totword = totword | ((
gap[5] & 0xff) << 16);
165 }
else if (
gap[6] > 0) {
166 totword = totword | ((
gap[6] & 0xff) << 16);
168 }
else if (dum[5] > 0) {
169 totword = totword | ((dum[5] & 0xff) << 16);
171 }
else if (dum[6] > 0) {
172 totword = totword | ((dum[6] & 0xff) << 16);
177 totword = totword | ((
gap[7] & 0xff) << 24);
179 }
else if (
gap[8] > 0) {
180 totword = totword | ((
gap[8] & 0xff) << 24);
182 }
else if (dum[7] > 0) {
183 totword = totword | ((dum[7] & 0xff) << 24);
185 }
else if (dum[8] > 0) {
186 totword = totword | ((dum[8] & 0xff) << 24);
196 m_fedid(
pset.getUntrackedParameter<
int>(
"fedid")),
198 m_runnumber(
pset.getUntrackedParameter<
int>(
"runNumber", -1)),
199 m_currenteventnumber(0),
200 m_currenttriggernumber(0),
201 m_eventnumber_shift(0) {
202 produces<FEDRawDataCollection>();
205 edm::LogInfo(
"") <<
"no more file to read " << std::endl;
209 edm::LogInfo(
"") <<
"now examining file " << currentfilename;
214 StorageFactory::getToModify()->enableAccounting(
true);
217 <<
" unsigned long int size = " <<
sizeof(
unsigned long int)
218 <<
"\n unsigned long size = " <<
sizeof(
unsigned long)
219 <<
"\n unsigned long long size = " <<
sizeof(
unsigned long long) <<
"\n uint32_t size = " <<
sizeof(uint32_t)
220 <<
"\n uint64_t size = " <<
sizeof(
uint64_t) << std::endl;
224 edm::LogInfo(
"PixelSLinkDataInputSource") <<
"file size " <<
size << std::endl;
227 edm::LogInfo(
"") <<
"file " << currentfilename <<
" cannot be found.";
239 if ((
m_data >> 60) != 0x5) {
242 edm::LogInfo(
"") <<
"WARNING: observed run number encoded in S-Link dump. Overwriting " 243 "run number as defined in .cfg file!!! Run number now set to " 260 buffers = std::make_unique<FEDRawDataCollection>();
263 uint32_t eventnumber = (
m_data >> 32) & 0x00ffffff;
266 std::vector<uint64_t>
buffer;
269 eventnumber = (
m_data >> 32) & 0x00ffffff;
273 <<
"**** event number = " << eventnumber <<
" global event number " <<
m_currenteventnumber <<
" data " 275 while ((
m_data >> 60) != 0x5) {
300 uint16_t fed_id = (
m_data >> 8) & 0xfff;
307 }
while ((
m_data >> 60) != 0xa);
310 auto rawData = std::make_unique<FEDRawData>(8 *
buffer.size());
312 unsigned char *dataptr =
rawData->data();
314 for (uint16_t
i = 0;
i <
buffer.size();
i++) {
317 uint32_t thetriggernumber = 0;
320 if (nfillwords > 0) {
321 LogInfo(
"") <<
"n fill words = " << nfillwords <<
", trigger numbers: " << thetriggernumber <<
"," 336 LogError(
"PixelSLinkDataInputSource")
337 <<
" error, the previous event number (" << eventnumber <<
") is LARGER than the next event number ("
Log< level::Error, false > LogError
LuminosityBlockNumber_t luminosityBlock() const
unsigned long long TimeValue_t
Log< level::Info, false > LogInfo
unsigned long long uint64_t
chan
lumi = TPaveText(lowX+0.38, lowY+0.061, lowX+0.45, lowY+0.161, "NDC") lumi.SetBorderSize( 0 ) lumi...
std::vector< std::string > fileNames(unsigned iCatalog) const
Log< level::Warning, false > LogWarning