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();
225 bool gainSwitchError =
false;
233 if (gainSwitchError) {
236 <<
"A wrong gain transition switch was found for Tower Block in strip " << stripId <<
" and xtal " << xtalId
240 (*invalidGainsSwitch_)->push_back(*
pDetId_);
245 if (errorOnXtal && addedFrame) {
246 (*digis_)->pop_back();
263 (*errorColection)->push_back(*eleTp);
267 <<
"For event "<<
event_->
l1A()<<
" there's fed: "<< activeDCC
269 <<
" but that activeDcc is not valid in EB.";
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_
virtual void updateCollectors()
static std::atomic< bool > silentMode_
int unpackXtalData(unsigned int stripID, unsigned int xtalID)
uint16_t getChannelValue(const DetId &id) const
std::unique_ptr< EBDetIdCollection > * invalidGainsSwitchCollection()
std::unique_ptr< EBDetIdCollection > * invalidChIdsCollection()
unsigned int lastStripId_
DCCDataUnpacker * unpacker_
std::unique_ptr< EBDetIdCollection > * invalidGains_
char data[epos_bytes_allocation]
unsigned int numbDWInXtalBlock_
std::unique_ptr< EBDigiCollection > * digis_
void fillEcalElectronicsError(std::unique_ptr< EcalElectronicsIdCollection > *)
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()