5 #define DETAIL_DUMP_ON false
6 #define ADC_DUMP_ON false
7 #define VALIDATE_DUMP_ON false
13 #include "GaudiKernel/MsgStream.h"
18 static const InterfaceID IID_ILArLATOMEDecoder(
"LArLATOMEDecoder", 1, 0);
24 m_sc2ccMappingTool(
"CaloSuperCellIDTool")
26 declareInterface<LArLATOMEDecoder>(
this);
30 {
return IID_ILArLATOMEDecoder;}
39 return StatusCode::SUCCESS;
50 try {
ret =
re->check();}
52 ATH_MSG_WARNING(
"Exception while checking eformat fragment validity: " << ex.what() );
57 return StatusCode::FAILURE;
60 std::map<eformat::SubDetectorGroup, std::vector<const uint32_t*> > robIndex;
61 eformat::helper::build_toc(*
re, robIndex );
62 for (
auto mapit : robIndex)
ATH_MSG_DEBUG(
"Rob Index subdetgroup is " << std::hex << mapit.first );
63 std::map<eformat::SubDetectorGroup, std::vector<const uint32_t*> >::const_iterator robIt = robIndex.find(
eformat::LAR);
64 if (robIt!=robIndex.end()) {
65 const std::vector<const uint32_t*>&
robs = robIt->second;
70 uint32_t latomeSourceID = robFrag.rod_source_id();
71 if( !(latomeSourceID & 0x1000) ){
72 ATH_MSG_DEBUG(
" discarding non latome source ID " << std::hex << latomeSourceID );
75 ATH_MSG_DEBUG(
" found latome source ID " << std::hex << latomeSourceID);
77 EventProcess ev(
this, 0, 0, 0, 0, accdigits, caccdigits, header_coll);
78 ev.fillCollection(&robFrag, map, onoffmap, clmap);
81 ATH_MSG_WARNING (
" exception thrown by ROBFragment, badly corrupted event. Abort decoding " );
82 if(accdigits)accdigits->
clear();
83 if(caccdigits)caccdigits->
clear();
84 if(header_coll)header_coll->
clear();
90 return StatusCode::SUCCESS;
103 if (robFrags.size() > 0) {
107 uint32_t latomeSourceID = pRob->rod_source_id();
108 if( !(latomeSourceID & 0x1000) ){
109 ATH_MSG_DEBUG(
" discarding non latome source ID " << std::hex << latomeSourceID );
112 ATH_MSG_DEBUG(
" found latome source ID " << std::hex << latomeSourceID);
114 EventProcess ev(
this, adc_coll, adc_bas_coll, et_coll, et_id_coll, 0, 0, header_coll);
115 ev.fillCollection(pRob, map,
nullptr,
nullptr);
118 ATH_MSG_WARNING (
" exception thrown by ROBFragment, badly corrupted event. Abort decoding " );
119 if(adc_coll)adc_coll->
clear();
120 if(adc_bas_coll)adc_bas_coll->
clear();
121 if(et_coll)et_coll->
clear();
122 if(et_id_coll)et_id_coll->
clear();
123 if(header_coll)header_coll->
clear();
128 return StatusCode::SUCCESS;
139 :
AthMessaging(
Gaudi::svcLocator()->service< IMessageSvc >(
"MessageSvc" ),
"LArLATOMEDecoder::EventProcess"),
140 m_decoder(decoderInput),
141 m_adc_coll(adc_coll),
142 m_adc_bas_coll(adc_bas_coll),
144 m_et_id_coll(et_id_coll),
145 m_accdigits(accdigits),
146 m_caccdigits(caccdigits),
147 m_header_coll(header_coll)
215 if(bswap_32(
p[
offset])!=0xc0ffee00 || bswap_32(
p[
offset+1]!=0xaaaaaaaa)){
217 <<
" words " << std::hex << bswap_32(
p[
offset]) <<
", "
218 << bswap_32(
p[
offset+1]) << std::dec );
221 return offset+m_monTrailerSize;
227 int monheadererror=0;
228 int monheadererrorbit=0;
229 if(!compareOrSet(m_latomeID, bswap_32(
p[0+
offset]), m_headerDecoded)) monheadererror |= (1<<monheadererrorbit++);
231 if(!compareOrSet(l1IDtmp, bswap_32(
p[1+
offset]), m_headerDecoded)) monheadererror |= (1<<monheadererrorbit++);
232 if(l1IDtmp != m_l1ID){
233 ATH_MSG_DEBUG(
"Mon header L1ID " << l1IDtmp <<
" different from rod header L1ID " << m_l1ID );
235 ATH_MSG_DEBUG(
" latomeID: " << m_latomeID <<
" l1ID: " << m_l1ID );
239 if(s_monHeaderMarker!=monHeaderMarker){
240 monheadererror |= (1<<monheadererrorbit++);
243 if(s_monCheckPoint!=monCheckPoint){
244 monheadererror |= (1<<monheadererrorbit++);
248 if(!compareOrSet(m_nPackets, bswap_32(
p[3+
offset])>>24, m_headerDecoded )) monheadererror |= (1<<monheadererrorbit++);
250 if(m_nPackets == 0xFF){
253 m_nWordsPerPacket = (bswap_32(
p[3+
offset])&0xffffff)/4.;
256 if(m_headerDecoded)++m_iPacket;
258 if(!compareOrSet(m_iPacket, (bswap_32(
p[3+
offset])>>16)&0xf, m_headerDecoded)) monheadererror |= (1<<monheadererrorbit++);
259 m_nWordsPerPacket = (bswap_32(
p[3+
offset])&0xffff)/4.;
262 if(!compareOrSet(m_monHeaderSize, bswap_32(
p[5+
offset]), m_headerDecoded)) monheadererror |= (1<<monheadererrorbit++);
266 if(m_monHeaderSize<18){
267 ATH_MSG_ERROR(
" Mon header size should not be less that 18 : =" << m_monHeaderSize <<
" are you reading old data file?" );
271 ATH_MSG_DEBUG(
" nPackets: " << m_nPackets <<
" iPacket: " << m_iPacket
272 <<
" nWordsPerPacket: " << m_nWordsPerPacket <<
" monHeaderSize: " << m_monHeaderSize
276 if(!compareOrSet(m_at0typeRec, bswap_32(
p[9+
offset]), m_headerDecoded)) monheadererror |= (1<<monheadererrorbit++);
277 if(!compareOrSet(m_at1typeRec, bswap_32(
p[12+
offset]), m_headerDecoded)) monheadererror |= (1<<monheadererrorbit++);
278 monheadererrorbit+=2;
280 if(!compareOrSet(m_at0nBC, bswap_32(
p[10+
offset]), m_headerDecoded)) monheadererror |= (1<<monheadererrorbit++);
281 if(!compareOrSet(m_at1nBC, bswap_32(
p[13+
offset]), m_headerDecoded)) monheadererror |= (1<<monheadererrorbit++);
282 if(!compareOrSet(m_at0BC, bswap_32(
p[11+
offset]), m_headerDecoded)) monheadererror |= (1<<monheadererrorbit++);
283 if(!compareOrSet(m_at1BC, bswap_32(
p[14+
offset]), m_headerDecoded)) monheadererror |= (1<<monheadererrorbit++);
284 if(!compareOrSet(m_activeSC, bswap_32(
p[15+
offset]), m_headerDecoded)) monheadererror |= (1<<monheadererrorbit++);
285 if(!compareOrSet(m_nsc1, bswap_32(
p[16])>>24, m_headerDecoded)) monheadererror |= (1<<monheadererrorbit++);
286 if(!compareOrSet(m_nsc2, (bswap_32(
p[16])>>16)&0xff, m_headerDecoded)) monheadererror |= (1<<monheadererrorbit++);
287 if(!compareOrSet( m_nsc3, (bswap_32(
p[16])>>8)&0xff, m_headerDecoded)) monheadererror |= (1<<monheadererrorbit++);
288 if(!compareOrSet(m_nsc4, (bswap_32(
p[16]))&0xff, m_headerDecoded)) monheadererror |= (1<<monheadererrorbit++);
289 if(!compareOrSet(m_nsc5, bswap_32(
p[17])>>24, m_headerDecoded)) monheadererror |= (1<<monheadererrorbit++);
290 if(!compareOrSet(m_nsc6, (bswap_32(
p[17])>>16)&0xff, m_headerDecoded)) monheadererror |= (1<<monheadererrorbit++);
293 <<
" at1type " <<m_at1typeRec
294 <<
" at0nBC " <<m_at0nBC
295 <<
" at1nBC " <<m_at1nBC
296 <<
" at0BC " <<m_at0BC
297 <<
" at1BC " <<m_at1BC
308 ATH_MSG_WARNING(
" consistency error in mon checker at packet " << m_iPacket <<
" errorbits " << std::hex<< monheadererror << std::dec );
311 m_headerDecoded=
true;
312 return m_monHeaderSize+m_nWordsPerPacket+
offset;
336 if(m_packetEnd[m_iPacket] == wordshift){
338 wordshift+=(m_monHeaderSize+m_monTrailerSize);
339 ATH_MSG_DEBUG(
"switch packet " << m_iPacket <<
" " << wordshift );
348 increaseWordShift(wordshift);
354 byte = ((bswap_32(
p[wordshift]))>>(8*(4-1-byteshift)))&0xff;
360 decodeByte(msb, wordshift, byteshift,
p);
361 increaseByteShift(wordshift, byteshift);
362 decodeByte(lsb, wordshift, byteshift,
p);
363 increaseByteShift(wordshift, byteshift);
364 word = lsb | (msb<<8);
369 unsigned int& at0Data,
unsigned int& at1Data,
unsigned int& saturation,
370 bool& at0val,
bool& at1val){
376 unsigned int nbytesPerChannel = bytesPerChannel(at0, at1);
377 bool satByte = nbytesPerChannel%2;
383 unsigned int satData=0;
386 unsigned int word1=0;
387 unsigned int word2=0;
388 decodeWord(
word1, wordshift, byteshift,
p);
389 if(nbytesPerChannel>3){
390 decodeWord(word2, wordshift, byteshift,
p);
392 at0Data =
word1 & 0x7fff;
393 at0val =
word1 & 0x8000;
394 if(nbytesPerChannel>3){
395 at1Data = word2 & 0x7fff;
396 at1val = word2 & 0x8000;
399 decodeByte(satData, wordshift, byteshift,
p);
400 increaseByteShift(wordshift, byteshift);
408 at0Data = (at0Data<<3) | (satData&0x7);
409 at1Data = (at1Data<<3) | ((satData&0x70)>>4);
410 saturation = ((satData & 0x88) == 0x88);
413 at0Data = (at0Data<<3) | ((satData&0x70)>>4);
414 at1Data = (at1Data<<3) | (satData&0x7);
415 saturation = ((satData & 0x88) == 0x88);
419 at0Data = (at0Data<<3) | (satData&0x7);
420 saturation = (satData & 0x20);
423 at1Data = (at1Data<<3) | (satData&0x7);
424 saturation = (satData & 0x20);
439 const unsigned int sourceID = robFrag->rob_source_id();
447 m_l1ID = robFrag->rod_lvl1_id();
448 m_ROBFragSize = robFrag->rod_ndata();
450 const unsigned int n = robFrag->rod_ndata();
456 m_latomeBCID = robFrag->rod_bc_id();
457 const uint32_t *rod_status = robFrag->rod_status();
458 const unsigned int rod_nstatus = robFrag->rod_nstatus();
459 if(rod_nstatus != 27){
460 ATH_MSG_WARNING(
"Inconsistent number of rod header status elements: nstatus= " << rod_nstatus );
465 m_at0type = status8 & 0x3;
466 m_at1type = (status8>>2) & 0x3;
468 m_nthLATOME = robFrag->rod_source_id();
471 pat1.
DAC=rod_status[9];
472 pat1.
delay=rod_status[10];
474 for(
unsigned int i=0;
i<4; ++
i)pat1.
patterns[
i]=rod_status[
i+11];
476 pat2.
DAC=rod_status[15];
477 pat2.
delay=rod_status[16];
479 for(
unsigned int i=0;
i<4; ++
i)pat2.
patterns[
i]=rod_status[
i+17];
481 pat3.
DAC=rod_status[21];
482 pat3.
delay=rod_status[22];
484 for(
unsigned int i=0;
i<4; ++
i)pat3.
patterns[
i]=rod_status[
i+23];
486 m_latomeCalibPatternsInEvent = {pat1, pat2, pat3};
488 const HWIdentifier hwidEmpty;
492 unsigned int offset = decodeHeader(
p,0);
495 m_at0type=m_at0typeRec>>24;
498 ATH_MSG_WARNING(
" inconsistant data type with requested averaged decoding at0 type "<< m_at0type <<
" " << m_at0typeRec <<
" "
499 << std::hex << m_l1ID <<
" "<<sourceID << std::dec );
504 m_at0type=m_at0typeRec>>24;
507 ATH_MSG_WARNING(
" inconsistant data type with requested averaged decoding at0 type "<< m_at0type <<
" " << m_at0typeRec <<
" "
508 << std::hex << m_l1ID <<
" "<<sourceID << std::dec );
513 m_packetEnd.push_back(
offset);
517 for(
unsigned int ip=1;
ip<m_nPackets; ++
ip){
519 m_packetEnd.push_back(
offset);
524 ATH_MSG_DEBUG(
" end of header check computed offset=" << std::dec
525 <<
offset <<
" nwords in payload=" <<
n );
529 if(m_packetEnd[m_nPackets-1]+m_monTrailerSize !=
n){
531 << m_packetEnd[m_nPackets-1] <<
" != " <<
n );
535 std::vector<unsigned int> timeslot_nsc = {m_nsc1, m_nsc2, m_nsc3, m_nsc4, m_nsc5, m_nsc6};
536 std::vector<unsigned int> bc_size;
546 if(m_isAveraged || m_isAutoCorr){
553 for(
auto &
val: m_averagedRawValuesInEvent){
554 val.sum.resize(m_nBC_Averaged);
555 val.sumSq.resize(m_nBC_Averaged);
556 val.nTrigValid.resize(m_nBC_Averaged);
557 val.latomeChannel = 99999;
566 if(m_at0nBC>=m_at1nBC){
569 startBC1=m_at1BC-m_at0BC;
576 startBC1=m_at0BC-m_at1BC;
622 m_BC_rawADC=startBC1;
646 for(
auto &
val: m_rawValuesInEvent){
647 if(m_hasRawAdc)
val.adc.resize(m_nBC_rawADC);
648 if(m_hasAdc)
val.adc_bas.resize(m_nBC_ADC);
649 if(m_hasE)
val.et.resize(m_nBC_E);
650 if(m_hasEID)
val.et_id.resize(m_nBC_EID);
651 if(m_hasEID||m_hasE){
652 val.saturation.resize(
std::max(m_nBC_EID,m_nBC_E));
655 val.latomeChannel = 99999;
659 m_BCIDsInEvent.resize(nBC);
661 unsigned int s = m_monHeaderSize;
664 for(
short iBC=0;iBC<nBC; ++iBC){
670 unsigned int nbytesPerChannel = bytesPerChannel(at0,at1);
673 unsigned int oldipacket=0;
674 for(
unsigned int itimeslot=0; itimeslot<6; ++itimeslot){
676 unsigned int l_bcid = (bswap_32(
p[
s]))>>16;
684 unsigned int bcid_c =
bcid+1;
690 if(bcid_c != l_bcid){
691 ATH_MSG_WARNING(
"ERROR: BCID not increasing properly between samples, L1ID is: " << m_l1ID <<
", BCID is from payload: " << l_bcid <<
", expected BCID is: " << bcid_c <<
", LATOME channel is: " << nsc );
694 m_BCIDsInEvent[iBC] = l_bcid;
698 unsigned int mux = ((bswap_32(
p[
s]))>>8)&0xff;
699 increaseWordShift(
s);
701 increaseWordShift(
s);
705 unsigned int timeslotsize = timeslot_nsc[itimeslot];
706 unsigned int nbytes = timeslotsize*nbytesPerChannel;
707 unsigned int n64word= nbytes/8;
708 if(nbytes%8) ++n64word;
710 <<
" " <<
bcid <<
" " <<
mux <<
" n64word " <<n64word
711 <<
" at0 " << (
int)at0 <<
" at1 " << (
int)at1 <<
" l_bcid " <<
bcid );
713 unsigned int wordshift=
s;
714 unsigned int byteshift=0;
717 oldipacket=m_iPacket;
719 unsigned int at0Data=0, at1Data=0, satData=0;
720 bool at0val=
false, at1val=
false;
722 if(!m_isAveraged && !m_isAutoCorr){
723 decodeChannel(wordshift, byteshift,
p, at0, at1,
724 at0Data, at1Data, satData, at0val, at1val);
725 ATH_MSG_DEBUG(
" wordshift " << wordshift <<
" byteshift " <<byteshift
726 <<
" at0data " << at0Data <<
" at1Data " << at1Data <<
" satData "
727 << satData <<
" at0val " << at0val <<
" at1val " << at1val
731 const auto SCID = map ? map->getChannelID(m_nthLATOME, nsc):hwidEmpty;
732 if (SCID == hwidEmpty) {
735 int RAWValue0 = -999;
737 ATH_MSG_DEBUG(
"at0 bad quality bit for SC:" << nsc <<
" BC " << iBC
738 <<
" latome " << robFrag->rod_source_id() );
743 int defaultADCValue=-1;
744 int defaultEValue=-99999;
747 m_rawValuesInEvent[nsc].adc[iBC] = (at0val)?RAWValue0:defaultADCValue;
750 m_rawValuesInEvent[nsc].adc_bas[iBC] = (at0val)?RAWValue0:defaultADCValue;
753 m_rawValuesInEvent[nsc].et[iBC] = (at0val)?signEnergy(RAWValue0):defaultEValue;
754 m_rawValuesInEvent[nsc].saturation[iBC] = satData;
757 m_rawValuesInEvent[nsc].et_id[iBC] = (at0val)?signEnergy(RAWValue0):defaultEValue;
758 m_rawValuesInEvent[nsc].saturation[iBC] = satData;
767 int RAWValue1 = -999;
769 ATH_MSG_DEBUG(
"at1 bad quality bit for SC:" << nsc <<
" BC " << iBC
770 <<
" latome " << robFrag->rod_source_id() );
777 m_rawValuesInEvent[nsc].adc[iBC-startBC1] = (at1val)?RAWValue1:defaultADCValue;
780 m_rawValuesInEvent[nsc].adc_bas[iBC-startBC1] = (at1val)?RAWValue1:defaultADCValue;
783 m_rawValuesInEvent[nsc].et[iBC-startBC1] = (at1val)?signEnergy(RAWValue1):defaultEValue;
784 m_rawValuesInEvent[nsc].saturation[iBC-startBC1] = satData;
787 m_rawValuesInEvent[nsc].et_id[iBC-startBC1] = (at1val)?signEnergy(RAWValue1):defaultEValue;
788 m_rawValuesInEvent[nsc].saturation[iBC-startBC1] = satData;
797 m_rawValuesInEvent[nsc].latomeChannel=nsc;
801 ATH_MSG_ERROR(
"inconsistant wordshift in decoding everaged data" );
804 unsigned int averageword=bswap_32(
p[wordshift]); wordshift+=1;
805 unsigned int sumSq=bswap_32(
p[wordshift]); wordshift+=1;
806 unsigned long long sumsqMSB = averageword>>28;
807 sumsqMSB=sumsqMSB<<32;
809 m_averagedRawValuesInEvent[nsc].sum[iBC]=averageword&0xFFFFF;
810 m_averagedRawValuesInEvent[nsc].sumSq[iBC]= sumSq | sumsqMSB;
811 m_averagedRawValuesInEvent[nsc].nTrigValid[iBC]= (averageword>>20) & 0xFF;
812 m_averagedRawValuesInEvent[nsc].latomeChannel=nsc;
821 if((wordshift-
s)%2) increaseWordShift(wordshift);
822 if( (wordshift-
s-((m_iPacket-oldipacket)*(m_monHeaderSize+m_monTrailerSize))) != n64word*2){
823 ATH_MSG_WARNING(
" ERROR: time slice end is not padded properly " << (wordshift-
s-m_iPacket*(m_monHeaderSize+m_monTrailerSize)) <<
"!=" << n64word*2 <<
" m_ipacket " << m_iPacket );
826 oldipacket=m_iPacket;
833 if(!m_isAveraged && !m_isAutoCorr){
836 if(onoffmap && clmap) {
837 fillCalib(map,onoffmap,clmap);
852 std::unique_ptr<LArCalibParams> calibParams1;
853 std::unique_ptr<LArCalibParams> calibParams2;
856 const LArOnOffIdMapping*
cabling =0;
867 calibParams1=std::make_unique<LArCalibParams>();
868 calibParams2=std::make_unique<LArCalibParams>();
870 if (pattype > 0x48) {
873 if (sc1 != StatusCode::SUCCESS || sc2 != StatusCode::SUCCESS) {
874 ATH_MSG_WARNING(
"could not initialize LArCalibParams, acc calib will not be filled ");
877 if (pattype == 0x49 || pattype == 0x4a) {
890 if (sc1 != StatusCode::SUCCESS) {
891 ATH_MSG_WARNING(
"could not initialize LArCalibParams, acc calib will not be filled ");
898 const HWIdentifier hwidEmpty;
902 if (SCID == hwidEmpty) {
909 std::vector<uint64_t>
sum;
910 std::vector<uint64_t> sum2;
911 unsigned int ntmin=9999999;
925 sum2[is]=
round(fsum2);
934 if (pattype == 0x49 || pattype == 0x4a) {
936 calibParams = calibParams1.get();
938 calibParams = calibParams2.get();
940 }
else if (pattype == 0x4b || pattype == 0x4c) {
942 calibParams = calibParams1.get();
944 calibParams = calibParams2.get();
947 calibParams = calibParams1.get();
949 unsigned int eventNb = 0;
950 unsigned int numCL = 0;
951 unsigned int numPulsedLeg = 0;
952 std::vector<Identifier> ccellIds(0);
953 Identifier myofflineID =
cabling->cnvToIdentifier(SCID);
955 for (Identifier
id : ccellIds) {
956 HWIdentifier cellLegHWID = cablingLeg->createSignalChannelID(
id);
957 const std::vector<HWIdentifier>& calibLineLeg = clcabling->
calibSlotLine(cellLegHWID);
958 numCL += calibLineLeg.size();
959 for (HWIdentifier calibLineHWID : calibLineLeg) {
960 if (calibParams->
isPulsed(eventNb, calibLineHWID)) {
966 isPulsed_value =
true;
967 if (numPulsedLeg != numCL) {
970 isPulsed_value =
false;
972 DAC_value = calibParams->
DAC(eventNb, SCID) * numPulsedLeg;
982 DAC_value = DAC_value / 1.363;
985 DAC_value = DAC_value / 1.206;
991 delay_value = calibParams->
Delay(eventNb, SCID);
1003 const HWIdentifier hwidEmpty;
1005 const auto SCID = map ? map->
getChannelID(m_nthLATOME,
ch) : hwidEmpty;
1006 if (SCID == hwidEmpty) {
1010 if (m_decoder->m_ignoreBarrelChannels && m_decoder->m_onlineId->barrel_ec(SCID) == 0)
1012 if (m_decoder->m_ignoreEndcapChannels && m_decoder->m_onlineId->barrel_ec(SCID) == 1)
1015 std::vector<short> adcValues_inChannel_inEvent;
1018 adcValues_inChannel_inEvent = m_rawValuesInEvent[
ch].adc;
1021 if (m_hasRawAdc && m_adc_coll) {
1025 std::vector<unsigned short> bcid_in_event;
1026 for (
short b = m_BC_rawADC;
b < m_BC_rawADC + m_nBC_rawADC; ++
b) {
1027 bcid_in_event.push_back(m_BCIDsInEvent[
b]);
1030 LArSCDigit* scDigit =
new LArSCDigit(SCID, m_rawValuesInEvent[
ch].latomeChannel, m_nthLATOME, adcValues_inChannel_inEvent, bcid_in_event);
1031 m_adc_coll->push_back(scDigit);
1034 if (m_hasAdc && m_adc_bas_coll) {
1035 std::vector<unsigned short> bcid_in_event;
1036 if (m_nBC_ADC == (
short)m_BCIDsInEvent.size()) {
1037 bcid_in_event = m_BCIDsInEvent;
1039 for (
short b = m_BC_ADC;
b < m_BC_ADC + m_nBC_ADC; ++
b) {
1040 bcid_in_event.push_back(m_BCIDsInEvent[
b]);
1043 LArSCDigit* scDigit =
new LArSCDigit(SCID, m_rawValuesInEvent[
ch].latomeChannel, m_nthLATOME, m_rawValuesInEvent[
ch].adc_bas, bcid_in_event);
1044 m_adc_bas_coll->push_back(scDigit);
1047 if (m_hasE && m_et_coll) {
1048 std::vector<unsigned short> bcid_in_event;
1049 if (m_nBC_E == (
unsigned short)m_BCIDsInEvent.size()) {
1050 bcid_in_event = m_BCIDsInEvent;
1052 for (
short b = m_BC_E;
b < m_BC_E + m_nBC_E; ++
b) {
1053 bcid_in_event.push_back(m_BCIDsInEvent[
b]);
1057 new LArRawSC(SCID, m_rawValuesInEvent[
ch].latomeChannel, m_nthLATOME, m_rawValuesInEvent[
ch].
et, bcid_in_event, m_rawValuesInEvent[
ch].saturation);
1058 m_et_coll->push_back(scDigit);
1061 if (m_hasEID && m_et_id_coll) {
1062 std::vector<unsigned short> bcid_in_event;
1063 if (m_nBC_EID == (
short)m_BCIDsInEvent.size()) {
1064 bcid_in_event = m_BCIDsInEvent;
1066 for (
short b = m_BC_EID;
b < m_BC_EID + m_nBC_EID; ++
b) {
1067 bcid_in_event.push_back(m_BCIDsInEvent[
b]);
1071 new LArRawSC(SCID, m_rawValuesInEvent[
ch].latomeChannel, m_nthLATOME, m_rawValuesInEvent[
ch].et_id, bcid_in_event, m_rawValuesInEvent[
ch].saturation);
1072 m_et_id_coll->push_back(scDigit);
1079 if (m_header_coll) {
1081 m_header_coll->push_back(latome);