129 for (
int id=0;
id < 36 + 18;
id++) {
130 if ( (!
doBarrel_) && (
id >= 9 &&
id <= 44))
continue;
131 if ( (!
doEndCap_) && (id <= 8 || id >= 45))
continue;
137 if (
find( (*plistDCCId_).begin(), (*plistDCCId_).end(), (
id+1) ) == (*plistDCCId_).end() )
144 int lastline = rawdata.
size();
145 rawdata.
resize( lastline + 8);
146 unsigned char * pData = rawdata.
data();
147 int event_length = (lastline + 8) / 8;
149 pData[lastline+7] = 0xa0;
151 pData[lastline+4] = event_length & 0xFF;
152 pData[lastline+5] = (event_length >> 8) & 0xFF;
153 pData[lastline+6] = (event_length >> 16) & 0xFF;
154 int event_status = 0;
155 pData[lastline+1] = event_status & 0x0F;
157 pData[lastline] = tts & 0xF0;
161 pData[8] = event_length & 0xFF;
162 pData[9] = (event_length >> 8) & 0xFF;
163 pData[10] = (event_length >> 16) & 0xFF;
167 map<int, map<int,int> >::iterator fen = FEDorder ->
find(FEDid);
169 bool FED_has_data =
true;
170 if (fen == FEDorder->end()) FED_has_data =
false;
171 if (
debug_ && (! FED_has_data))
cout <<
" FEDid is not in FEDorder ! " << endl;
172 if ( ! FED_has_data) {
174 for (
int iFE=1; iFE <= 68; iFE++) {
175 int irow = (iFE-1) / 14;
176 int kval = ( (iFE-1) % 14) / 2;
177 if (iFE % 2 ==1) pData[32 + 8*irow + kval] |= ch_status & 0xFF;
178 else pData[32 + 8*irow + kval] |= ((ch_status <<4) & 0xFF);
183 map<int, int>& FEorder = (*fen).second;
185 for (
int iFE=1; iFE <= 68; iFE++) {
186 map<int,int>::iterator fe = FEorder.find(iFE);
188 if (fe == FEorder.end())
190 int irow = (iFE-1) / 14;
191 int kval = ( (iFE-1) % 14) / 2;
192 if (iFE % 2 ==1) pData[32 + 8*irow + kval] |= ch_status & 0xFF;
193 else pData[32 + 8*irow + kval] |= ((ch_status <<4) & 0xFF);
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
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.