Visualization of raw data in FED-less events (Robert Harr and Alexander Sakharov)
Visualization of raw data.
644 std::cout << std::endl << std::endl << std::endl;
645 std::cout <<
"Run: "<<
run <<
" Event: " <<
event << std::endl;
648 std::cout <<
"FED-" <<
id <<
" " <<
"(scroll down to see summary)" << std::endl;
650 std::cout <<
"Problem seems in FED-" <<
id <<
" " <<
"(scroll down to see summary)" << std::endl;
651 std::cout <<
"********************************************************************************" << std::endl;
652 std::cout << hl <<
" words of data:" << std::endl;
656 std::vector<int> dcc_id;
659 for (
int i=750;
i<758;
i++)
662 for (
int i=830;
i<838;
i++)
665 char dcc_common[]=
"DCC-";
669 std::vector<int> ddu_id;
671 for (
int i=1;
i<37;
i++)
674 char ddu_common[]=
"DDU-";
675 char ddu_header1[]=
"Header 1";
676 char ddu_header2[]=
"Header 2";
677 char ddu_header3[]=
"Header 3";
678 char ddu_trail1[]=
"Trailer 1", ddu_trail2[]=
"Trailer 2", ddu_trail3[]=
"Trailer 3";
680 char ddu_trailer1_bit[]= {
'8',
'0',
'0',
'0',
'f',
'f',
'f',
'f',
'8',
'0',
'0',
'0',
'8',
'0',
'0',
'0'};
681 char ddu_trailer3_bit[]= {
'a'};
683 char ddu_tr1_err_common[]=
"Incomplet";
687 char dmb_common[]=
"DMB", dmb_header1[]=
"Header 1", dmb_header2[]=
"Header 2";
688 char dmb_common_crate[]=
"crate:", dmb_common_slot[]=
"slot:";
689 char dmb_common_l1a[]=
"L1A:";
690 char dmb_header1_bit[]= {
'9',
'9',
'9',
'9'};
691 char dmb_header2_bit[]= {
'a',
'a',
'a',
'a'};
692 char dmb_tr1[]=
"Trailer 1", dmb_tr2[]=
"Trailer 2";
693 char dmb_tr1_bit[]= {
'f',
'f',
'f',
'f'}, dmb_tr2_bit[]= {
'e',
'e',
'e',
'e'};
699 char alct_common[]=
"ALCT", alct_header1[]=
"Header 1", alct_header2[]=
"Header 2";
700 char alct_common_bxn[]=
"BXN:";
701 char alct_common_wcnt2[]=
"| Actual word count:";
702 char alct_common_wcnt1[]=
"Expected word count:";
703 char alct_header1_bit[]= {
'd',
'd',
'd',
'd',
'b',
'0',
'a'};
704 char alct_header2_bit[]= {
'0',
'0',
'0',
'0'};
705 char alct_tr1[]=
"Trailer 1";
710 char tmb_common[]=
"TMB", tmb_header1[]=
"Header", tmb_tr1[]=
"Trailer";
711 char tmb_header1_bit[]= {
'd',
'd',
'd',
'd',
'b',
'0',
'c'};
712 char tmb_tr1_bit[]= {
'd',
'd',
'd',
'd',
'e',
'0',
'f'};
717 char cfeb_common[]=
"CFEB", cfeb_tr1[]=
"Trailer", cfeb_b[]=
"B-word";
718 char cfeb_common_sample[]=
"sample:";
728 char tempbuf_short[17];
729 char sign1[]=
" --->| ";
732 int word_numbering=0;
733 int ddu_inst_i=0, ddu_inst_n=0, ddu_inst_l1a=0;
735 int dmb_inst_crate=0, dmb_inst_slot=0, dmb_inst_l1a=0;
739 int alct_inst_wcnt1=0;
740 int alct_inst_wcnt2=0;
744 int tmb_inst_wcnt1=0;
745 int tmb_inst_wcnt2=0;
756 bool dcc_check=
false;
757 bool ddu_h2_check[sz1]= {
false};
758 bool ddu_h1_check=
false;
759 bool dmb_h1_check[sz1]= {
false};
760 bool dmb_h2_check[sz1]= {
false};
761 bool ddu_h2_h1=
false;
762 bool ddu_tr1_check[sz1]= {
false};
763 bool alct_h1_check[sz1]= {
false};
764 bool alct_h2_check[sz1]= {
false};
765 bool alct_tr1_check[sz1]= {
false};
766 bool dmb_tr1_check[sz1]= {
false};
767 bool dmb_tr2_check[sz1]= {
false};
768 bool tmb_h1_check[sz1]= {
false};
769 bool tmb_tr1_check[sz1]= {
false};
770 bool cfeb_tr1_check[sz1]= {
false};
771 bool cfeb_b_check[sz1]= {
false};
772 bool ddu_tr1_bad_check[sz1]= {
false};
773 bool extraction=fedshort;
777 std::vector<int> ddu_h1_coll;
778 std::vector<int> ddu_h1_n_coll;
779 std::vector<int> ddu_h2_coll;
780 std::vector<int> ddu_h3_coll;
781 std::vector<int> ddu_t1_coll;
782 std::vector<int> ddu_t2_coll;
783 std::vector<int> ddu_t3_coll;
784 std::vector<int> ddu_l1a_coll;
785 std::vector<int> ddu_bxn_coll;
787 std::vector<int> dmb_h1_coll;
788 std::vector<int> dmb_h2_coll;
789 std::vector<int> dmb_t1_coll;
790 std::vector<int> dmb_t2_coll;
791 std::vector<int> dmb_crate_coll;
792 std::vector<int> dmb_slot_coll;
793 std::vector<int> dmb_l1a_coll;
795 std::vector<int> alct_h1_coll;
796 std::vector<int> alct_h2_coll;
797 std::vector<int> alct_t1_coll;
798 std::vector<int> alct_l1a_coll;
799 std::vector<int> alct_bxn_coll;
800 std::vector<int> alct_wcnt1_coll;
801 std::vector<int> alct_wcnt2_coll;
802 std::vector<int> alct_wcnt2_id_coll;
804 std::vector<int> tmb_h1_coll;
805 std::vector<int> tmb_t1_coll;
806 std::vector<int> tmb_l1a_coll;
807 std::vector<int> tmb_wcnt1_coll;
808 std::vector<int> tmb_wcnt2_coll;
810 std::vector<int> cfeb_t1_coll;
815 char dcc_header1[]=
"DCC Header 1";
816 char dcc_header2[]=
"DCC Header 2";
817 char dcc_trail1[]=
"DCC Trailer 1", dcc_trail1_bit[]= {
'e'};
818 char dcc_trail2[]=
"DCC Trailer 2", dcc_trail2_bit[]= {
'a'};
821 for (
int i=0;
i < hl;
i++)
824 for (
int j=-1;
j<4;
j++)
827 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)]);
833 ddu_h2_check[
j]=((buf[
i+4*(
j-1)+1]==0x8000)&&
834 (buf[
i+4*(
j-1)+2]==0x0001)&&(buf[
i+4*(
j-1)+3]==0x8000));
836 ddu_tr1_check[
j]=((tempbuf_short[0]==ddu_trailer1_bit[0])&&(tempbuf_short[1]==ddu_trailer1_bit[1])&&
837 (tempbuf_short[2]==ddu_trailer1_bit[2])&&(tempbuf_short[3]==ddu_trailer1_bit[3])&&
838 (tempbuf_short[4]==ddu_trailer1_bit[4])&&(tempbuf_short[5]==ddu_trailer1_bit[5])&&
839 (tempbuf_short[6]==ddu_trailer1_bit[6])&&(tempbuf_short[7]==ddu_trailer1_bit[7])&&
840 (tempbuf_short[8]==ddu_trailer1_bit[8])&&(tempbuf_short[9]==ddu_trailer1_bit[9])&&
841 (tempbuf_short[10]==ddu_trailer1_bit[10])&&(tempbuf_short[11]==ddu_trailer1_bit[11])&&
842 (tempbuf_short[12]==ddu_trailer1_bit[12])&&(tempbuf_short[13]==ddu_trailer1_bit[13])&&
843 (tempbuf_short[14]==ddu_trailer1_bit[14])&&(tempbuf_short[15]==ddu_trailer1_bit[15]));
845 dmb_h1_check[
j]=((tempbuf_short[0]==dmb_header1_bit[0])&&(tempbuf_short[4]==dmb_header1_bit[1])&&
846 (tempbuf_short[8]==dmb_header1_bit[2])&&(tempbuf_short[12]==dmb_header1_bit[3]));
848 dmb_h2_check[
j]=((tempbuf_short[0]==dmb_header2_bit[0])&&(tempbuf_short[4]==dmb_header2_bit[1])&&
849 (tempbuf_short[8]==dmb_header2_bit[2])&&(tempbuf_short[12]==dmb_header2_bit[3]));
850 alct_h1_check[
j]=((tempbuf_short[0]==alct_header1_bit[0])&&(tempbuf_short[4]==alct_header1_bit[1])&&
851 (tempbuf_short[8]==alct_header1_bit[2])&&(tempbuf_short[12]==alct_header1_bit[3])&&
852 (tempbuf_short[13]==alct_header1_bit[4])&&(tempbuf_short[14]==alct_header1_bit[5])&&
853 (tempbuf_short[15]==alct_header1_bit[6]));
854 alct_h2_check[
j]=(((tempbuf_short[0]==alct_header2_bit[0])&&(tempbuf_short[1]==alct_header2_bit[1])&&
855 (tempbuf_short[2]==alct_header2_bit[2])&&(tempbuf_short[3]==alct_header2_bit[3]))||
856 ((tempbuf_short[4]==alct_header2_bit[0])&&(tempbuf_short[5]==alct_header2_bit[1])&&
857 (tempbuf_short[6]==alct_header2_bit[2])&&(tempbuf_short[7]==alct_header2_bit[3]))||
858 ((tempbuf_short[8]==alct_header2_bit[0])&&(tempbuf_short[9]==alct_header2_bit[1])&&
859 (tempbuf_short[10]==alct_header2_bit[2])&&(tempbuf_short[11]==alct_header2_bit[3]))||
860 ((tempbuf_short[12]==alct_header2_bit[0])&&(tempbuf_short[13]==alct_header2_bit[1])&&
861 (tempbuf_short[14]==alct_header2_bit[2])&&(tempbuf_short[15]==alct_header2_bit[3]))
865 alct_tr1_check[
j]=(((buf[
i+4*(
j-1)]&0xFFFF)==0xDE0D)&&((buf[
i+4*(
j-1)+1]&0xF800)==0xD000)&&
866 ((buf[
i+4*(
j-1)+2]&0xF800)==0xD000)&&((buf[
i+4*(
j-1)+3]&0xF000)==0xD000));
868 dmb_tr1_check[
j]=((tempbuf_short[0]==dmb_tr1_bit[0])&&(tempbuf_short[4]==dmb_tr1_bit[1])&&
869 (tempbuf_short[8]==dmb_tr1_bit[2])&&(tempbuf_short[12]==dmb_tr1_bit[3]));
870 dmb_tr2_check[
j]=((tempbuf_short[0]==dmb_tr2_bit[0])&&(tempbuf_short[4]==dmb_tr2_bit[1])&&
871 (tempbuf_short[8]==dmb_tr2_bit[2])&&(tempbuf_short[12]==dmb_tr2_bit[3]));
873 tmb_h1_check[
j]=((tempbuf_short[0]==tmb_header1_bit[0])&&(tempbuf_short[4]==tmb_header1_bit[1])&&
874 (tempbuf_short[8]==tmb_header1_bit[2])&&(tempbuf_short[12]==tmb_header1_bit[3])&&
875 (tempbuf_short[13]==tmb_header1_bit[4])&&(tempbuf_short[14]==tmb_header1_bit[5])&&
876 (tempbuf_short[15]==tmb_header1_bit[6]));
877 tmb_tr1_check[
j]=((tempbuf_short[0]==tmb_tr1_bit[0])&&(tempbuf_short[4]==tmb_tr1_bit[1])&&
878 (tempbuf_short[8]==tmb_tr1_bit[2])&&(tempbuf_short[12]==tmb_tr1_bit[3])&&
879 (tempbuf_short[13]==tmb_tr1_bit[4])&&(tempbuf_short[14]==tmb_tr1_bit[5])&&
880 (tempbuf_short[15]==tmb_tr1_bit[6]));
882 cfeb_tr1_check[
j]=(((buf[
i+4*(
j-1)+1]&0xF000)==0x7000) &&
883 ((buf[
i+4*(
j-1)+2]&0xF000)==0x7000) &&
884 (( buf[
i+4*(
j-1)+1]!= 0x7FFF) || (buf[
i+4*(
j-1)+2] != 0x7FFF)) &&
885 ((buf[
i+4*(
j-1)+3] == 0x7FFF) ||
886 ((buf[
i+4*(
j-1)+3]&buf[
i+4*(
j-1)]) == 0x0&&(buf[
i+4*(
j-1)+3] + buf[
i+4*(
j-1)] == 0x7FFF ))) );
887 cfeb_b_check[
j]=(((buf[
i+4*(
j-1)+3]&0xF000)==0xB000)&&((buf[
i+4*(
j-1)+2]&0xF000)==0xB000) &&
888 ((buf[
i+4*(
j-1)+1]&0xF000)==0xB000)&&((buf[
i+4*(
j-1)]=3&0xF000)==0xB000) );
890 ddu_tr1_bad_check[
j]=((tempbuf_short[0]!=ddu_trailer1_bit[0])&&
893 (tempbuf_short[4]!=ddu_trailer1_bit[4])&&
896 (tempbuf_short[8]==ddu_trailer1_bit[8])&&(tempbuf_short[9]==ddu_trailer1_bit[9])&&
897 (tempbuf_short[10]==ddu_trailer1_bit[10])&&(tempbuf_short[11]==ddu_trailer1_bit[11])&&
898 (tempbuf_short[12]==ddu_trailer1_bit[12])&&(tempbuf_short[13]==ddu_trailer1_bit[13])&&
899 (tempbuf_short[14]==ddu_trailer1_bit[14])&&(tempbuf_short[15]==ddu_trailer1_bit[15]));
903 ddu_h2_h1=ddu_h2_check[2];
905 sprintf(tempbuf_short,
"%04x%04x%04x%04x",buf[
i+3],buf[
i+2],buf[
i+1],buf[
i]);
908 ddu_h1_12_13=(buf[
i]>>8);
909 for (
int kk=0;
kk<36;
kk++)
911 if (((buf[
i+3]&0xF000)==0x5000)&&(ddu_h1_12_13==ddu_id[
kk])&&ddu_h2_h1)
913 ddu_h1_coll.push_back(word_numbering);
914 ddu_h1_n_coll.push_back(ddu_id[
kk]);
915 ddu_inst_l1a=((buf[
i+2]&0xFFFF)+((buf[
i+3]&0x00FF)<<16));
916 ddu_l1a_coll.push_back(ddu_inst_l1a);
917 ddu_inst_bxn=(buf[
i+1]&0xFFF0)>>4;
918 ddu_bxn_coll.push_back(ddu_inst_bxn);
919 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s%i %s%s %s %i %s %i",
920 word_numbering,buf[
i+3],buf[
i+2],buf[
i+1],buf[
i],
921 sign1,ddu_common,ddu_id[kk],ddu_header1,sign1,dmb_common_l1a,ddu_inst_l1a,alct_common_bxn,ddu_inst_bxn);
933 dcc_h1_id=(((buf[
i+1]<<12)&0xF000)>>4)+(buf[
i]>>8);
934 for (
int dcci=0; dcci<16; dcci++)
936 if ((dcc_id[dcci]==dcc_h1_id)&&(((buf[
i+3]&0xF000)==0x5000)&&(!ddu_h1_check)))
938 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s%i %s",word_numbering,buf[
i+3],buf[
i+2],buf[
i+1],buf[
i],
939 sign1,dcc_common,dcc_h1_id,dcc_header1);
940 dcc_h1_check=word_numbering;
948 if (((word_numbering-1)==dcc_h1_check)&&((buf[
i+3]&0xFF00)==0xD900))
950 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s",word_numbering,buf[
i+3],buf[
i+2],buf[
i+1],buf[
i],
955 else if ((word_numbering==word_lines-1)&&(tempbuf_short[0]==dcc_trail1_bit[0]))
957 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s",word_numbering,buf[
i+3],buf[
i+2],buf[
i+1],buf[
i],
962 else if ((word_numbering==word_lines)&&(tempbuf_short[0]==dcc_trail2_bit[0]))
964 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s",word_numbering,buf[
i+3],buf[
i+2],buf[
i+1],buf[
i],
971 else if (ddu_h2_check[1])
973 ddu_inst_i = ddu_h1_n_coll.size();
976 ddu_inst_n=ddu_h1_n_coll[ddu_inst_i-1];
978 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s%i %s",
979 word_numbering,buf[
i+3],buf[
i+2],buf[
i+1],buf[
i],sign1,ddu_common,
980 ddu_inst_n, ddu_header2);
981 ddu_h2_coll.push_back(word_numbering);
988 else if ((ddu_h2_check[0]&&dmb_h1_check[2])||(ddu_h2_check[0]&&ddu_tr1_check[2]))
990 ddu_inst_i = ddu_h1_n_coll.size();
993 ddu_inst_n=ddu_h1_n_coll[ddu_inst_i-1];
995 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s%i %s",word_numbering,buf[
i+3],buf[
i+2],buf[
i+1],buf[
i],
996 sign1,ddu_common,ddu_inst_n,ddu_header3);
997 ddu_h3_coll.push_back(word_numbering);
1005 else if (dmb_h1_check[1])
1010 dmb_inst_l1a=((buf[
i]&0x0FFF)+((buf[
i+1]&0xFFF)<<12));
1011 dmb_l1a_coll.push_back(dmb_inst_l1a);
1012 if (dmb_h2_check[2])
1014 dmb_inst_crate=((buf[
i+4+1]>>4)&0xFF);
1015 dmb_inst_slot=(buf[
i+4+1]&0xF);
1016 dmb_crate_coll.push_back(dmb_inst_crate);
1017 dmb_slot_coll.push_back(dmb_inst_slot);
1019 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s %s%s%s %i %s %i %s %i",
1020 word_numbering,buf[
i+3],buf[
i+2],buf[
i+1],buf[
i],
1021 sign1,dmb_common,dmb_header1,sign1,dmb_common_crate,dmb_inst_crate,
1022 dmb_common_slot,dmb_inst_slot,dmb_common_l1a,dmb_inst_l1a);
1023 dmb_h1_coll.push_back(word_numbering);
1029 else if (dmb_h2_check[1])
1031 dmb_inst_crate=((buf[
i+1]>>4)&0xFF);
1032 dmb_inst_slot=(buf[
i+1]&0xF);
1033 dmb_h2_coll.push_back(word_numbering);
1034 if (dmb_h1_check[0])
1035 dmb_inst_l1a=((buf[
i-4]&0x0FFF)+((buf[
i-4+1]&0xFFF)<<12));
1036 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s %s%s%s %i %s %i %s %i",
1037 word_numbering,buf[
i+3],buf[
i+2],buf[
i+1],buf[
i],
1038 sign1,dmb_common,dmb_header2,sign1,dmb_common_crate,dmb_inst_crate,
1039 dmb_common_slot,dmb_inst_slot,dmb_common_l1a,dmb_inst_l1a);
1047 else if (ddu_tr1_check[1])
1049 ddu_inst_i = ddu_h1_n_coll.size();
1052 ddu_inst_n=ddu_h1_n_coll[ddu_inst_i-1];
1055 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s%i %s",
1056 word_numbering,buf[
i+3],buf[
i+2],buf[
i+1],buf[
i],sign1,ddu_common,ddu_inst_n,ddu_trail1);
1057 ddu_t1_coll.push_back(word_numbering);
1063 else if (alct_h1_check[1])
1065 alct_start=word_numbering;
1066 alct_inst_l1a=(buf[
i+2]&0x0FFF);
1067 alct_l1a_coll.push_back(alct_inst_l1a);
1068 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s %s%s %s %i",
1069 word_numbering,buf[
i+3],buf[
i+2],buf[
i+1],buf[
i],
1070 sign1,alct_common,alct_header1,sign1,dmb_common_l1a,alct_inst_l1a);
1071 alct_h1_coll.push_back(word_numbering);
1077 else if ((alct_h1_check[0])&&(alct_h2_check[2]))
1079 alct_inst_bxn=(buf[
i]&0x0FFF);
1080 alct_bxn_coll.push_back(alct_inst_bxn);
1081 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s %s%s%s %i",
1082 word_numbering,buf[
i+3],buf[
i+2],buf[
i+1],buf[
i],
1083 sign1,alct_common,alct_header2,sign1,alct_common_bxn,alct_inst_bxn);
1084 alct_h2_coll.push_back(word_numbering);
1091 else if (alct_tr1_check[1])
1093 alct_stop=word_numbering;
1094 if ((alct_start!=0)&&(alct_stop!=0)&&(alct_stop>alct_start))
1096 alct_inst_wcnt2=4*(alct_stop-alct_start+1);
1097 alct_wcnt2_coll.push_back(alct_inst_wcnt2);
1098 alct_wcnt2_id_coll.push_back(alct_start);
1100 alct_inst_wcnt1=(buf[
i+3]&0x7FF);
1101 alct_wcnt1_coll.push_back(alct_inst_wcnt1);
1102 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s %s%s%s %i %s %i",
1103 word_numbering,buf[
i+3],buf[
i+2],buf[
i+1],buf[
i],
1104 sign1,alct_common,alct_tr1,sign1,alct_common_wcnt1,alct_inst_wcnt1,
1105 alct_common_wcnt2,alct_inst_wcnt2);
1106 alct_t1_coll.push_back(word_numbering);
1116 else if((ddu_h2_h1)&&(tempbuf_short[0]==ddu_trailer3_bit[0])){
1118 ddu_inst_i = ddu_h1_n_coll.size();
1121 ddu_inst_n=ddu_h1_n_coll[ddu_inst_i-1];
1124 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s%i %s",
1125 word_numbering,buf[
i+3],buf[
i+2],buf[
i+1],buf[
i],sign1,ddu_common,ddu_inst_n,ddu_trail3);
1126 ddu_t3_coll.push_back(word_numbering);
1131 else if ((ddu_tr1_check[0])&&(tempbuf_short[0]!=ddu_trailer3_bit[0]))
1134 ddu_inst_i = ddu_h1_n_coll.size();
1137 ddu_inst_n=ddu_h1_n_coll[ddu_inst_i-1];
1140 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s%i %s",
1141 word_numbering,buf[
i+3],buf[
i+2],buf[
i+1],buf[
i],sign1,ddu_common,ddu_inst_n,ddu_trail2);
1142 ddu_t2_coll.push_back(word_numbering);
1148 else if (dmb_tr1_check[1])
1150 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s %s",
1151 word_numbering,buf[
i+3],buf[
i+2],buf[
i+1],buf[
i],sign1,dmb_common,dmb_tr1);
1152 dmb_t1_coll.push_back(word_numbering);
1158 else if (dmb_tr2_check[1])
1160 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s %s",
1161 word_numbering,buf[
i+3],buf[
i+2],buf[
i+1],buf[
i],sign1,dmb_common,dmb_tr2);
1162 dmb_t2_coll.push_back(word_numbering);
1167 else if (tmb_h1_check[1])
1169 tmb_start=word_numbering;
1170 tmb_inst_l1a=(buf[
i+2]&0x000F);
1171 tmb_l1a_coll.push_back(tmb_inst_l1a);
1172 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s %s%s%s %i",
1173 word_numbering,buf[
i+3],buf[
i+2],buf[
i+1],buf[
i],sign1,tmb_common,tmb_header1,
1174 sign1,dmb_common_l1a,tmb_inst_l1a);
1175 tmb_h1_coll.push_back(word_numbering);
1180 else if (tmb_tr1_check[1])
1182 tmb_stop=word_numbering;
1183 if ((tmb_start!=0)&&(tmb_stop!=0)&&(tmb_stop>tmb_start))
1185 tmb_inst_wcnt2=4*(tmb_stop-tmb_start+1);
1186 tmb_wcnt2_coll.push_back(tmb_inst_wcnt2);
1188 tmb_inst_wcnt1=(buf[
i+3]&0x7FF);
1189 tmb_wcnt1_coll.push_back(tmb_inst_wcnt1);
1190 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s %s%s%s %i %s %i",
1191 word_numbering,buf[
i+3],buf[
i+2],buf[
i+1],buf[
i],
1192 sign1,tmb_common,tmb_tr1,sign1,alct_common_wcnt1,tmb_inst_wcnt1,
1193 alct_common_wcnt2,tmb_inst_wcnt2);
1194 tmb_t1_coll.push_back(word_numbering);
1200 else if (cfeb_tr1_check[1])
1203 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s %s%s %s %i",
1204 word_numbering,buf[
i+3],buf[
i+2],buf[
i+1],buf[
i],
1205 sign1,cfeb_common,cfeb_tr1,sign1,cfeb_common_sample,cfeb_sample);
1206 cfeb_t1_coll.push_back(word_numbering);
1211 else if (cfeb_b_check[1])
1213 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s %s",
1214 word_numbering,buf[
i+3],buf[
i+2],buf[
i+1],buf[
i],sign1,cfeb_common,cfeb_b);
1221 else if (ddu_tr1_bad_check[1])
1223 ddu_inst_i = ddu_h1_n_coll.size();
1224 ddu_inst_n=ddu_h1_n_coll[ddu_inst_i-1];
1225 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s%i %s %s",
1226 word_numbering,buf[
i+3],buf[
i+2],buf[
i+1],buf[
i],sign1,ddu_common,ddu_inst_n,
1227 ddu_trail1,ddu_tr1_err_common);
1232 else if (extraction&&(!ddu_h1_check)&&(!dcc_check))
1236 sprintf(tempbuf,
"%6i %04x %04x %04x %04x",
1237 word_numbering,buf[
i+3],buf[
i+2],buf[
i+1],buf[
i]);
1243 std::cout <<
"..................................................." << std::endl;
1248 else if ((!ddu_h1_check)&&(!dcc_check))
1250 sprintf(tempbuf,
"%6i %04x %04x %04x %04x",word_numbering,buf[
i+3],buf[
i+2],buf[
i+1],buf[
i]);
1259 std::cout <<
"********************************************************************************" <<
1260 std::endl << std::endl;
1262 std::cout <<
"For complete output turn off VisualFEDShort in muonCSCDigis configuration file." << std::endl;
1263 std::cout <<
"********************************************************************************" <<
1264 std::endl << std::endl;
1268 std::cout << ddu_h1_coll.size() <<
" "<< ddu_common <<
" "<<ddu_header1 <<
" "<<
"found" << std::endl;
1273 for (
unsigned int k=0;
k<ddu_h1_coll.size(); ++
k)
1280 std::cout <<
"Line: " <<
" " << ddu_h1_coll[
k] <<
" " << sign1 <<
" " <<
1281 ddu_common <<
" " << ddu_h1_n_coll[
k] <<
" " << dmb_common_l1a <<
" " << ddu_l1a_coll[
k] <<
" " <<
1282 alct_common_bxn <<
" " << ddu_bxn_coll[
k] << std::endl;
1287 std::cout <<
"||||||||||||||||||||" << std::endl;
1289 std::cout << ddu_h2_coll.size() <<
" "<< ddu_common <<
" "<<ddu_header2 <<
" "<<
"found" << std::endl;
1290 for (
unsigned int k=0;
k<ddu_h2_coll.size(); ++
k)
1291 std::cout <<
"Line: " << ddu_h2_coll[
k] << std::endl;
1293 std::cout <<
"||||||||||||||||||||" << std::endl;
1295 std::cout << ddu_h3_coll.size() <<
" "<< ddu_common <<
" "<<ddu_header3 <<
" "<<
"found" << std::endl;
1296 for (
unsigned int k=0;
k<ddu_h3_coll.size(); ++
k)
1297 std::cout <<
"Line: " << ddu_h3_coll[
k] << std::endl;
1299 std::cout <<
"||||||||||||||||||||" << std::endl;
1301 std::cout << ddu_t1_coll.size() <<
" "<< ddu_common <<
" "<<ddu_trail1 <<
" "<<
"found" << std::endl;
1302 for (
unsigned int k=0;
k<ddu_t1_coll.size(); ++
k)
1303 std::cout <<
"Line: " << ddu_t1_coll[
k] << std::endl;
1305 std::cout <<
"||||||||||||||||||||" << std::endl;
1307 std::cout << ddu_t2_coll.size() <<
" "<< ddu_common <<
" "<<ddu_trail2 <<
" "<<
"found" << std::endl;
1308 for (
unsigned int k=0;
k<ddu_t2_coll.size(); ++
k)
1309 std::cout <<
"Line: " << ddu_t2_coll[
k] << std::endl;
1311 std::cout <<
"||||||||||||||||||||" << std::endl;
1313 std::cout << ddu_t3_coll.size() <<
" "<< ddu_common <<
" "<<ddu_trail3 <<
" "<<
"found" << std::endl;
1314 for (
unsigned int k=0;
k<ddu_t3_coll.size(); ++
k)
1315 std::cout <<
"Line: " << ddu_t3_coll[
k] << std::endl;
1317 std::cout <<
"||||||||||||||||||||" << std::endl;
1319 std::cout << dmb_h1_coll.size() <<
" "<< dmb_common <<
" "<<dmb_header1 <<
" "<<
"found" << std::endl;
1321 for (
unsigned int k=0;
k<dmb_h1_coll.size(); ++
k)
1328 std::cout <<
"Line: " <<
" " << dmb_h1_coll[
k] <<
" " << sign1 << dmb_common
1329 <<
" " << dmb_common_crate <<
" " << dmb_crate_coll[
k] <<
" " << dmb_common_slot <<
" " <<
1330 dmb_slot_coll[
k] <<
" " << dmb_common_l1a <<
" " << dmb_l1a_coll[
k] << std::endl;
1333 std::cout <<
"||||||||||||||||||||" << std::endl;
1335 std::cout << dmb_h2_coll.size() <<
" "<< dmb_common <<
" "<<dmb_header2 <<
" "<<
"found" << std::endl;
1336 for (
unsigned int k=0;
k<dmb_h2_coll.size(); ++
k)
1337 std::cout <<
"Line: " << dmb_h2_coll[
k] << std::endl;
1339 std::cout <<
"||||||||||||||||||||" << std::endl;
1341 std::cout << dmb_t1_coll.size() <<
" "<< dmb_common <<
" "<<dmb_tr1 <<
" "<<
"found" << std::endl;
1342 for (
unsigned int k=0;
k<dmb_t1_coll.size(); ++
k)
1343 std::cout <<
"Line: " << dmb_t1_coll[
k] << std::endl;
1345 std::cout <<
"||||||||||||||||||||" << std::endl;
1347 std::cout << dmb_t2_coll.size() <<
" "<< dmb_common <<
" "<<dmb_tr2 <<
" "<<
"found" << std::endl;
1348 for (
unsigned int k=0;
k<dmb_t2_coll.size(); ++
k)
1349 std::cout <<
"Line: " << dmb_t2_coll[
k] << std::endl;
1351 std::cout <<
"||||||||||||||||||||" << std::endl;
1353 std::cout << alct_h1_coll.size() <<
" "<< alct_common <<
" "<<alct_header1 <<
" "<<
"found" << std::endl;
1354 for (
unsigned int k=0;
k<alct_h1_coll.size(); ++
k)
1363 alct_h1_coll[
k] <<
" " << sign1 <<
" " << alct_common <<
" " <<
1364 dmb_common_l1a <<
" " << alct_l1a_coll[
k] << std::endl;
1368 std::cout <<
"||||||||||||||||||||" << std::endl;
1370 std::cout << alct_h2_coll.size() <<
" "<< alct_common <<
" "<<alct_header2 <<
" "<<
"found" << std::endl;
1371 for (
unsigned int k=0;
k<alct_h2_coll.size(); ++
k)
1380 alct_h1_coll[
k] <<
" " << sign1 <<
" " << alct_common <<
" " <<
1381 alct_common_bxn <<
" " << alct_bxn_coll[
k] << std::endl;
1385 std::cout <<
"||||||||||||||||||||" << std::endl;
1387 std::cout << alct_t1_coll.size() <<
" "<< alct_common <<
" "<<alct_tr1 <<
" "<<
"found" << std::endl;
1388 for (
unsigned int k=0;
k<alct_t1_coll.size(); ++
k)
1396 std::cout <<
"Line: " <<
" " << alct_t1_coll[
k] <<
" " << sign1 <<
" " << alct_common <<
" " <<
1397 alct_common_wcnt1 <<
" " << alct_wcnt1_coll[
k] <<
" " << alct_common_wcnt2 <<
" ";
1398 if (alct_wcnt2_coll.size()>0)
1400 std::cout << alct_wcnt2_coll[
k] << std::endl;
1404 std::cout <<
"Undefined (ALCT Header is not found) " << std::endl;
1409 std::cout <<
"||||||||||||||||||||" << std::endl;
1411 std::cout << tmb_h1_coll.size() <<
" "<< tmb_common <<
" "<<tmb_header1 <<
" "<<
"found" << std::endl;
1412 for (
unsigned int k=0;
k<tmb_h1_coll.size(); ++
k)
1420 std::cout <<
"Line: " <<
" " << tmb_h1_coll[
k] <<
" " << sign1 <<
" " << tmb_common <<
" " <<
1421 dmb_common_l1a <<
" " << tmb_l1a_coll[
k] << std::endl;
1425 std::cout <<
"||||||||||||||||||||" << std::endl;
1427 std::cout << tmb_t1_coll.size() <<
" "<< tmb_common <<
" "<<tmb_tr1 <<
" "<<
"found" << std::endl;
1428 for (
unsigned int k=0;
k<tmb_t1_coll.size(); ++
k)
1436 std::cout <<
"Line: " <<
" " << tmb_t1_coll[
k] <<
" " << sign1 <<
" " << tmb_common <<
" " <<
1437 alct_common_wcnt1 <<
" " << tmb_wcnt1_coll[
k] <<
" " << alct_common_wcnt2 <<
" " << tmb_wcnt2_coll[
k]
1443 std::cout <<
"||||||||||||||||||||" << std::endl;
1445 std::cout << cfeb_t1_coll.size() <<
" "<< cfeb_common <<
" "<<cfeb_tr1 <<
" "<<
"found" << std::endl;
1446 for (
unsigned int k=0;
k<cfeb_t1_coll.size(); ++
k)
1447 std::cout <<
"Line: " << cfeb_t1_coll[
k] << std::endl;
1448 std::cout <<
"********************************************************************************" << std::endl;