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_);
70 if(stripId == 0 || stripId > 5 || xtalId == 0 || xtalId > 5){
74 <<
"\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
138 bool addedFrame=
false;
145 (*digis_)->push_back(*
pDetId_);
148 bool wrongGain(
false);
154 unsigned int gain = data>>12;
160 df.setSample(
i,data);
163 bool isSaturation(
true);
171 short firstGainZeroSampID(-1);
short firstGainZeroSampADC(-1);
173 if(df.sample(
s).gainId()==0 && firstGainZeroSampID==-1)
175 firstGainZeroSampID =
s;
176 firstGainZeroSampADC = df.sample(
s).adc();
182 unsigned int plateauEnd =
std::min(nTSamples_,(
unsigned int)(firstGainZeroSampID+5));
183 for (
unsigned int s=firstGainZeroSampID;
s<plateauEnd;
s++)
185 if( df.sample(
s).gainId()==0 && df.sample(
s).adc()==firstGainZeroSampADC ) {;}
187 { isSaturation=
false;
break;}
190 if(firstGainZeroSampID<3) {isSaturation=
false; }
195 <<
"Gain zero" << (isSaturation ?
" with features of saturation" :
"" ) <<
" was found in Tower Block" 197 <<
" tower " <<
towerId_ <<
" strip " << stripId <<
" xtal " << xtalId <<
")";
203 (*invalidGains_)->push_back(*
pDetId_);
204 (*digis_)->pop_back();
224 bool gainSwitchError =
false;
232 if (gainSwitchError) {
235 <<
"A wrong gain transition switch was found for Tower Block in strip " << stripId <<
" and xtal " << xtalId
239 (*invalidGainsSwitch_)->push_back(*
pDetId_);
244 if (errorOnXtal && addedFrame) {
245 (*digis_)->pop_back();
262 (*errorColection)->push_back(*eleTp);
266 <<
"For event "<<
event_->
l1A()<<
" there's fed: "<< activeDCC
268 <<
" but that activeDcc is not valid in EB.";
void fillEcalElectronicsError(std::unique_ptr< EcalElectronicsIdCollection > *) override
unsigned int getActiveDCC()
Ecal readout channel identification [32:20] Unused (so far) [19:13] DCC id [12:6] tower [5:3] strip [...
DetId * getDetIdPointer(unsigned int feChannel, unsigned int strip, unsigned int xtal)
std::unique_ptr< EBDetIdCollection > * invalidGainsCollection()
std::unique_ptr< EBDetIdCollection > * invalidGainsSwitch_
std::unique_ptr< EBDetIdCollection > * invalidChIds_
void updateCollectors() override
static std::atomic< bool > silentMode_
uint16_t getChannelValue(const DetId &id) const
void updateCollectors() override
std::unique_ptr< EBDetIdCollection > * invalidGainsSwitchCollection()
std::unique_ptr< EBDetIdCollection > * invalidChIdsCollection()
unsigned int lastStripId_
DCCDataUnpacker * unpacker_
int unpackXtalData(unsigned int stripID, unsigned int xtalID) override
std::unique_ptr< EBDetIdCollection > * invalidGains_
char data[epos_bytes_allocation]
unsigned int numbDWInXtalBlock_
std::unique_ptr< EBDigiCollection > * digis_
EcalElectronicsMapper * mapper_
std::unique_ptr< EcalElectronicsIdCollection > * invalidZSXtalIds_
EcalElectronicsId * getTTEleIdPointer(unsigned int tccId, unsigned int tower)
DCCTowerBlock(DCCDataUnpacker *u, EcalElectronicsMapper *m, DCCEventBlock *e, bool unpack, bool forceToKeepFRdata)
unsigned int getActiveSM()
std::unique_ptr< EBDigiCollection > * ebDigisCollection()