9 :
DCCFEBlock(u, m, e, unpack, forceToKeepFRdata) {}
23 bool errorOnXtal(
false);
25 const uint16_t *xData_ =
reinterpret_cast<const uint16_t *
>(
data_);
34 if (!
zs_ && (expStripID != stripId || expXtalID != xtalId)) {
37 <<
" and tower " <<
towerId_ <<
"\n The expected strip is " << expStripID
38 <<
" and " << stripId <<
" was found"
39 <<
"\n The expected xtal is " << expXtalID <<
" and " << xtalId
46 (*invalidChIds_)->push_back(*
pDetId_);
59 if (stripId == 0 || stripId > 5 || xtalId == 0 || xtalId > 5) {
63 <<
"\n Invalid strip : " << stripId <<
" or xtal : " << xtalId <<
" ids ( last strip was: " <<
lastStripId_
95 <<
"Xtal id was expected to increase but it didn't - last xtal id was " <<
lastXtalId_
129 bool addedFrame =
false;
140 (*digis_)->push_back(*
pDetId_);
143 bool wrongGain(
false);
149 unsigned int gain = data >> 12;
154 df.setSample(
i, data);
157 bool isSaturation(
true);
164 short firstGainZeroSampID(-1);
165 short firstGainZeroSampADC(-1);
167 if (
df.sample(
s).gainId() == 0 && firstGainZeroSampID == -1) {
168 firstGainZeroSampID =
s;
169 firstGainZeroSampADC =
df.sample(
s).adc();
175 unsigned int plateauEnd =
std::min(nTSamples_, (
unsigned int)(firstGainZeroSampID + 5));
176 for (
unsigned int s = firstGainZeroSampID;
s < plateauEnd;
s++) {
177 if (
df.sample(
s).gainId() == 0 &&
df.sample(
s).adc() == firstGainZeroSampADC) {
180 isSaturation =
false;
185 if (firstGainZeroSampID < 3) {
186 isSaturation =
false;
192 <<
"Gain zero" << (isSaturation ?
" with features of saturation" :
"") <<
" was found in SC Block"
194 <<
towerId_ <<
" strip " << stripId <<
" xtal " << xtalId <<
")";
199 (*invalidGains_)->push_back(*
pDetId_);
200 (*digis_)->pop_back();
216 short firstGainWrong = -1;
217 short numGainWrong = 0;
223 if (firstGainWrong == -1) {
229 if (numGainWrong > 0) {
231 edm::LogWarning(
"IncorrectGain") <<
"A wrong gain transition switch was found for SC Block in strip " << stripId
232 <<
" and xtal " << xtalId <<
" (L1A " <<
event_->
l1A() <<
" bx "
237 (*invalidGainsSwitch_)->push_back(*
pDetId_);
243 if (errorOnXtal && addedFrame) {
244 (*digis_)->pop_back();
256 edm::LogWarning(
"IncorrectBlock") <<
"An EEDetId was requested that does not exist "
258 <<
towerId_ <<
" strip " << stripId <<
" xtal " << xtalId <<
")";
275 (*errorColection)->push_back(*eleTp);
280 <<
" but that activeDcc is not valid in EE.";
std::unique_ptr< EEDigiCollection > * eeDigisCollection()
std::unique_ptr< EEDetIdCollection > * invalidEEChIdsCollection()
std::pair< unsigned int, unsigned int > unpack(cond::Time_t since)
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 [...
EcalElectronicsId * getSCElectronicsPointer(unsigned int smId, unsigned int feChannel)
DetId * getDetIdPointer(unsigned int feChannel, unsigned int strip, unsigned int xtal)
std::unique_ptr< EEDetIdCollection > * invalidEEGainsSwitchCollection()
void updateCollectors() override
void updateCollectors() override
static std::atomic< bool > silentMode_
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_
int unpackXtalData(unsigned int stripID, unsigned int xtalID) override
unsigned int lastStripId_
DCCDataUnpacker * unpacker_
char data[epos_bytes_allocation]
unsigned int numbDWInXtalBlock_
EcalElectronicsMapper * mapper_
std::unique_ptr< EcalElectronicsIdCollection > * invalidZSXtalIds_
Log< level::Warning, false > LogWarning
unsigned int getActiveSM()
std::unique_ptr< EEDigiCollection > * digis_
void fillEcalElectronicsError(std::unique_ptr< EcalElectronicsIdCollection > *) override