31 bool errorOnXtal(
false);
33 const uint16_t * xData_=
reinterpret_cast<const uint16_t *
>(
data_);
44 if( !
zs_ && (expStripID != stripId || expXtalID != xtalId)){
49 <<
"\n The expected strip is "<<expStripID<<
" and "<<stripId<<
" was found"
50 <<
"\n The expected xtal is "<<expXtalID <<
" and "<<xtalId<<
" was found";
71 if (stripId == 0 || stripId > 5 || xtalId == 0 || xtalId > 5) {
76 <<
"\n Invalid strip : "<<stripId<<
" or xtal : "<<xtalId
105 <<
"Xtal id was expected to increase but it didn't - last xtal id was " <<
lastXtalId_ <<
" while current xtal is " << xtalId
133 bool addedFrame=
false;
143 (*digis_)->push_back(*
pDetId_);
146 bool wrongGain(
false);
152 unsigned int gain = data>>12;
154 if(gain == 0){ wrongGain =
true; }
155 df.setSample(
i,data);
158 bool isSaturation(
true);
166 short firstGainZeroSampID(-1);
short firstGainZeroSampADC(-1);
168 if(df.sample(
s).gainId()==0 && firstGainZeroSampID==-1)
170 firstGainZeroSampID =
s;
171 firstGainZeroSampADC = df.sample(
s).adc();
177 unsigned int plateauEnd =
std::min(nTSamples_,(
unsigned int)(firstGainZeroSampID+5));
178 for (
unsigned int s=firstGainZeroSampID;
s<plateauEnd;
s++)
180 if( df.sample(
s).gainId()==0 && df.sample(
s).adc()==firstGainZeroSampADC ) {;}
182 { isSaturation=
false;
break;}
185 if(firstGainZeroSampID<3) {isSaturation=
false; }
190 <<
"Gain zero" << (isSaturation ?
" with features of saturation" :
"" ) <<
" was found in SC Block"
192 <<
" tower " <<
towerId_ <<
" strip " << stripId <<
" xtal " << xtalId <<
")";
198 (*invalidGains_)->push_back(*
pDetId_);
199 (*digis_)->pop_back();
215 short firstGainWrong=-1;
216 short numGainWrong=0;
222 if (firstGainWrong == -1) { firstGainWrong=
i;}
226 if (numGainWrong > 0) {
229 <<
"A wrong gain transition switch was found for SC Block in strip " << stripId <<
" and xtal " << xtalId
233 (*invalidGainsSwitch_)->push_back(*
pDetId_);
239 if (errorOnXtal && addedFrame) {
240 (*digis_)->pop_back();
253 <<
"An EEDetId was requested that does not exist "
257 <<
" strip " << stripId
258 <<
" xtal " << xtalId <<
")";
277 (*errorColection)->push_back(*eleTp);
281 <<
"For event "<<
event_->
l1A()<<
" there's fed: "<< activeDCC
283 <<
" but that activeDcc is not valid in EE.";
std::unique_ptr< EEDigiCollection > * eeDigisCollection()
std::unique_ptr< EEDetIdCollection > * invalidEEChIdsCollection()
unsigned int getActiveDCC()
std::unique_ptr< EEDetIdCollection > * invalidGainsSwitch_
Ecal readout channel identification [32:20] Unused (so far) [19:13] DCC id [12:6] tower [5:3] strip [...
void fillEcalElectronicsError(std::unique_ptr< EcalElectronicsIdCollection > *)
EcalElectronicsId * getSCElectronicsPointer(unsigned int smId, unsigned int feChannel)
DetId * getDetIdPointer(unsigned int feChannel, unsigned int strip, unsigned int xtal)
std::unique_ptr< EEDetIdCollection > * invalidEEGainsSwitchCollection()
virtual void updateCollectors()
static std::atomic< bool > silentMode_
int unpackXtalData(unsigned int stripID, unsigned int xtalID)
uint16_t getChannelValue(const DetId &id) const
DCCSCBlock(DCCDataUnpacker *u, EcalElectronicsMapper *m, DCCEventBlock *e, bool unpack, bool forceToKeepFRdata)
std::unique_ptr< EEDetIdCollection > * invalidEEGainsCollection()
std::unique_ptr< EEDetIdCollection > * invalidChIds_
bool isGhost(const int FED, const int CCU, const int VFE)
std::unique_ptr< EEDetIdCollection > * invalidGains_
unsigned int lastStripId_
DCCDataUnpacker * unpacker_
char data[epos_bytes_allocation]
unsigned int numbDWInXtalBlock_
EcalElectronicsMapper * mapper_
std::unique_ptr< EcalElectronicsIdCollection > * invalidZSXtalIds_
unsigned int getActiveSM()
std::unique_ptr< EEDigiCollection > * digis_