24 bool errorOnXtal(
false);
26 const uint16_t *xData_ =
reinterpret_cast<const uint16_t *
>(
data_);
33 if (!
zs_ && (expStripID != stripId || expXtalID != xtalId)) {
36 <<
" and tower " <<
towerId_ <<
"\n The expected strip is " << expStripID
37 <<
" and " << stripId <<
" was found" 38 <<
"\n The expected xtal is " << expXtalID <<
" and " << xtalId
43 (*invalidChIds_)->push_back(*
pDetId_);
65 if (stripId == 0 || stripId > 5 || xtalId == 0 || xtalId > 5) {
69 <<
"\n Invalid strip : " << stripId <<
" or xtal : " << xtalId <<
" ids ( last strip was: " <<
lastStripId_ 104 <<
"Xtal id was expected to increase but it didn't - last valid xtal id was " <<
lastXtalId_ 140 bool addedFrame =
false;
148 (*digis_)->push_back(*
pDetId_);
151 bool wrongGain(
false);
166 bool isSaturation(
true);
173 short firstGainZeroSampID(-1);
174 short firstGainZeroSampADC(-1);
176 if (
df.sample(
s).gainId() == 0 && firstGainZeroSampID == -1) {
177 firstGainZeroSampID =
s;
178 firstGainZeroSampADC =
df.sample(
s).adc();
184 unsigned int plateauEnd =
std::min(
nTSamples_, (
unsigned int)(firstGainZeroSampID + 5));
185 for (
unsigned int s = firstGainZeroSampID;
s < plateauEnd;
s++) {
186 if (
df.sample(
s).gainId() == 0 &&
df.sample(
s).adc() == firstGainZeroSampADC) {
189 isSaturation =
false;
194 if (firstGainZeroSampID < 3) {
195 isSaturation =
false;
200 edm::LogWarning(
"IncorrectGain") <<
"Gain zero" << (isSaturation ?
" with features of saturation" :
"")
201 <<
" was found in Tower Block" 204 <<
" xtal " << xtalId <<
")";
209 (*invalidGains_)->push_back(*
pDetId_);
210 (*digis_)->pop_back();
229 bool gainSwitchError =
false;
233 gainSwitchError =
true;
240 if (gainSwitchError) {
242 edm::LogWarning(
"IncorrectGain") <<
"A wrong gain transition switch was found for Tower Block in strip " 243 << stripId <<
" and xtal " << xtalId <<
" (L1A " <<
event_->
l1A() <<
" bx " 248 (*invalidGainsSwitch_)->push_back(*
pDetId_);
253 if (errorOnXtal && addedFrame) {
254 (*digis_)->pop_back();
268 (*errorColection)->push_back(*eleTp);
273 <<
" 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_
uint16_t getChannelValue(const DetId &id) const
void updateCollectors() override
static std::atomic< bool > silentMode_
std::pair< unsigned int, unsigned int > unpack(cond::Time_t since)
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_
Log< level::Warning, false > LogWarning
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()