31 bool errorOnXtal(
false);
33 const uint16_t * xData_=
reinterpret_cast<const uint16_t *
>(
data_);
40 if( !
zs_ && (expStripID != stripId || expXtalID != xtalId)){
44 <<
"\n The expected strip is "<<expStripID<<
" and "<<stripId<<
" was found"
45 <<
"\n The expected xtal is "<<expXtalID <<
" and "<<xtalId<<
" was found";
49 (*invalidChIds_)->push_back(*
pDetId_);
69 if(stripId == 0 || stripId > 5 || xtalId == 0 || xtalId > 5){
73 <<
"\n Invalid strip : "<<stripId<<
" or xtal : "<<xtalId
108 <<
"Xtal id was expected to increase but it didn't - last valid xtal id was " <<
lastXtalId_ <<
" while current xtal is " << xtalId
139 bool addedFrame=
false;
146 (*digis_)->push_back(*
pDetId_);
149 bool wrongGain(
false);
155 unsigned int gain = data>>12;
161 df.setSample(
i,data);
164 bool isSaturation(
true);
172 short firstGainZeroSampID(-1);
short firstGainZeroSampADC(-1);
174 if(df.sample(
s).gainId()==0 && firstGainZeroSampID==-1)
176 firstGainZeroSampID =
s;
177 firstGainZeroSampADC = df.sample(
s).adc();
183 unsigned int plateauEnd =
std::min(nTSamples_,(
unsigned int)(firstGainZeroSampID+5));
184 for (
unsigned int s=firstGainZeroSampID;
s<plateauEnd;
s++)
186 if( df.sample(
s).gainId()==0 && df.sample(
s).adc()==firstGainZeroSampADC ) {;}
188 { isSaturation=
false;
break;}
191 if(firstGainZeroSampID<3) {isSaturation=
false; }
196 <<
"Gain zero" << (isSaturation ?
" with features of saturation" :
"" ) <<
" was found in Tower Block"
198 <<
" tower " <<
towerId_ <<
" strip " << stripId <<
" xtal " << xtalId <<
")";
204 (*invalidGains_)->push_back(*
pDetId_);
205 (*digis_)->pop_back();
224 short firstGainWrong=-1;
225 short numGainWrong=0;
230 if (firstGainWrong == -1) { firstGainWrong=
i;}
235 if (numGainWrong > 0) {
238 <<
"A wrong gain transition switch was found for Tower Block in strip " << stripId <<
" and xtal " << xtalId
242 (*invalidGainsSwitch_)->push_back(*
pDetId_);
247 if (errorOnXtal && addedFrame) {
248 (*digis_)->pop_back();
265 (*errorColection)->push_back(*eleTp);
269 <<
"For event "<<
event_->
l1A()<<
" there's fed: "<< activeDCC
271 <<
" but that activeDcc is not valid in EB.";
std::auto_ptr< EBDetIdCollection > * invalidGainsSwitchCollection()
std::auto_ptr< EBDetIdCollection > * invalidGainsSwitch_
unsigned int getActiveDCC()
Ecal readout channel identification [32:20] Unused (so far) [19:13] DCC id [12:6] tower [5:3] strip [...
std::auto_ptr< EBDigiCollection > * digis_
std::auto_ptr< EBDetIdCollection > * invalidChIdsCollection()
DetId * getDetIdPointer(unsigned int feChannel, unsigned int strip, unsigned int xtal)
std::auto_ptr< EBDetIdCollection > * invalidGainsCollection()
virtual void updateCollectors()
int unpackXtalData(unsigned int stripID, unsigned int xtalID)
uint16_t getChannelValue(const DetId &id) const
std::auto_ptr< EcalElectronicsIdCollection > * invalidZSXtalIds_
void fillEcalElectronicsError(std::auto_ptr< EcalElectronicsIdCollection > *)
unsigned int lastStripId_
DCCDataUnpacker * unpacker_
char data[epos_bytes_allocation]
unsigned int numbDWInXtalBlock_
EcalElectronicsMapper * mapper_
EcalElectronicsId * getTTEleIdPointer(unsigned int tccId, unsigned int tower)
DCCTowerBlock(DCCDataUnpacker *u, EcalElectronicsMapper *m, DCCEventBlock *e, bool unpack, bool forceToKeepFRdata)
std::auto_ptr< EBDigiCollection > * ebDigisCollection()
unsigned int getActiveSM()
std::auto_ptr< EBDetIdCollection > * invalidChIds_
std::auto_ptr< EBDetIdCollection > * invalidGains_