19 if (debug_)
cout <<
"enter in StartEvent. header_ size is " << header_.size() << endl;
21 if (debug_)
cout <<
"after empty : header_ size is " << header_.size() << endl;
28 if (debug_)
cout <<
"enter in SRBlockFormatter::DigiToRaw " << endl;
29 if (debug_)
print(rawdata);
35 int SRid = (dccid -1) / 3 +1;
41 int icode = 1000 * dccid + SRid;
42 if (debug_)
cout <<
"size of header_ map is " << header_.size() << endl;
44 std::map<int, int>::const_iterator it_header = header_.find(icode);
46 if ( it_header != header_.end() ) {
47 SRP_index = rawdata.
size() / 8 - Nrows_SRP;
48 if (debug_)
cout <<
"This SRid is already there." << endl;
51 if (debug_)
cout <<
"New SR Block added on Raw data " << endl;
53 SRP_index = rawdata.
size() / 8;
54 rawdata.
resize (rawdata.
size() + 8 + 8*Nrows_SRP);
55 unsigned char* ppData = rawdata.
data();
56 ppData[8*SRP_index] = SRid & 0xFF;
57 ppData[8*SRP_index+2] = bx & 0xFF;
58 ppData[8*SRP_index+3] = (bx & 0xF00)>>8;
59 ppData[8*SRP_index+3] |= 0x80;
60 ppData[8*SRP_index+4] = lv1 & 0xFF;
61 ppData[8*SRP_index+5] = (lv1 & 0xF00)>>8;
63 ppData[8*SRP_index+6] = 0;
64 ppData[8*SRP_index+7] = 0x80;
66 if (debug_)
cout <<
"Added headers and empty lines : " << endl;
67 if (debug_)
print(rawdata);
71 unsigned char* Data = rawdata.
data();
73 Data[8*
iline + 7] |= 0x80;
74 Data[8*
iline + 3] |= 0x80;
78 unsigned char* pData = rawdata.
data();
82 int nflags = pData[8*(SRP_index-1) +6] & 0x7F;
84 pData[8*(SRP_index-1) + 6] = nflags & 0x7F;
86 int jTT = (dcc_channel-1);
89 int kval = (jTT % 16) / 4;
92 if (debug_)
cout <<
"Now add SC to SRBlock " <<
dec << dcc_channel <<
" irow ival " <<
dec << irow <<
" " <<
dec << ival << endl;
93 if (debug_)
cout <<
"new data will be added at line " <<
dec << SRP_index << endl;
96 unsigned char* buff = &pData[8*SRP_index];
97 Word64* pw =
reinterpret_cast<Word64*
>(
const_cast<unsigned char*
>(buff));
98 int nbits = kval*16 + 3*ival;
106 if (debug_)
print(rawdata);
std::string print(const Track &, edm::Verbosity=edm::Concise)
Track print utility.
size_t size() const
Lenght of the data buffer in bytes.
void resize(size_t newsize)
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.