21 unsigned int numbOfPnBlocks = numbOfXtalBlocks/5;
25 for(
unsigned int i =0;
i< vectorSize;
i++){
pn_.push_back(-1);}
53 <<
"\nThe end of event was reached !";
83 (*invalidMemBlockSizes_)->push_back(
id);
98 <<
"\n Only "<<((*dwToEnd_)*8)<<
" bytes are available while "<<(
blockLength_*8)<<
" are needed!";
102 (*invalidMemBlockSizes_)->push_back(
id);
115 <<
"Synchronization error for Mem block"
117 <<
" dccBx = " << dccBx <<
" bx_ = " <<
bx_ <<
" dccL1 = " << dccL1 <<
" l1_ = " <<
l1_ <<
"\n"
118 <<
" => Stop event unpacking";
143 (*invalidMemTtIds_)->push_back(
id);
190 for(
unsigned int expStripId = 1; expStripId<= 5; expStripId++){
192 for(
unsigned int expXtalId = 1; expXtalId <= 5; expXtalId++){
194 const uint16_t * xData_=
reinterpret_cast<const uint16_t *
>(
data_);
200 bool errorOnDecoding(
false);
202 if(expStripId != stripId || expXtalId != xtalId){
206 (*invalidMemChIds_)->push_back(
id);
211 <<
"\nThe expected strip is "<<expStripId<<
" and "<<stripId<<
" was found"
212 <<
"\nThe expected xtal is "<<expXtalId <<
" and "<<xtalId<<
" was found";
215 stripId = expStripId;
220 errorOnDecoding =
true;
226 unsigned int ipn,
index;
237 index = ipn*50 + (stripId-1)*nTSamples_+
i;
247 if( (stripId-1)%2 ) {
250 for(
int ib=0;ib<14;ib++){
256 }
else { sample=
temp;}
259 unsigned int gain = sample>>12;
264 (*invalidMemGains_)->push_back(
id);
269 <<
"\nIn strip "<<stripId<<
" xtal "<<xtalId<<
" the gain is "<<gain<<
" in sample "<<(
i+1);
272 errorOnDecoding=
true;
289 for (
int pnId=1; pnId<=5; pnId++){
290 bool errorOnPn(
false);
291 unsigned int realPnId = pnId;
317 <<
"\n mapper points to non existing dccid: " << activeSM;
331 if( pnDiodeData == -1){
340 if(!errorOnPn){ (*pnDiodeDigis_)->push_back(thePnDigi);}
350 o<<
"\n Unpacked Info for DCC MEM Block"
351 <<
"\n DW1 ============================="
352 <<
"\n Mem Tower Block Id "<<
towerId_
bool isSynced(const unsigned int dccBx, const unsigned int bx, const unsigned int dccL1, const unsigned int l1, const BlockType type, const unsigned int fov)
std::auto_ptr< EcalElectronicsIdCollection > * invalidMemBlockSizesCollection()
unsigned int getActiveDCC()
std::auto_ptr< EcalElectronicsIdCollection > * invalidMemChIdsCollection()
std::auto_ptr< EcalElectronicsIdCollection > * invalidMemTtIds_
unsigned int kSamplesPerPn_
Ecal readout channel identification [32:20] Unused (so far) [19:13] DCC id [12:6] tower [5:3] strip [...
unsigned int numbDWInXtalBlock_
std::auto_ptr< EcalElectronicsIdCollection > * invalidMemGains_
unsigned int lastStripId_
unsigned int expXtalTSamples_
unsigned int unfilteredTowerBlockLength_
unsigned int blockLength_
unsigned int lastTowerBeforeMem_
void setFESyncNumbers(short l1, short bx, short id)
std::auto_ptr< EcalElectronicsIdCollection > * invalidMemTtIdsCollection()
std::auto_ptr< EcalElectronicsIdCollection > * invalidMemChIds_
void display(std::ostream &o)
unsigned int numbXtalTSamples()
std::auto_ptr< EcalElectronicsIdCollection > * invalidMemGainsCollection()
unsigned long long uint64_t
void fillPnDiodeDigisCollection()
unsigned int xtalBlockSize_
DCCDataUnpacker * unpacker_
std::auto_ptr< EcalPnDiodeDigiCollection > * pnDiodeDigis_
unsigned int getUnfilteredTowerBlockLength()
char data[epos_bytes_allocation]
virtual void updateEventPointers()
void unpackMemTowerData()
std::auto_ptr< EcalPnDiodeDigiCollection > * pnDiodeDigisCollection()
DCCMemBlock(DCCDataUnpacker *u, EcalElectronicsMapper *m, DCCEventBlock *e)
EcalElectronicsMapper * mapper_
void setSample(int i, const EcalFEMSample &sam)
unsigned int getActiveSM()
std::auto_ptr< EcalElectronicsIdCollection > * invalidMemBlockSizes_
int unpack(const uint64_t **data, unsigned int *dwToEnd, unsigned int expectedTowerID)