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";
74 if (stripId == 0 || stripId > 5 || xtalId == 0 || xtalId > 5) {
79 <<
"\n Invalid strip : "<<stripId<<
" or xtal : "<<xtalId
109 <<
"Xtal id was expected to increase but it didn't - last xtal id was " <<
lastXtalId_ <<
" while current xtal is " << xtalId
138 bool addedFrame=
false;
148 (*digis_)->push_back(*
pDetId_);
151 bool wrongGain(
false);
157 unsigned int gain = data>>12;
159 if(gain == 0){ wrongGain =
true; }
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 SC Block"
197 <<
" tower " <<
towerId_ <<
" strip " << stripId <<
" xtal " << xtalId <<
")";
203 (*invalidGains_)->push_back(*
pDetId_);
204 (*digis_)->pop_back();
221 short firstGainWrong=-1;
222 short numGainWrong=0;
228 if (firstGainWrong == -1) { firstGainWrong=
i;}
232 if (numGainWrong > 0) {
235 <<
"A wrong gain transition switch was found for SC Block in strip " << stripId <<
" and xtal " << xtalId
239 (*invalidGainsSwitch_)->push_back(*
pDetId_);
245 if (errorOnXtal && addedFrame) {
246 (*digis_)->pop_back();
259 <<
"An EEDetId was requested that does not exist "
263 <<
" strip " << stripId
264 <<
" xtal " << xtalId <<
")";
283 (*errorColection)->push_back(*eleTp);
287 <<
"For event "<<
event_->
l1A()<<
" there's fed: "<< activeDCC
289 <<
" but that activeDcc is not valid in EE.";
unsigned int getActiveDCC()
void fillEcalElectronicsError(std::auto_ptr< EcalElectronicsIdCollection > *)
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)
std::auto_ptr< EEDetIdCollection > * invalidEEChIdsCollection()
DetId * getDetIdPointer(unsigned int feChannel, unsigned int strip, unsigned int xtal)
std::auto_ptr< EEDetIdCollection > * invalidGainsSwitch_
std::auto_ptr< EEDetIdCollection > * invalidEEGainsCollection()
virtual void updateCollectors()
std::auto_ptr< EEDetIdCollection > * invalidGains_
int unpackXtalData(unsigned int stripID, unsigned int xtalID)
uint16_t getChannelValue(const DetId &id) const
std::auto_ptr< EcalElectronicsIdCollection > * invalidZSXtalIds_
DCCSCBlock(DCCDataUnpacker *u, EcalElectronicsMapper *m, DCCEventBlock *e, bool unpack, bool forceToKeepFRdata)
std::auto_ptr< EEDigiCollection > * digis_
bool isGhost(const int FED, const int CCU, const int VFE)
unsigned int lastStripId_
DCCDataUnpacker * unpacker_
char data[epos_bytes_allocation]
unsigned int numbDWInXtalBlock_
std::auto_ptr< EEDigiCollection > * eeDigisCollection()
EcalElectronicsMapper * mapper_
unsigned int getActiveSM()
std::auto_ptr< EEDetIdCollection > * invalidEEGainsSwitchCollection()
std::auto_ptr< EEDetIdCollection > * invalidChIds_