112 produces<CSCWireDigiCollection>(
"MuonCSCWireDigi");
113 produces<CSCStripDigiCollection>(
"MuonCSCStripDigi");
114 produces<CSCComparatorDigiCollection>(
"MuonCSCComparatorDigi");
115 produces<CSCALCTDigiCollection>(
"MuonCSCALCTDigi");
116 produces<CSCCLCTDigiCollection>(
"MuonCSCCLCTDigi");
117 produces<CSCRPCDigiCollection>(
"MuonCSCRPCDigi");
118 produces<CSCCorrelatedLCTDigiCollection>(
"MuonCSCCorrelatedLCTDigi");
120 if (unpackStatusDigis)
122 produces<CSCCFEBStatusDigiCollection>(
"MuonCSCCFEBStatusDigi");
123 produces<CSCTMBStatusDigiCollection>(
"MuonCSCTMBStatusDigi");
124 produces<CSCDMBStatusDigiCollection>(
"MuonCSCDMBStatusDigi");
125 produces<CSCALCTStatusDigiCollection>(
"MuonCSCALCTStatusDigi");
126 produces<CSCDDUStatusDigiCollection>(
"MuonCSCDDUStatusDigi");
127 produces<CSCDCCStatusDigiCollection>(
"MuonCSCDCCStatusDigi");
132 produces<CSCDCCFormatStatusDigiCollection>(
"MuonCSCDCCFormatStatusDigi");
155 desc.
add<
bool>(
"UseExaminer",
true)->setComment(
"# Use CSC examiner to check for corrupt or semi-corrupt data & avoid unpacker crashes");
156 desc.
add<
unsigned int>(
"ExaminerMask",535557110)->setComment(
"# This mask is needed by the examiner");
157 desc.
add<
bool>(
"UseSelectiveUnpacking",
true)->setComment(
"# Use Examiner to unpack good chambers and skip only bad ones");
158 desc.
add<
unsigned int>(
"ErrorMask",0)->setComment(
"# This mask simply reduces error reporting");
159 desc.
add<
bool>(
"UnpackStatusDigis",
false)->setComment(
"# Unpack general status digis?");
160 desc.
add<
bool>(
"UseFormatStatus",
true)->setComment(
"# Unpack FormatStatus digi?");
161 desc.
addUntracked<
bool>(
"Debug",
false)->setComment(
"# Turn on lots of output");
164 desc.
addUntracked<
bool>(
"VisualFEDInspect",
false)->setComment(
"# Visualization of raw data in corrupted events");
165 desc.
addUntracked<
bool>(
"VisualFEDShort",
false)->setComment(
"# Visualization of raw data in corrupted events");
168 descriptions.
add(
"muonCSCDCCUnpacker",desc);
169 descriptions.
setComment(
" This is the generic cfi file for CSC unpacking");
195 auto wireProduct = std::make_unique<CSCWireDigiCollection>();
196 auto stripProduct = std::make_unique<CSCStripDigiCollection>();
197 auto alctProduct = std::make_unique<CSCALCTDigiCollection>();
198 auto clctProduct = std::make_unique<CSCCLCTDigiCollection>();
199 auto comparatorProduct = std::make_unique<CSCComparatorDigiCollection>();
200 auto rpcProduct = std::make_unique<CSCRPCDigiCollection>();
201 auto corrlctProduct = std::make_unique<CSCCorrelatedLCTDigiCollection>();
202 auto cfebStatusProduct = std::make_unique<CSCCFEBStatusDigiCollection>();
203 auto dmbStatusProduct = std::make_unique<CSCDMBStatusDigiCollection>();
204 auto tmbStatusProduct = std::make_unique<CSCTMBStatusDigiCollection>();
205 auto dduStatusProduct = std::make_unique<CSCDDUStatusDigiCollection>();
206 auto dccStatusProduct = std::make_unique<CSCDCCStatusDigiCollection>();
207 auto alctStatusProduct = std::make_unique<CSCALCTStatusDigiCollection>();
209 auto formatStatusProduct = std::make_unique<CSCDCCFormatStatusDigiCollection>();
215 unsigned long dccBinCheckMask = 0x06080016;
218 const unsigned postLS1_map [] = { 841, 842, 843, 844, 845, 846, 847, 848, 849,
219 831, 832, 833, 834, 835, 836, 837, 838, 839,
220 861, 862, 863, 864, 865, 866, 867, 868, 869,
221 851, 852, 853, 854, 855, 856, 857, 858, 859 };
225 std::vector<unsigned int> cscFEDids;
230 cscFEDids.push_back(
id);
236 cscFEDids.push_back(
id);
239 for (
unsigned int i=0;
i<cscFEDids.size();
i++)
241 unsigned int id = cscFEDids[
i];
250 unsigned long length = fedData.
size();
272 const short unsigned int *
data = (
short unsigned int *)fedData.
data();
274 LogTrace(
"badData") <<
"Length: "<< length/2;
305 formatStatusProduct->insertDigi(
CSCDetId(1,1,1,1,1),
320 short unsigned * buf = (
short unsigned int *)fedData.
data();
336 std::vector<CSCDDUEventData> fed_Data;
337 std::vector<CSCDDUEventData>* ptr_fedData = &fed_Data;
346 fed_Data.push_back(single_dduData);
365 fed_Data = dccData.dduData();
372 short unsigned * bufForDcc = (
short unsigned int *)fedData.
data();
377 dccStatusProduct->insertDigi(layer,
CSCDCCStatusDigi(dccData.dccHeader().data(),
378 dccData.dccTrailer().data(),
380 bufForDcc[length/2-4]));
385 const std::vector<CSCDDUEventData> & dduData = *ptr_fedData;
388 for (
unsigned int iDDU=0; iDDU<dduData.size(); ++iDDU)
394 if (dduData[iDDU].trailer().errorstat()&
errorMask)
396 LogTrace(
"CSCDCCUnpacker|CSCRawToDigi") <<
"FED ID" <<
id <<
" DDU# " << iDDU <<
" has serious error - no digis unpacked! " <<
397 std::hex << dduData[iDDU].trailer().errorstat();
403 dduData[iDDU].trailer().
data(),
405 dduData[iDDU].trailer0()));
408 const std::vector<CSCEventData> & cscData = dduData[iDDU].cscData();
413 for (
unsigned int iCSC=0; iCSC<cscData.size(); ++iCSC)
417 int vmecrate = cscData[iCSC].dmbHeader()->crateID();
418 int dmb = cscData[iCSC].dmbHeader()->dmbID();
424 LogTrace (
"CSCDCCUnpacker|CSCRawToDigi") <<
"crate = " << vmecrate <<
"; dmb = " << dmb;
428 if ((vmecrate>=1)&&(vmecrate<=60) && (dmb>=1)&&(dmb<=10)&&(dmb!=6))
430 layer = pcrate->
detId(vmecrate, dmb,icfeb,ilayer );
434 LogTrace (
"CSCDCCUnpacker|CSCRawToDigi") <<
" detID input out of range!!! ";
435 LogTrace (
"CSCDCCUnpacker|CSCRawToDigi")
436 <<
" skipping chamber vme= " << vmecrate <<
" dmb= " << dmb;
445 unsigned int dduid = cscmapping->
ddu(layer);
446 if ((dduid>=1) && (dduid <= 36)) dduid = postLS1_map[dduid-1];
450 LogTrace (
"CSCDDUUnpacker|CSCRawToDigi") <<
" CSC->FED/DDU mapping inconsistency!!! ";
451 LogTrace (
"CSCDCCUnpacker|CSCRawToDigi")
452 <<
"readout FED/DDU ID=" <<
id <<
" expected ID=" << dduid
453 <<
", skipping chamber " << layer <<
" vme= " << vmecrate <<
" dmb= " << dmb;
459 int nalct = cscData[iCSC].dmbHeader()->nalct();
462 if (nalct&&cscData[iCSC].alctHeader())
464 if (cscData[iCSC].alctHeader()->
check())
470 LogTrace (
"CSCDCCUnpacker|CSCRawToDigi") <<
471 "not storing ALCT digis; alct is bad or not present";
476 if (
debug)
LogTrace (
"CSCDCCUnpacker|CSCRawToDigi") <<
"nALCT==0 !!!";
482 std::vector <CSCALCTDigi> alctDigis =
483 cscData[iCSC].alctHeader()->ALCTDigis();
486 std::vector<CSCALCTDigi> alctDigis_0;
487 for (
int unsigned i=0;
i<alctDigis.size(); ++
i)
489 if (alctDigis[
i].isValid())
490 alctDigis_0.push_back(alctDigis[
i]);
492 alctProduct->move(std::make_pair(alctDigis_0.begin(), alctDigis_0.end()),layer);
495 alctProduct->move(std::make_pair(alctDigis.begin(), alctDigis.end()),layer);
500 int nclct = cscData[iCSC].dmbHeader()->nclct();
503 if (nclct&&cscData[iCSC].tmbData())
505 if (cscData[iCSC].tmbHeader()->
check())
507 if (cscData[iCSC].clctData()->
check()) goodTMB=
true;
511 LogTrace (
"CSCDCCUnpacker|CSCRawToDigi") <<
512 "one of TMB checks failed! not storing TMB digis ";
517 if (
debug)
LogTrace (
"CSCDCCUnpacker|CSCRawToDigi") <<
"nCLCT==0 !!!";
523 std::vector <CSCCorrelatedLCTDigi> correlatedlctDigis =
524 cscData[iCSC].tmbHeader()->CorrelatedLCTDigis(layer.
rawId());
527 std::vector<CSCCorrelatedLCTDigi> correlatedlctDigis_0;
528 for (
int unsigned i=0;
i<correlatedlctDigis.size(); ++
i)
530 if (correlatedlctDigis[
i].isValid())
531 correlatedlctDigis_0.push_back(correlatedlctDigis[
i]);
533 corrlctProduct->move(std::make_pair(correlatedlctDigis_0.begin(),
534 correlatedlctDigis_0.end()),layer);
537 corrlctProduct->move(std::make_pair(correlatedlctDigis.begin(),
538 correlatedlctDigis.end()),layer);
540 std::vector <CSCCLCTDigi> clctDigis =
541 cscData[iCSC].tmbHeader()->CLCTDigis(layer.
rawId());
544 std::vector<CSCCLCTDigi> clctDigis_0;
545 for (
int unsigned i=0;
i<clctDigis.size(); ++
i)
547 if (clctDigis[
i].isValid())
548 clctDigis_0.push_back(clctDigis[
i]);
550 clctProduct->move(std::make_pair(clctDigis_0.begin(), clctDigis_0.end()),layer);
553 clctProduct->move(std::make_pair(clctDigis.begin(), clctDigis.end()),layer);
556 if (cscData[iCSC].tmbData()->checkSize())
558 if (cscData[iCSC].tmbData()->hasRPC())
560 std::vector <CSCRPCDigi> rpcDigis =
561 cscData[iCSC].tmbData()->rpcData()->digis();
562 rpcProduct->move(std::make_pair(rpcDigis.begin(), rpcDigis.end()),layer);
565 else LogTrace(
"CSCDCCUnpacker|CSCRawToDigi") <<
" TMBData check size failed!";
572 for ( icfeb = 0; icfeb < 7; ++icfeb )
574 if ( cscData[iCSC].cfebData(icfeb) !=
NULL )
576 insertDigi(layer, cscData[iCSC].cfebData(icfeb)->statusDigi());
580 cscData[iCSC].dmbTrailer()->
data()));
581 if (goodTMB) tmbStatusProduct->
583 cscData[iCSC].tmbData()->tmbTrailer()->
data()));
584 if (goodALCT) alctStatusProduct->
586 cscData[iCSC].alctTrailer()->
data()));
591 for (
int ilayer = 1; ilayer <= 6; ++ilayer)
597 layer = pcrate->
detId( vmecrate, dmb, 0, ilayer );
599 std::vector <CSCWireDigi> wireDigis = cscData[iCSC].wireDigis(ilayer);
600 wireProduct->move(std::make_pair(wireDigis.begin(), wireDigis.end()),layer);
603 for ( icfeb = 0; icfeb < 7; ++icfeb )
605 layer = pcrate->
detId( vmecrate, dmb, icfeb,ilayer );
606 if (cscData[iCSC].cfebData(icfeb) && cscData[iCSC].cfebData(icfeb)->
check())
608 std::vector<CSCStripDigi> stripDigis;
609 cscData[iCSC].cfebData(icfeb)->digis(layer.
rawId(),stripDigis);
610 stripProduct->move(std::make_pair(stripDigis.begin(),
611 stripDigis.end()),layer);
616 if (goodTMB && (cscData[iCSC].tmbHeader() !=
NULL))
618 int nCFEBs = cscData[iCSC].tmbHeader()->NCFEBs();
619 for ( icfeb = 0; icfeb < nCFEBs; ++icfeb )
621 layer = pcrate->
detId( vmecrate, dmb, icfeb,ilayer );
622 std::vector <CSCComparatorDigi> comparatorDigis =
623 cscData[iCSC].clctData()->comparatorDigis(layer.
rawId(), icfeb);
626 layer = pcrate->
detId( vmecrate, dmb, 0, ilayer );
627 comparatorProduct->move(std::make_pair(comparatorDigis.begin(),
628 comparatorDigis.end()),layer);
637 LogTrace(
"CSCDCCUnpacker|CSCRawToDigi") <<
638 "ERROR! Examiner rejected FED #" <<
id;
648 LogTrace(
"CSCDCCUnpacker|CSCRawToDigi")
649 <<
" Examiner errors:0x" << std::hex << examiner->
errors()
658 if (examiner!=
NULL)
delete examiner;
666 e.
put(
std::move(comparatorProduct),
"MuonCSCComparatorDigi");
668 e.
put(
std::move(corrlctProduct),
"MuonCSCCorrelatedLCTDigi");
674 e.
put(
std::move(cfebStatusProduct),
"MuonCSCCFEBStatusDigi");
675 e.
put(
std::move(dmbStatusProduct),
"MuonCSCDMBStatusDigi");
676 e.
put(
std::move(tmbStatusProduct),
"MuonCSCTMBStatusDigi");
677 e.
put(
std::move(dduStatusProduct),
"MuonCSCDDUStatusDigi");
678 e.
put(
std::move(dccStatusProduct),
"MuonCSCDCCStatusDigi");
679 e.
put(
std::move(alctStatusProduct),
"MuonCSCALCTStatusDigi");
682 <<
"[CSCDCCUnpacker]: " <<
numOfEvents <<
" events processed ";
689 bool fDump,
short unsigned int *buf)
const 692 std::cout << std::endl << std::endl << std::endl;
693 std::cout <<
"Run: "<< run <<
" Event: " <<
event << std::endl;
696 std::cout <<
"FED-" <<
id <<
" " <<
"(scroll down to see summary)" << std::endl;
698 std::cout <<
"Problem seems in FED-" <<
id <<
" " <<
"(scroll down to see summary)" << std::endl;
699 std::cout <<
"********************************************************************************" << std::endl;
700 std::cout << hl <<
" words of data:" << std::endl;
704 std::vector<int> dcc_id;
707 for (
int i=750;
i<758;
i++)
710 for (
int i=830;
i<838;
i++)
713 char dcc_common[]=
"DCC-";
717 std::vector<int> ddu_id;
719 for (
int i=1;
i<37;
i++)
722 char ddu_common[]=
"DDU-";
723 char ddu_header1[]=
"Header 1";
724 char ddu_header2[]=
"Header 2";
725 char ddu_header3[]=
"Header 3";
726 char ddu_trail1[]=
"Trailer 1", ddu_trail2[]=
"Trailer 2", ddu_trail3[]=
"Trailer 3";
728 char ddu_trailer1_bit[]= {
'8',
'0',
'0',
'0',
'f',
'f',
'f',
'f',
'8',
'0',
'0',
'0',
'8',
'0',
'0',
'0'};
729 char ddu_trailer3_bit[]= {
'a'};
731 char ddu_tr1_err_common[]=
"Incomplet";
735 char dmb_common[]=
"DMB", dmb_header1[]=
"Header 1", dmb_header2[]=
"Header 2";
736 char dmb_common_crate[]=
"crate:", dmb_common_slot[]=
"slot:";
737 char dmb_common_l1a[]=
"L1A:";
738 char dmb_header1_bit[]= {
'9',
'9',
'9',
'9'};
739 char dmb_header2_bit[]= {
'a',
'a',
'a',
'a'};
740 char dmb_tr1[]=
"Trailer 1", dmb_tr2[]=
"Trailer 2";
741 char dmb_tr1_bit[]= {
'f',
'f',
'f',
'f'}, dmb_tr2_bit[]= {
'e',
'e',
'e',
'e'};
747 char alct_common[]=
"ALCT", alct_header1[]=
"Header 1", alct_header2[]=
"Header 2";
748 char alct_common_bxn[]=
"BXN:";
749 char alct_common_wcnt2[]=
"| Actual word count:";
750 char alct_common_wcnt1[]=
"Expected word count:";
751 char alct_header1_bit[]= {
'd',
'd',
'd',
'd',
'b',
'0',
'a'};
752 char alct_header2_bit[]= {
'0',
'0',
'0',
'0'};
753 char alct_tr1[]=
"Trailer 1";
758 char tmb_common[]=
"TMB", tmb_header1[]=
"Header", tmb_tr1[]=
"Trailer";
759 char tmb_header1_bit[]= {
'd',
'd',
'd',
'd',
'b',
'0',
'c'};
760 char tmb_tr1_bit[]= {
'd',
'd',
'd',
'd',
'e',
'0',
'f'};
765 char cfeb_common[]=
"CFEB", cfeb_tr1[]=
"Trailer", cfeb_b[]=
"B-word";
766 char cfeb_common_sample[]=
"sample:";
776 char tempbuf_short[17];
777 char sign1[]=
" --->| ";
780 int word_numbering=0;
781 int ddu_inst_i=0, ddu_inst_n=0, ddu_inst_l1a=0;
783 int dmb_inst_crate=0, dmb_inst_slot=0, dmb_inst_l1a=0;
787 int alct_inst_wcnt1=0;
788 int alct_inst_wcnt2=0;
792 int tmb_inst_wcnt1=0;
793 int tmb_inst_wcnt2=0;
804 bool dcc_check=
false;
805 bool ddu_h2_check[sz1]= {
false};
806 bool ddu_h1_check=
false;
807 bool dmb_h1_check[sz1]= {
false};
808 bool dmb_h2_check[sz1]= {
false};
809 bool ddu_h2_h1=
false;
810 bool ddu_tr1_check[sz1]= {
false};
811 bool alct_h1_check[sz1]= {
false};
812 bool alct_h2_check[sz1]= {
false};
813 bool alct_tr1_check[sz1]= {
false};
814 bool dmb_tr1_check[sz1]= {
false};
815 bool dmb_tr2_check[sz1]= {
false};
816 bool tmb_h1_check[sz1]= {
false};
817 bool tmb_tr1_check[sz1]= {
false};
818 bool cfeb_tr1_check[sz1]= {
false};
819 bool cfeb_b_check[sz1]= {
false};
820 bool ddu_tr1_bad_check[sz1]= {
false};
821 bool extraction=fedshort;
825 std::vector<int> ddu_h1_coll;
826 std::vector<int> ddu_h1_n_coll;
827 std::vector<int> ddu_h2_coll;
828 std::vector<int> ddu_h3_coll;
829 std::vector<int> ddu_t1_coll;
830 std::vector<int> ddu_t2_coll;
831 std::vector<int> ddu_t3_coll;
832 std::vector<int> ddu_l1a_coll;
833 std::vector<int> ddu_bxn_coll;
835 std::vector<int> dmb_h1_coll;
836 std::vector<int> dmb_h2_coll;
837 std::vector<int> dmb_t1_coll;
838 std::vector<int> dmb_t2_coll;
839 std::vector<int> dmb_crate_coll;
840 std::vector<int> dmb_slot_coll;
841 std::vector<int> dmb_l1a_coll;
843 std::vector<int> alct_h1_coll;
844 std::vector<int> alct_h2_coll;
845 std::vector<int> alct_t1_coll;
846 std::vector<int> alct_l1a_coll;
847 std::vector<int> alct_bxn_coll;
848 std::vector<int> alct_wcnt1_coll;
849 std::vector<int> alct_wcnt2_coll;
850 std::vector<int> alct_wcnt2_id_coll;
852 std::vector<int> tmb_h1_coll;
853 std::vector<int> tmb_t1_coll;
854 std::vector<int> tmb_l1a_coll;
855 std::vector<int> tmb_wcnt1_coll;
856 std::vector<int> tmb_wcnt2_coll;
858 std::vector<int> cfeb_t1_coll;
863 char dcc_header1[]=
"DCC Header 1";
864 char dcc_header2[]=
"DCC Header 2";
865 char dcc_trail1[]=
"DCC Trailer 1", dcc_trail1_bit[]= {
'e'};
866 char dcc_trail2[]=
"DCC Trailer 2", dcc_trail2_bit[]= {
'a'};
869 for (
int i=0;
i < hl;
i++)
872 for (
int j=-1;
j<4;
j++)
875 sprintf(tempbuf_short,
"%04x%04x%04x%04x",buf[
i+4*(
j-1)+3],buf[
i+4*(
j-1)+2],buf[
i+4*(
j-1)+1],buf[
i+4*(
j-1)]);
881 ddu_h2_check[
j]=((buf[
i+4*(
j-1)+1]==0x8000)&&
882 (buf[
i+4*(
j-1)+2]==0x0001)&&(buf[
i+4*(
j-1)+3]==0x8000));
884 ddu_tr1_check[
j]=((tempbuf_short[0]==ddu_trailer1_bit[0])&&(tempbuf_short[1]==ddu_trailer1_bit[1])&&
885 (tempbuf_short[2]==ddu_trailer1_bit[2])&&(tempbuf_short[3]==ddu_trailer1_bit[3])&&
886 (tempbuf_short[4]==ddu_trailer1_bit[4])&&(tempbuf_short[5]==ddu_trailer1_bit[5])&&
887 (tempbuf_short[6]==ddu_trailer1_bit[6])&&(tempbuf_short[7]==ddu_trailer1_bit[7])&&
888 (tempbuf_short[8]==ddu_trailer1_bit[8])&&(tempbuf_short[9]==ddu_trailer1_bit[9])&&
889 (tempbuf_short[10]==ddu_trailer1_bit[10])&&(tempbuf_short[11]==ddu_trailer1_bit[11])&&
890 (tempbuf_short[12]==ddu_trailer1_bit[12])&&(tempbuf_short[13]==ddu_trailer1_bit[13])&&
891 (tempbuf_short[14]==ddu_trailer1_bit[14])&&(tempbuf_short[15]==ddu_trailer1_bit[15]));
893 dmb_h1_check[
j]=((tempbuf_short[0]==dmb_header1_bit[0])&&(tempbuf_short[4]==dmb_header1_bit[1])&&
894 (tempbuf_short[8]==dmb_header1_bit[2])&&(tempbuf_short[12]==dmb_header1_bit[3]));
896 dmb_h2_check[
j]=((tempbuf_short[0]==dmb_header2_bit[0])&&(tempbuf_short[4]==dmb_header2_bit[1])&&
897 (tempbuf_short[8]==dmb_header2_bit[2])&&(tempbuf_short[12]==dmb_header2_bit[3]));
898 alct_h1_check[
j]=((tempbuf_short[0]==alct_header1_bit[0])&&(tempbuf_short[4]==alct_header1_bit[1])&&
899 (tempbuf_short[8]==alct_header1_bit[2])&&(tempbuf_short[12]==alct_header1_bit[3])&&
900 (tempbuf_short[13]==alct_header1_bit[4])&&(tempbuf_short[14]==alct_header1_bit[5])&&
901 (tempbuf_short[15]==alct_header1_bit[6]));
902 alct_h2_check[
j]=(((tempbuf_short[0]==alct_header2_bit[0])&&(tempbuf_short[1]==alct_header2_bit[1])&&
903 (tempbuf_short[2]==alct_header2_bit[2])&&(tempbuf_short[3]==alct_header2_bit[3]))||
904 ((tempbuf_short[4]==alct_header2_bit[0])&&(tempbuf_short[5]==alct_header2_bit[1])&&
905 (tempbuf_short[6]==alct_header2_bit[2])&&(tempbuf_short[7]==alct_header2_bit[3]))||
906 ((tempbuf_short[8]==alct_header2_bit[0])&&(tempbuf_short[9]==alct_header2_bit[1])&&
907 (tempbuf_short[10]==alct_header2_bit[2])&&(tempbuf_short[11]==alct_header2_bit[3]))||
908 ((tempbuf_short[12]==alct_header2_bit[0])&&(tempbuf_short[13]==alct_header2_bit[1])&&
909 (tempbuf_short[14]==alct_header2_bit[2])&&(tempbuf_short[15]==alct_header2_bit[3]))
913 alct_tr1_check[
j]=(((buf[
i+4*(
j-1)]&0xFFFF)==0xDE0D)&&((buf[
i+4*(
j-1)+1]&0xF800)==0xD000)&&
914 ((buf[
i+4*(
j-1)+2]&0xF800)==0xD000)&&((buf[
i+4*(
j-1)+3]&0xF000)==0xD000));
916 dmb_tr1_check[
j]=((tempbuf_short[0]==dmb_tr1_bit[0])&&(tempbuf_short[4]==dmb_tr1_bit[1])&&
917 (tempbuf_short[8]==dmb_tr1_bit[2])&&(tempbuf_short[12]==dmb_tr1_bit[3]));
918 dmb_tr2_check[
j]=((tempbuf_short[0]==dmb_tr2_bit[0])&&(tempbuf_short[4]==dmb_tr2_bit[1])&&
919 (tempbuf_short[8]==dmb_tr2_bit[2])&&(tempbuf_short[12]==dmb_tr2_bit[3]));
921 tmb_h1_check[
j]=((tempbuf_short[0]==tmb_header1_bit[0])&&(tempbuf_short[4]==tmb_header1_bit[1])&&
922 (tempbuf_short[8]==tmb_header1_bit[2])&&(tempbuf_short[12]==tmb_header1_bit[3])&&
923 (tempbuf_short[13]==tmb_header1_bit[4])&&(tempbuf_short[14]==tmb_header1_bit[5])&&
924 (tempbuf_short[15]==tmb_header1_bit[6]));
925 tmb_tr1_check[
j]=((tempbuf_short[0]==tmb_tr1_bit[0])&&(tempbuf_short[4]==tmb_tr1_bit[1])&&
926 (tempbuf_short[8]==tmb_tr1_bit[2])&&(tempbuf_short[12]==tmb_tr1_bit[3])&&
927 (tempbuf_short[13]==tmb_tr1_bit[4])&&(tempbuf_short[14]==tmb_tr1_bit[5])&&
928 (tempbuf_short[15]==tmb_tr1_bit[6]));
930 cfeb_tr1_check[
j]=(((buf[
i+4*(
j-1)+1]&0xF000)==0x7000) &&
931 ((buf[
i+4*(
j-1)+2]&0xF000)==0x7000) &&
932 (( buf[
i+4*(
j-1)+1]!= 0x7FFF) || (buf[
i+4*(
j-1)+2] != 0x7FFF)) &&
933 ((buf[
i+4*(
j-1)+3] == 0x7FFF) ||
934 ((buf[
i+4*(
j-1)+3]&buf[
i+4*(
j-1)]) == 0x0&&(buf[
i+4*(
j-1)+3] + buf[
i+4*(
j-1)] == 0x7FFF ))) );
935 cfeb_b_check[
j]=(((buf[
i+4*(
j-1)+3]&0xF000)==0xB000)&&((buf[
i+4*(
j-1)+2]&0xF000)==0xB000) &&
936 ((buf[
i+4*(
j-1)+1]&0xF000)==0xB000)&&((buf[
i+4*(
j-1)]=3&0xF000)==0xB000) );
938 ddu_tr1_bad_check[
j]=((tempbuf_short[0]!=ddu_trailer1_bit[0])&&
941 (tempbuf_short[4]!=ddu_trailer1_bit[4])&&
944 (tempbuf_short[8]==ddu_trailer1_bit[8])&&(tempbuf_short[9]==ddu_trailer1_bit[9])&&
945 (tempbuf_short[10]==ddu_trailer1_bit[10])&&(tempbuf_short[11]==ddu_trailer1_bit[11])&&
946 (tempbuf_short[12]==ddu_trailer1_bit[12])&&(tempbuf_short[13]==ddu_trailer1_bit[13])&&
947 (tempbuf_short[14]==ddu_trailer1_bit[14])&&(tempbuf_short[15]==ddu_trailer1_bit[15]));
951 ddu_h2_h1=ddu_h2_check[2];
953 sprintf(tempbuf_short,
"%04x%04x%04x%04x",buf[
i+3],buf[
i+2],buf[
i+1],buf[
i]);
956 ddu_h1_12_13=(buf[
i]>>8);
957 for (
int kk=0;
kk<36;
kk++)
959 if (((buf[i+3]&0xF000)==0x5000)&&(ddu_h1_12_13==ddu_id[
kk])&&ddu_h2_h1)
961 ddu_h1_coll.push_back(word_numbering);
962 ddu_h1_n_coll.push_back(ddu_id[
kk]);
963 ddu_inst_l1a=((buf[i+2]&0xFFFF)+((buf[i+3]&0x00FF)<<16));
964 ddu_l1a_coll.push_back(ddu_inst_l1a);
965 ddu_inst_bxn=(buf[i+1]&0xFFF0)>>4;
966 ddu_bxn_coll.push_back(ddu_inst_bxn);
967 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s%i %s%s %s %i %s %i",
968 word_numbering,buf[i+3],buf[i+2],buf[i+1],buf[i],
969 sign1,ddu_common,ddu_id[kk],ddu_header1,sign1,dmb_common_l1a,ddu_inst_l1a,alct_common_bxn,ddu_inst_bxn);
980 dcc_h1_id=(((buf[i+1]<<12)&0xF000)>>4)+(buf[i]>>8);
981 for (
int dcci=0; dcci<16; dcci++)
983 if ((dcc_id[dcci]==dcc_h1_id)&&(((buf[i+3]&0xF000)==0x5000)&&(!ddu_h1_check)))
985 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s%i %s",word_numbering,buf[i+3],buf[i+2],buf[i+1],buf[i],
986 sign1,dcc_common,dcc_h1_id,dcc_header1);
987 dcc_h1_check=word_numbering;
995 if (((word_numbering-1)==dcc_h1_check)&&((buf[i+3]&0xFF00)==0xD900))
997 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s",word_numbering,buf[i+3],buf[i+2],buf[i+1],buf[i],
1002 else if ((word_numbering==word_lines-1)&&(tempbuf_short[0]==dcc_trail1_bit[0]))
1004 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s",word_numbering,buf[i+3],buf[i+2],buf[i+1],buf[i],
1009 else if ((word_numbering==word_lines)&&(tempbuf_short[0]==dcc_trail2_bit[0]))
1011 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s",word_numbering,buf[i+3],buf[i+2],buf[i+1],buf[i],
1018 else if (ddu_h2_check[1])
1020 ddu_inst_i = ddu_h1_n_coll.size();
1023 ddu_inst_n=ddu_h1_n_coll[ddu_inst_i-1];
1025 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s%i %s",
1026 word_numbering,buf[i+3],buf[i+2],buf[i+1],buf[i],sign1,ddu_common,
1027 ddu_inst_n, ddu_header2);
1028 ddu_h2_coll.push_back(word_numbering);
1035 else if ((ddu_h2_check[0]&&dmb_h1_check[2])||(ddu_h2_check[0]&&ddu_tr1_check[2]))
1037 ddu_inst_i = ddu_h1_n_coll.size();
1040 ddu_inst_n=ddu_h1_n_coll[ddu_inst_i-1];
1042 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s%i %s",word_numbering,buf[i+3],buf[i+2],buf[i+1],buf[i],
1043 sign1,ddu_common,ddu_inst_n,ddu_header3);
1044 ddu_h3_coll.push_back(word_numbering);
1052 else if (dmb_h1_check[1])
1056 dmb_inst_l1a=((buf[
i]&0x0FFF)+((buf[i+1]&0xFFF)<<12));
1057 dmb_l1a_coll.push_back(dmb_inst_l1a);
1058 if (dmb_h2_check[2])
1060 dmb_inst_crate=((buf[i+4+1]>>4)&0xFF);
1061 dmb_inst_slot=(buf[i+4+1]&0xF);
1062 dmb_crate_coll.push_back(dmb_inst_crate);
1063 dmb_slot_coll.push_back(dmb_inst_slot);
1065 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s %s%s%s %i %s %i %s %i",
1066 word_numbering,buf[i+3],buf[i+2],buf[i+1],buf[i],
1067 sign1,dmb_common,dmb_header1,sign1,dmb_common_crate,dmb_inst_crate,
1068 dmb_common_slot,dmb_inst_slot,dmb_common_l1a,dmb_inst_l1a);
1069 dmb_h1_coll.push_back(word_numbering);
1075 else if (dmb_h2_check[1])
1077 dmb_inst_crate=((buf[i+1]>>4)&0xFF);
1078 dmb_inst_slot=(buf[i+1]&0xF);
1079 dmb_h2_coll.push_back(word_numbering);
1080 if (dmb_h1_check[0])
1081 dmb_inst_l1a=((buf[i-4]&0x0FFF)+((buf[i-4+1]&0xFFF)<<12));
1082 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s %s%s%s %i %s %i %s %i",
1083 word_numbering,buf[i+3],buf[i+2],buf[i+1],buf[i],
1084 sign1,dmb_common,dmb_header2,sign1,dmb_common_crate,dmb_inst_crate,
1085 dmb_common_slot,dmb_inst_slot,dmb_common_l1a,dmb_inst_l1a);
1093 else if (ddu_tr1_check[1])
1095 ddu_inst_i = ddu_h1_n_coll.size();
1098 ddu_inst_n=ddu_h1_n_coll[ddu_inst_i-1];
1101 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s%i %s",
1102 word_numbering,buf[i+3],buf[i+2],buf[i+1],buf[i],sign1,ddu_common,ddu_inst_n,ddu_trail1);
1103 ddu_t1_coll.push_back(word_numbering);
1109 else if (alct_h1_check[1])
1111 alct_start=word_numbering;
1112 alct_inst_l1a=(buf[i+2]&0x0FFF);
1113 alct_l1a_coll.push_back(alct_inst_l1a);
1114 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s %s%s %s %i",
1115 word_numbering,buf[i+3],buf[i+2],buf[i+1],buf[i],
1116 sign1,alct_common,alct_header1,sign1,dmb_common_l1a,alct_inst_l1a);
1117 alct_h1_coll.push_back(word_numbering);
1122 else if ((alct_h1_check[0])&&(alct_h2_check[2]))
1124 alct_inst_bxn=(buf[
i]&0x0FFF);
1125 alct_bxn_coll.push_back(alct_inst_bxn);
1126 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s %s%s%s %i",
1127 word_numbering,buf[i+3],buf[i+2],buf[i+1],buf[i],
1128 sign1,alct_common,alct_header2,sign1,alct_common_bxn,alct_inst_bxn);
1129 alct_h2_coll.push_back(word_numbering);
1135 else if (alct_tr1_check[1])
1137 alct_stop=word_numbering;
1138 if ((alct_start!=0)&&(alct_stop!=0)&&(alct_stop>alct_start))
1140 alct_inst_wcnt2=4*(alct_stop-alct_start+1);
1141 alct_wcnt2_coll.push_back(alct_inst_wcnt2);
1142 alct_wcnt2_id_coll.push_back(alct_start);
1144 alct_inst_wcnt1=(buf[i+3]&0x7FF);
1145 alct_wcnt1_coll.push_back(alct_inst_wcnt1);
1146 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s %s%s%s %i %s %i",
1147 word_numbering,buf[i+3],buf[i+2],buf[i+1],buf[i],
1148 sign1,alct_common,alct_tr1,sign1,alct_common_wcnt1,alct_inst_wcnt1,
1149 alct_common_wcnt2,alct_inst_wcnt2);
1150 alct_t1_coll.push_back(word_numbering);
1159 else if((ddu_h2_h1)&&(tempbuf_short[0]==ddu_trailer3_bit[0])){
1161 ddu_inst_i = ddu_h1_n_coll.size();
1164 ddu_inst_n=ddu_h1_n_coll[ddu_inst_i-1];
1167 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s%i %s",
1168 word_numbering,buf[i+3],buf[i+2],buf[i+1],buf[i],sign1,ddu_common,ddu_inst_n,ddu_trail3);
1169 ddu_t3_coll.push_back(word_numbering);
1174 else if ((ddu_tr1_check[0])&&(tempbuf_short[0]!=ddu_trailer3_bit[0]))
1177 ddu_inst_i = ddu_h1_n_coll.size();
1180 ddu_inst_n=ddu_h1_n_coll[ddu_inst_i-1];
1183 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s%i %s",
1184 word_numbering,buf[i+3],buf[i+2],buf[i+1],buf[i],sign1,ddu_common,ddu_inst_n,ddu_trail2);
1185 ddu_t2_coll.push_back(word_numbering);
1191 else if (dmb_tr1_check[1])
1193 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s %s",
1194 word_numbering,buf[i+3],buf[i+2],buf[i+1],buf[i],sign1,dmb_common,dmb_tr1);
1195 dmb_t1_coll.push_back(word_numbering);
1201 else if (dmb_tr2_check[1])
1203 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s %s",
1204 word_numbering,buf[i+3],buf[i+2],buf[i+1],buf[i],sign1,dmb_common,dmb_tr2);
1205 dmb_t2_coll.push_back(word_numbering);
1210 else if (tmb_h1_check[1])
1212 tmb_start=word_numbering;
1213 tmb_inst_l1a=(buf[i+2]&0x000F);
1214 tmb_l1a_coll.push_back(tmb_inst_l1a);
1215 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s %s%s%s %i",
1216 word_numbering,buf[i+3],buf[i+2],buf[i+1],buf[i],sign1,tmb_common,tmb_header1,
1217 sign1,dmb_common_l1a,tmb_inst_l1a);
1218 tmb_h1_coll.push_back(word_numbering);
1222 else if (tmb_tr1_check[1])
1224 tmb_stop=word_numbering;
1225 if ((tmb_start!=0)&&(tmb_stop!=0)&&(tmb_stop>tmb_start))
1227 tmb_inst_wcnt2=4*(tmb_stop-tmb_start+1);
1228 tmb_wcnt2_coll.push_back(tmb_inst_wcnt2);
1230 tmb_inst_wcnt1=(buf[i+3]&0x7FF);
1231 tmb_wcnt1_coll.push_back(tmb_inst_wcnt1);
1232 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s %s%s%s %i %s %i",
1233 word_numbering,buf[i+3],buf[i+2],buf[i+1],buf[i],
1234 sign1,tmb_common,tmb_tr1,sign1,alct_common_wcnt1,tmb_inst_wcnt1,
1235 alct_common_wcnt2,tmb_inst_wcnt2);
1236 tmb_t1_coll.push_back(word_numbering);
1242 else if (cfeb_tr1_check[1])
1245 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s %s%s %s %i",
1246 word_numbering,buf[i+3],buf[i+2],buf[i+1],buf[i],
1247 sign1,cfeb_common,cfeb_tr1,sign1,cfeb_common_sample,cfeb_sample);
1248 cfeb_t1_coll.push_back(word_numbering);
1252 else if (cfeb_b_check[1])
1254 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s %s",
1255 word_numbering,buf[i+3],buf[i+2],buf[i+1],buf[i],sign1,cfeb_common,cfeb_b);
1262 else if (ddu_tr1_bad_check[1])
1264 ddu_inst_i = ddu_h1_n_coll.size();
1265 ddu_inst_n=ddu_h1_n_coll[ddu_inst_i-1];
1266 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s%i %s %s",
1267 word_numbering,buf[i+3],buf[i+2],buf[i+1],buf[i],sign1,ddu_common,ddu_inst_n,
1268 ddu_trail1,ddu_tr1_err_common);
1273 else if (extraction&&(!ddu_h1_check)&&(!dcc_check))
1277 sprintf(tempbuf,
"%6i %04x %04x %04x %04x",
1278 word_numbering,buf[i+3],buf[i+2],buf[i+1],buf[i]);
1284 std::cout <<
"..................................................." << std::endl;
1289 else if ((!ddu_h1_check)&&(!dcc_check))
1291 sprintf(tempbuf,
"%6i %04x %04x %04x %04x",word_numbering,buf[i+3],buf[i+2],buf[i+1],buf[i]);
1300 std::cout <<
"********************************************************************************" <<
1301 std::endl << std::endl;
1303 std::cout <<
"For complete output turn off VisualFEDShort in muonCSCDigis configuration file." << std::endl;
1304 std::cout <<
"********************************************************************************" <<
1305 std::endl << std::endl;
1309 std::cout << ddu_h1_coll.size() <<
" "<< ddu_common <<
" "<<ddu_header1 <<
" "<<
"found" << std::endl;
1314 for (
unsigned int k=0;
k<ddu_h1_coll.size(); ++
k)
1321 std::cout <<
"Line: " <<
" " << ddu_h1_coll[
k] <<
" " << sign1 <<
" " <<
1322 ddu_common <<
" " << ddu_h1_n_coll[
k] <<
" " << dmb_common_l1a <<
" " << ddu_l1a_coll[
k] <<
" " <<
1323 alct_common_bxn <<
" " << ddu_bxn_coll[
k] << std::endl;
1328 std::cout <<
"||||||||||||||||||||" << std::endl;
1330 std::cout << ddu_h2_coll.size() <<
" "<< ddu_common <<
" "<<ddu_header2 <<
" "<<
"found" << std::endl;
1331 for (
unsigned int k=0;
k<ddu_h2_coll.size(); ++
k)
1332 std::cout <<
"Line: " << ddu_h2_coll[
k] << std::endl;
1334 std::cout <<
"||||||||||||||||||||" << std::endl;
1336 std::cout << ddu_h3_coll.size() <<
" "<< ddu_common <<
" "<<ddu_header3 <<
" "<<
"found" << std::endl;
1337 for (
unsigned int k=0;
k<ddu_h3_coll.size(); ++
k)
1338 std::cout <<
"Line: " << ddu_h3_coll[
k] << std::endl;
1340 std::cout <<
"||||||||||||||||||||" << std::endl;
1342 std::cout << ddu_t1_coll.size() <<
" "<< ddu_common <<
" "<<ddu_trail1 <<
" "<<
"found" << std::endl;
1343 for (
unsigned int k=0;
k<ddu_t1_coll.size(); ++
k)
1344 std::cout <<
"Line: " << ddu_t1_coll[
k] << std::endl;
1346 std::cout <<
"||||||||||||||||||||" << std::endl;
1348 std::cout << ddu_t2_coll.size() <<
" "<< ddu_common <<
" "<<ddu_trail2 <<
" "<<
"found" << std::endl;
1349 for (
unsigned int k=0;
k<ddu_t2_coll.size(); ++
k)
1350 std::cout <<
"Line: " << ddu_t2_coll[
k] << std::endl;
1352 std::cout <<
"||||||||||||||||||||" << std::endl;
1354 std::cout << ddu_t3_coll.size() <<
" "<< ddu_common <<
" "<<ddu_trail3 <<
" "<<
"found" << std::endl;
1355 for (
unsigned int k=0;
k<ddu_t3_coll.size(); ++
k)
1356 std::cout <<
"Line: " << ddu_t3_coll[
k] << std::endl;
1358 std::cout <<
"||||||||||||||||||||" << std::endl;
1360 std::cout << dmb_h1_coll.size() <<
" "<< dmb_common <<
" "<<dmb_header1 <<
" "<<
"found" << std::endl;
1362 for (
unsigned int k=0;
k<dmb_h1_coll.size(); ++
k)
1369 std::cout <<
"Line: " <<
" " << dmb_h1_coll[
k] <<
" " << sign1 << dmb_common
1370 <<
" " << dmb_common_crate <<
" " << dmb_crate_coll[
k] <<
" " << dmb_common_slot <<
" " <<
1371 dmb_slot_coll[
k] <<
" " << dmb_common_l1a <<
" " << dmb_l1a_coll[
k] << std::endl;
1374 std::cout <<
"||||||||||||||||||||" << std::endl;
1376 std::cout << dmb_h2_coll.size() <<
" "<< dmb_common <<
" "<<dmb_header2 <<
" "<<
"found" << std::endl;
1377 for (
unsigned int k=0;
k<dmb_h2_coll.size(); ++
k)
1378 std::cout <<
"Line: " << dmb_h2_coll[
k] << std::endl;
1380 std::cout <<
"||||||||||||||||||||" << std::endl;
1382 std::cout << dmb_t1_coll.size() <<
" "<< dmb_common <<
" "<<dmb_tr1 <<
" "<<
"found" << std::endl;
1383 for (
unsigned int k=0;
k<dmb_t1_coll.size(); ++
k)
1384 std::cout <<
"Line: " << dmb_t1_coll[
k] << std::endl;
1386 std::cout <<
"||||||||||||||||||||" << std::endl;
1388 std::cout << dmb_t2_coll.size() <<
" "<< dmb_common <<
" "<<dmb_tr2 <<
" "<<
"found" << std::endl;
1389 for (
unsigned int k=0;
k<dmb_t2_coll.size(); ++
k)
1390 std::cout <<
"Line: " << dmb_t2_coll[
k] << std::endl;
1392 std::cout <<
"||||||||||||||||||||" << std::endl;
1394 std::cout << alct_h1_coll.size() <<
" "<< alct_common <<
" "<<alct_header1 <<
" "<<
"found" << std::endl;
1395 for (
unsigned int k=0;
k<alct_h1_coll.size(); ++
k)
1404 alct_h1_coll[
k] <<
" " << sign1 <<
" " << alct_common <<
" " <<
1405 dmb_common_l1a <<
" " << alct_l1a_coll[
k] << std::endl;
1409 std::cout <<
"||||||||||||||||||||" << std::endl;
1411 std::cout << alct_h2_coll.size() <<
" "<< alct_common <<
" "<<alct_header2 <<
" "<<
"found" << std::endl;
1412 for (
unsigned int k=0;
k<alct_h2_coll.size(); ++
k)
1421 alct_h1_coll[
k] <<
" " << sign1 <<
" " << alct_common <<
" " <<
1422 alct_common_bxn <<
" " << alct_bxn_coll[
k] << std::endl;
1426 std::cout <<
"||||||||||||||||||||" << std::endl;
1428 std::cout << alct_t1_coll.size() <<
" "<< alct_common <<
" "<<alct_tr1 <<
" "<<
"found" << std::endl;
1429 for (
unsigned int k=0;
k<alct_t1_coll.size(); ++
k)
1437 std::cout <<
"Line: " <<
" " << alct_t1_coll[
k] <<
" " << sign1 <<
" " << alct_common <<
" " <<
1438 alct_common_wcnt1 <<
" " << alct_wcnt1_coll[
k] <<
" " << alct_common_wcnt2 <<
" ";
1439 if (alct_wcnt2_coll.size()>0)
1441 std::cout << alct_wcnt2_coll[
k] << std::endl;
1445 std::cout <<
"Undefined (ALCT Header is not found) " << std::endl;
1450 std::cout <<
"||||||||||||||||||||" << std::endl;
1452 std::cout << tmb_h1_coll.size() <<
" "<< tmb_common <<
" "<<tmb_header1 <<
" "<<
"found" << std::endl;
1453 for (
unsigned int k=0;
k<tmb_h1_coll.size(); ++
k)
1461 std::cout <<
"Line: " <<
" " << tmb_h1_coll[
k] <<
" " << sign1 <<
" " << tmb_common <<
" " <<
1462 dmb_common_l1a <<
" " << tmb_l1a_coll[
k] << std::endl;
1466 std::cout <<
"||||||||||||||||||||" << std::endl;
1468 std::cout << tmb_t1_coll.size() <<
" "<< tmb_common <<
" "<<tmb_tr1 <<
" "<<
"found" << std::endl;
1469 for (
unsigned int k=0;
k<tmb_t1_coll.size(); ++
k)
1477 std::cout <<
"Line: " <<
" " << tmb_t1_coll[
k] <<
" " << sign1 <<
" " << tmb_common <<
" " <<
1478 alct_common_wcnt1 <<
" " << tmb_wcnt1_coll[
k] <<
" " << alct_common_wcnt2 <<
" " << tmb_wcnt2_coll[
k]
1484 std::cout <<
"||||||||||||||||||||" << std::endl;
1486 std::cout << cfeb_t1_coll.size() <<
" "<< cfeb_common <<
" "<<cfeb_tr1 <<
" "<<
"found" << std::endl;
1487 for (
unsigned int k=0;
k<cfeb_t1_coll.size(); ++
k)
1488 std::cout <<
"Line: " << cfeb_t1_coll[
k] << std::endl;
1489 std::cout <<
"********************************************************************************" << std::endl;
T getParameter(std::string const &) const
EventNumber_t event() const
void crcCFEB(bool enable)
T getUntrackedParameter(std::string const &, T const &) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool SuppressZeroLCT
Suppress zeros LCTs.
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
static void setDebug(bool value)
void modeDDU(bool enable)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
CSCDetId detId(int vme, int dmb, int cfeb, int layer=0) const
int ddu(const CSCDetId &) const
ddu id for given DetId
CSCMonitorInterface * monitor
ExaminerStatusType errors(void) const
void crcALCT(bool enable)
const char * errName(int num) const
bool visualFEDInspect
Visualization of raw data.
size_t size() const
Lenght of the data buffer in bytes.
void produce(edm::Event &e, const edm::EventSetup &c)
Produce digis out of raw data.
uint32_t rawId() const
get the raw id
virtual void process(CSCDCCExaminer *examiner, CSCDCCEventData *dccData)=0
static void setDebug(const bool value)
void visual_raw(int hl, int id, int run, int event, bool fedshort, bool fDump, short unsigned int *buf) const
Visualization of raw data in FED-less events (Robert Harr and Alexander Sakharov) ...
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
std::map< CSCIdType, ExaminerStatusType > errorsDetailed(void) const
static void setErrorMask(unsigned int value)
static void setDebug(bool value)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
std::map< CSCIdType, ExaminerStatusType > statusDetailed(void) const
static void setDebug(const bool value)
ExaminerMaskType getMask() const
void setComment(std::string const &value)
edm::EDGetTokenT< FEDRawDataCollection > i_token
Token for consumes interface & access to data.
unsigned int examinerMask
bool useSelectiveUnpacking
void add(std::string const &label, ParameterSetDescription const &psetDescription)
int32_t check(const uint16_t *&buffer, int32_t length)
std::map< CSCIdType, ExaminerStatusType > payloadDetailed(void) const
char data[epos_bytes_allocation]
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
CSCDCCUnpacker(const edm::ParameterSet &pset)
Constructor.
std::map< DDUIdType, ExaminerStatusType > errorsDetailedDDU(void) const
virtual ~CSCDCCUnpacker()
Destructor.
T const * product() const
void setMask(ExaminerMaskType mask)
static void setDebug(const bool value)
static void setDebug(bool debugValue)