Visualization of raw data in FED-less events (Robert Harr and Alexander Sakharov)
Visualization of raw data.
665 std::cout << std::endl << std::endl << std::endl;
666 std::cout <<
"Run: "<<
run <<
" Event: " <<
event << std::endl;
669 std::cout <<
"FED-" <<
id <<
" " <<
"(scroll down to see summary)" << std::endl;
671 std::cout <<
"Problem seems in FED-" <<
id <<
" " <<
"(scroll down to see summary)" << std::endl;
672 std::cout <<
"********************************************************************************" << std::endl;
673 std::cout << hl <<
" words of data:" << std::endl;
677 std::vector<int> dcc_id;
680 for (
int i=750;
i<758;
i++)
683 for (
int i=830;
i<838;
i++)
686 char dcc_common[]=
"DCC-";
690 std::vector<int> ddu_id;
692 for (
int i=1;
i<37;
i++)
695 char ddu_common[]=
"DDU-";
696 char ddu_header1[]=
"Header 1";
697 char ddu_header2[]=
"Header 2";
698 char ddu_header3[]=
"Header 3";
699 char ddu_trail1[]=
"Trailer 1", ddu_trail2[]=
"Trailer 2", ddu_trail3[]=
"Trailer 3";
701 char ddu_trailer1_bit[]= {
'8',
'0',
'0',
'0',
'f',
'f',
'f',
'f',
'8',
'0',
'0',
'0',
'8',
'0',
'0',
'0'};
702 char ddu_trailer3_bit[]= {
'a'};
704 char ddu_tr1_err_common[]=
"Incomplet";
708 char dmb_common[]=
"DMB", dmb_header1[]=
"Header 1", dmb_header2[]=
"Header 2";
709 char dmb_common_crate[]=
"crate:", dmb_common_slot[]=
"slot:";
710 char dmb_common_l1a[]=
"L1A:";
711 char dmb_header1_bit[]= {
'9',
'9',
'9',
'9'};
712 char dmb_header2_bit[]= {
'a',
'a',
'a',
'a'};
713 char dmb_tr1[]=
"Trailer 1", dmb_tr2[]=
"Trailer 2";
714 char dmb_tr1_bit[]= {
'f',
'f',
'f',
'f'}, dmb_tr2_bit[]= {
'e',
'e',
'e',
'e'};
720 char alct_common[]=
"ALCT", alct_header1[]=
"Header 1", alct_header2[]=
"Header 2";
721 char alct_common_bxn[]=
"BXN:";
722 char alct_common_wcnt2[]=
"| Actual word count:";
723 char alct_common_wcnt1[]=
"Expected word count:";
724 char alct_header1_bit[]= {
'd',
'd',
'd',
'd',
'b',
'0',
'a'};
725 char alct_header2_bit[]= {
'0',
'0',
'0',
'0'};
726 char alct_tr1[]=
"Trailer 1";
731 char tmb_common[]=
"TMB", tmb_header1[]=
"Header", tmb_tr1[]=
"Trailer";
732 char tmb_header1_bit[]= {
'd',
'd',
'd',
'd',
'b',
'0',
'c'};
733 char tmb_tr1_bit[]= {
'd',
'd',
'd',
'd',
'e',
'0',
'f'};
738 char cfeb_common[]=
"CFEB", cfeb_tr1[]=
"Trailer", cfeb_b[]=
"B-word";
739 char cfeb_common_sample[]=
"sample:";
749 char tempbuf_short[17];
750 char sign1[]=
" --->| ";
753 int word_numbering=0;
754 int ddu_inst_i=0, ddu_inst_n=0, ddu_inst_l1a=0;
756 int dmb_inst_crate=0, dmb_inst_slot=0, dmb_inst_l1a=0;
760 int alct_inst_wcnt1=0;
761 int alct_inst_wcnt2=0;
765 int tmb_inst_wcnt1=0;
766 int tmb_inst_wcnt2=0;
777 bool dcc_check=
false;
778 bool ddu_h2_check[sz1]= {
false};
779 bool ddu_h1_check=
false;
780 bool dmb_h1_check[sz1]= {
false};
781 bool dmb_h2_check[sz1]= {
false};
782 bool ddu_h2_h1=
false;
783 bool ddu_tr1_check[sz1]= {
false};
784 bool alct_h1_check[sz1]= {
false};
785 bool alct_h2_check[sz1]= {
false};
786 bool alct_tr1_check[sz1]= {
false};
787 bool dmb_tr1_check[sz1]= {
false};
788 bool dmb_tr2_check[sz1]= {
false};
789 bool tmb_h1_check[sz1]= {
false};
790 bool tmb_tr1_check[sz1]= {
false};
791 bool cfeb_tr1_check[sz1]= {
false};
792 bool cfeb_b_check[sz1]= {
false};
793 bool ddu_tr1_bad_check[sz1]= {
false};
794 bool extraction=fedshort;
798 std::vector<int> ddu_h1_coll;
799 std::vector<int> ddu_h1_n_coll;
800 std::vector<int> ddu_h2_coll;
801 std::vector<int> ddu_h3_coll;
802 std::vector<int> ddu_t1_coll;
803 std::vector<int> ddu_t2_coll;
804 std::vector<int> ddu_t3_coll;
805 std::vector<int> ddu_l1a_coll;
806 std::vector<int> ddu_bxn_coll;
808 std::vector<int> dmb_h1_coll;
809 std::vector<int> dmb_h2_coll;
810 std::vector<int> dmb_t1_coll;
811 std::vector<int> dmb_t2_coll;
812 std::vector<int> dmb_crate_coll;
813 std::vector<int> dmb_slot_coll;
814 std::vector<int> dmb_l1a_coll;
816 std::vector<int> alct_h1_coll;
817 std::vector<int> alct_h2_coll;
818 std::vector<int> alct_t1_coll;
819 std::vector<int> alct_l1a_coll;
820 std::vector<int> alct_bxn_coll;
821 std::vector<int> alct_wcnt1_coll;
822 std::vector<int> alct_wcnt2_coll;
823 std::vector<int> alct_wcnt2_id_coll;
825 std::vector<int> tmb_h1_coll;
826 std::vector<int> tmb_t1_coll;
827 std::vector<int> tmb_l1a_coll;
828 std::vector<int> tmb_wcnt1_coll;
829 std::vector<int> tmb_wcnt2_coll;
831 std::vector<int> cfeb_t1_coll;
836 char dcc_header1[]=
"DCC Header 1";
837 char dcc_header2[]=
"DCC Header 2";
838 char dcc_trail1[]=
"DCC Trailer 1", dcc_trail1_bit[]= {
'e'};
839 char dcc_trail2[]=
"DCC Trailer 2", dcc_trail2_bit[]= {
'a'};
842 for (
int i=0;
i < hl;
i++)
845 for (
int j=-1;
j<4;
j++)
848 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)]);
854 ddu_h2_check[
j]=((buf[
i+4*(
j-1)+1]==0x8000)&&
855 (buf[
i+4*(
j-1)+2]==0x0001)&&(buf[
i+4*(
j-1)+3]==0x8000));
857 ddu_tr1_check[
j]=((tempbuf_short[0]==ddu_trailer1_bit[0])&&(tempbuf_short[1]==ddu_trailer1_bit[1])&&
858 (tempbuf_short[2]==ddu_trailer1_bit[2])&&(tempbuf_short[3]==ddu_trailer1_bit[3])&&
859 (tempbuf_short[4]==ddu_trailer1_bit[4])&&(tempbuf_short[5]==ddu_trailer1_bit[5])&&
860 (tempbuf_short[6]==ddu_trailer1_bit[6])&&(tempbuf_short[7]==ddu_trailer1_bit[7])&&
861 (tempbuf_short[8]==ddu_trailer1_bit[8])&&(tempbuf_short[9]==ddu_trailer1_bit[9])&&
862 (tempbuf_short[10]==ddu_trailer1_bit[10])&&(tempbuf_short[11]==ddu_trailer1_bit[11])&&
863 (tempbuf_short[12]==ddu_trailer1_bit[12])&&(tempbuf_short[13]==ddu_trailer1_bit[13])&&
864 (tempbuf_short[14]==ddu_trailer1_bit[14])&&(tempbuf_short[15]==ddu_trailer1_bit[15]));
866 dmb_h1_check[
j]=((tempbuf_short[0]==dmb_header1_bit[0])&&(tempbuf_short[4]==dmb_header1_bit[1])&&
867 (tempbuf_short[8]==dmb_header1_bit[2])&&(tempbuf_short[12]==dmb_header1_bit[3]));
869 dmb_h2_check[
j]=((tempbuf_short[0]==dmb_header2_bit[0])&&(tempbuf_short[4]==dmb_header2_bit[1])&&
870 (tempbuf_short[8]==dmb_header2_bit[2])&&(tempbuf_short[12]==dmb_header2_bit[3]));
871 alct_h1_check[
j]=((tempbuf_short[0]==alct_header1_bit[0])&&(tempbuf_short[4]==alct_header1_bit[1])&&
872 (tempbuf_short[8]==alct_header1_bit[2])&&(tempbuf_short[12]==alct_header1_bit[3])&&
873 (tempbuf_short[13]==alct_header1_bit[4])&&(tempbuf_short[14]==alct_header1_bit[5])&&
874 (tempbuf_short[15]==alct_header1_bit[6]));
875 alct_h2_check[
j]=(((tempbuf_short[0]==alct_header2_bit[0])&&(tempbuf_short[1]==alct_header2_bit[1])&&
876 (tempbuf_short[2]==alct_header2_bit[2])&&(tempbuf_short[3]==alct_header2_bit[3]))||
877 ((tempbuf_short[4]==alct_header2_bit[0])&&(tempbuf_short[5]==alct_header2_bit[1])&&
878 (tempbuf_short[6]==alct_header2_bit[2])&&(tempbuf_short[7]==alct_header2_bit[3]))||
879 ((tempbuf_short[8]==alct_header2_bit[0])&&(tempbuf_short[9]==alct_header2_bit[1])&&
880 (tempbuf_short[10]==alct_header2_bit[2])&&(tempbuf_short[11]==alct_header2_bit[3]))||
881 ((tempbuf_short[12]==alct_header2_bit[0])&&(tempbuf_short[13]==alct_header2_bit[1])&&
882 (tempbuf_short[14]==alct_header2_bit[2])&&(tempbuf_short[15]==alct_header2_bit[3]))
886 alct_tr1_check[
j]=(((buf[
i+4*(
j-1)]&0xFFFF)==0xDE0D)&&((buf[
i+4*(
j-1)+1]&0xF800)==0xD000)&&
887 ((buf[
i+4*(
j-1)+2]&0xF800)==0xD000)&&((buf[
i+4*(
j-1)+3]&0xF000)==0xD000));
889 dmb_tr1_check[
j]=((tempbuf_short[0]==dmb_tr1_bit[0])&&(tempbuf_short[4]==dmb_tr1_bit[1])&&
890 (tempbuf_short[8]==dmb_tr1_bit[2])&&(tempbuf_short[12]==dmb_tr1_bit[3]));
891 dmb_tr2_check[
j]=((tempbuf_short[0]==dmb_tr2_bit[0])&&(tempbuf_short[4]==dmb_tr2_bit[1])&&
892 (tempbuf_short[8]==dmb_tr2_bit[2])&&(tempbuf_short[12]==dmb_tr2_bit[3]));
894 tmb_h1_check[
j]=((tempbuf_short[0]==tmb_header1_bit[0])&&(tempbuf_short[4]==tmb_header1_bit[1])&&
895 (tempbuf_short[8]==tmb_header1_bit[2])&&(tempbuf_short[12]==tmb_header1_bit[3])&&
896 (tempbuf_short[13]==tmb_header1_bit[4])&&(tempbuf_short[14]==tmb_header1_bit[5])&&
897 (tempbuf_short[15]==tmb_header1_bit[6]));
898 tmb_tr1_check[
j]=((tempbuf_short[0]==tmb_tr1_bit[0])&&(tempbuf_short[4]==tmb_tr1_bit[1])&&
899 (tempbuf_short[8]==tmb_tr1_bit[2])&&(tempbuf_short[12]==tmb_tr1_bit[3])&&
900 (tempbuf_short[13]==tmb_tr1_bit[4])&&(tempbuf_short[14]==tmb_tr1_bit[5])&&
901 (tempbuf_short[15]==tmb_tr1_bit[6]));
903 cfeb_tr1_check[
j]=(((buf[
i+4*(
j-1)+1]&0xF000)==0x7000) &&
904 ((buf[
i+4*(
j-1)+2]&0xF000)==0x7000) &&
905 (( buf[
i+4*(
j-1)+1]!= 0x7FFF) || (buf[
i+4*(
j-1)+2] != 0x7FFF)) &&
906 ((buf[
i+4*(
j-1)+3] == 0x7FFF) ||
907 ((buf[
i+4*(
j-1)+3]&buf[
i+4*(
j-1)]) == 0x0&&(buf[
i+4*(
j-1)+3] + buf[
i+4*(
j-1)] == 0x7FFF ))) );
908 cfeb_b_check[
j]=(((buf[
i+4*(
j-1)+3]&0xF000)==0xB000)&&((buf[
i+4*(
j-1)+2]&0xF000)==0xB000) &&
909 ((buf[
i+4*(
j-1)+1]&0xF000)==0xB000)&&((buf[
i+4*(
j-1)]=3&0xF000)==0xB000) );
911 ddu_tr1_bad_check[
j]=((tempbuf_short[0]!=ddu_trailer1_bit[0])&&
914 (tempbuf_short[4]!=ddu_trailer1_bit[4])&&
917 (tempbuf_short[8]==ddu_trailer1_bit[8])&&(tempbuf_short[9]==ddu_trailer1_bit[9])&&
918 (tempbuf_short[10]==ddu_trailer1_bit[10])&&(tempbuf_short[11]==ddu_trailer1_bit[11])&&
919 (tempbuf_short[12]==ddu_trailer1_bit[12])&&(tempbuf_short[13]==ddu_trailer1_bit[13])&&
920 (tempbuf_short[14]==ddu_trailer1_bit[14])&&(tempbuf_short[15]==ddu_trailer1_bit[15]));
924 ddu_h2_h1=ddu_h2_check[2];
926 sprintf(tempbuf_short,
"%04x%04x%04x%04x",buf[
i+3],buf[
i+2],buf[
i+1],buf[
i]);
929 ddu_h1_12_13=(buf[
i]>>8);
930 for (
int kk=0;
kk<36;
kk++)
932 if (((buf[
i+3]&0xF000)==0x5000)&&(ddu_h1_12_13==ddu_id[
kk])&&ddu_h2_h1)
934 ddu_h1_coll.push_back(word_numbering);
935 ddu_h1_n_coll.push_back(ddu_id[
kk]);
936 ddu_inst_l1a=((buf[
i+2]&0xFFFF)+((buf[
i+3]&0x00FF)<<16));
937 ddu_l1a_coll.push_back(ddu_inst_l1a);
938 ddu_inst_bxn=(buf[
i+1]&0xFFF0)>>4;
939 ddu_bxn_coll.push_back(ddu_inst_bxn);
940 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s%i %s%s %s %i %s %i",
941 word_numbering,buf[
i+3],buf[
i+2],buf[
i+1],buf[
i],
942 sign1,ddu_common,ddu_id[kk],ddu_header1,sign1,dmb_common_l1a,ddu_inst_l1a,alct_common_bxn,ddu_inst_bxn);
954 dcc_h1_id=(((buf[
i+1]<<12)&0xF000)>>4)+(buf[
i]>>8);
955 for (
int dcci=0; dcci<16; dcci++)
957 if ((dcc_id[dcci]==dcc_h1_id)&&(((buf[
i+3]&0xF000)==0x5000)&&(!ddu_h1_check)))
959 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s%i %s",word_numbering,buf[
i+3],buf[
i+2],buf[
i+1],buf[
i],
960 sign1,dcc_common,dcc_h1_id,dcc_header1);
961 dcc_h1_check=word_numbering;
969 if (((word_numbering-1)==dcc_h1_check)&&((buf[
i+3]&0xFF00)==0xD900))
971 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s",word_numbering,buf[
i+3],buf[
i+2],buf[
i+1],buf[
i],
976 else if ((word_numbering==word_lines-1)&&(tempbuf_short[0]==dcc_trail1_bit[0]))
978 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s",word_numbering,buf[
i+3],buf[
i+2],buf[
i+1],buf[
i],
983 else if ((word_numbering==word_lines)&&(tempbuf_short[0]==dcc_trail2_bit[0]))
985 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s",word_numbering,buf[
i+3],buf[
i+2],buf[
i+1],buf[
i],
992 else if (ddu_h2_check[1])
994 ddu_inst_i = ddu_h1_n_coll.size();
997 ddu_inst_n=ddu_h1_n_coll[ddu_inst_i-1];
999 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s%i %s",
1000 word_numbering,buf[
i+3],buf[
i+2],buf[
i+1],buf[
i],sign1,ddu_common,
1001 ddu_inst_n, ddu_header2);
1002 ddu_h2_coll.push_back(word_numbering);
1009 else if ((ddu_h2_check[0]&&dmb_h1_check[2])||(ddu_h2_check[0]&&ddu_tr1_check[2]))
1011 ddu_inst_i = ddu_h1_n_coll.size();
1014 ddu_inst_n=ddu_h1_n_coll[ddu_inst_i-1];
1016 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s%i %s",word_numbering,buf[
i+3],buf[
i+2],buf[
i+1],buf[
i],
1017 sign1,ddu_common,ddu_inst_n,ddu_header3);
1018 ddu_h3_coll.push_back(word_numbering);
1026 else if (dmb_h1_check[1])
1031 dmb_inst_l1a=((buf[
i]&0x0FFF)+((buf[
i+1]&0xFFF)<<12));
1032 dmb_l1a_coll.push_back(dmb_inst_l1a);
1033 if (dmb_h2_check[2])
1035 dmb_inst_crate=((buf[
i+4+1]>>4)&0xFF);
1036 dmb_inst_slot=(buf[
i+4+1]&0xF);
1037 dmb_crate_coll.push_back(dmb_inst_crate);
1038 dmb_slot_coll.push_back(dmb_inst_slot);
1040 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s %s%s%s %i %s %i %s %i",
1041 word_numbering,buf[
i+3],buf[
i+2],buf[
i+1],buf[
i],
1042 sign1,dmb_common,dmb_header1,sign1,dmb_common_crate,dmb_inst_crate,
1043 dmb_common_slot,dmb_inst_slot,dmb_common_l1a,dmb_inst_l1a);
1044 dmb_h1_coll.push_back(word_numbering);
1050 else if (dmb_h2_check[1])
1052 dmb_inst_crate=((buf[
i+1]>>4)&0xFF);
1053 dmb_inst_slot=(buf[
i+1]&0xF);
1054 dmb_h2_coll.push_back(word_numbering);
1055 if (dmb_h1_check[0])
1056 dmb_inst_l1a=((buf[
i-4]&0x0FFF)+((buf[
i-4+1]&0xFFF)<<12));
1057 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s %s%s%s %i %s %i %s %i",
1058 word_numbering,buf[
i+3],buf[
i+2],buf[
i+1],buf[
i],
1059 sign1,dmb_common,dmb_header2,sign1,dmb_common_crate,dmb_inst_crate,
1060 dmb_common_slot,dmb_inst_slot,dmb_common_l1a,dmb_inst_l1a);
1068 else if (ddu_tr1_check[1])
1070 ddu_inst_i = ddu_h1_n_coll.size();
1073 ddu_inst_n=ddu_h1_n_coll[ddu_inst_i-1];
1076 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s%i %s",
1077 word_numbering,buf[
i+3],buf[
i+2],buf[
i+1],buf[
i],sign1,ddu_common,ddu_inst_n,ddu_trail1);
1078 ddu_t1_coll.push_back(word_numbering);
1084 else if (alct_h1_check[1])
1086 alct_start=word_numbering;
1087 alct_inst_l1a=(buf[
i+2]&0x0FFF);
1088 alct_l1a_coll.push_back(alct_inst_l1a);
1089 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s %s%s %s %i",
1090 word_numbering,buf[
i+3],buf[
i+2],buf[
i+1],buf[
i],
1091 sign1,alct_common,alct_header1,sign1,dmb_common_l1a,alct_inst_l1a);
1092 alct_h1_coll.push_back(word_numbering);
1098 else if ((alct_h1_check[0])&&(alct_h2_check[2]))
1100 alct_inst_bxn=(buf[
i]&0x0FFF);
1101 alct_bxn_coll.push_back(alct_inst_bxn);
1102 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s %s%s%s %i",
1103 word_numbering,buf[
i+3],buf[
i+2],buf[
i+1],buf[
i],
1104 sign1,alct_common,alct_header2,sign1,alct_common_bxn,alct_inst_bxn);
1105 alct_h2_coll.push_back(word_numbering);
1112 else if (alct_tr1_check[1])
1114 alct_stop=word_numbering;
1115 if ((alct_start!=0)&&(alct_stop!=0)&&(alct_stop>alct_start))
1117 alct_inst_wcnt2=4*(alct_stop-alct_start+1);
1118 alct_wcnt2_coll.push_back(alct_inst_wcnt2);
1119 alct_wcnt2_id_coll.push_back(alct_start);
1121 alct_inst_wcnt1=(buf[
i+3]&0x7FF);
1122 alct_wcnt1_coll.push_back(alct_inst_wcnt1);
1123 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s %s%s%s %i %s %i",
1124 word_numbering,buf[
i+3],buf[
i+2],buf[
i+1],buf[
i],
1125 sign1,alct_common,alct_tr1,sign1,alct_common_wcnt1,alct_inst_wcnt1,
1126 alct_common_wcnt2,alct_inst_wcnt2);
1127 alct_t1_coll.push_back(word_numbering);
1137 else if((ddu_h2_h1)&&(tempbuf_short[0]==ddu_trailer3_bit[0])){
1139 ddu_inst_i = ddu_h1_n_coll.size();
1142 ddu_inst_n=ddu_h1_n_coll[ddu_inst_i-1];
1145 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s%i %s",
1146 word_numbering,buf[
i+3],buf[
i+2],buf[
i+1],buf[
i],sign1,ddu_common,ddu_inst_n,ddu_trail3);
1147 ddu_t3_coll.push_back(word_numbering);
1152 else if ((ddu_tr1_check[0])&&(tempbuf_short[0]!=ddu_trailer3_bit[0]))
1155 ddu_inst_i = ddu_h1_n_coll.size();
1158 ddu_inst_n=ddu_h1_n_coll[ddu_inst_i-1];
1161 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s%i %s",
1162 word_numbering,buf[
i+3],buf[
i+2],buf[
i+1],buf[
i],sign1,ddu_common,ddu_inst_n,ddu_trail2);
1163 ddu_t2_coll.push_back(word_numbering);
1169 else if (dmb_tr1_check[1])
1171 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s %s",
1172 word_numbering,buf[
i+3],buf[
i+2],buf[
i+1],buf[
i],sign1,dmb_common,dmb_tr1);
1173 dmb_t1_coll.push_back(word_numbering);
1179 else if (dmb_tr2_check[1])
1181 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s %s",
1182 word_numbering,buf[
i+3],buf[
i+2],buf[
i+1],buf[
i],sign1,dmb_common,dmb_tr2);
1183 dmb_t2_coll.push_back(word_numbering);
1188 else if (tmb_h1_check[1])
1190 tmb_start=word_numbering;
1191 tmb_inst_l1a=(buf[
i+2]&0x000F);
1192 tmb_l1a_coll.push_back(tmb_inst_l1a);
1193 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s %s%s%s %i",
1194 word_numbering,buf[
i+3],buf[
i+2],buf[
i+1],buf[
i],sign1,tmb_common,tmb_header1,
1195 sign1,dmb_common_l1a,tmb_inst_l1a);
1196 tmb_h1_coll.push_back(word_numbering);
1201 else if (tmb_tr1_check[1])
1203 tmb_stop=word_numbering;
1204 if ((tmb_start!=0)&&(tmb_stop!=0)&&(tmb_stop>tmb_start))
1206 tmb_inst_wcnt2=4*(tmb_stop-tmb_start+1);
1207 tmb_wcnt2_coll.push_back(tmb_inst_wcnt2);
1209 tmb_inst_wcnt1=(buf[
i+3]&0x7FF);
1210 tmb_wcnt1_coll.push_back(tmb_inst_wcnt1);
1211 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s %s%s%s %i %s %i",
1212 word_numbering,buf[
i+3],buf[
i+2],buf[
i+1],buf[
i],
1213 sign1,tmb_common,tmb_tr1,sign1,alct_common_wcnt1,tmb_inst_wcnt1,
1214 alct_common_wcnt2,tmb_inst_wcnt2);
1215 tmb_t1_coll.push_back(word_numbering);
1221 else if (cfeb_tr1_check[1])
1224 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s %s%s %s %i",
1225 word_numbering,buf[
i+3],buf[
i+2],buf[
i+1],buf[
i],
1226 sign1,cfeb_common,cfeb_tr1,sign1,cfeb_common_sample,cfeb_sample);
1227 cfeb_t1_coll.push_back(word_numbering);
1232 else if (cfeb_b_check[1])
1234 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s %s",
1235 word_numbering,buf[
i+3],buf[
i+2],buf[
i+1],buf[
i],sign1,cfeb_common,cfeb_b);
1242 else if (ddu_tr1_bad_check[1])
1244 ddu_inst_i = ddu_h1_n_coll.size();
1245 ddu_inst_n=ddu_h1_n_coll[ddu_inst_i-1];
1246 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s%i %s %s",
1247 word_numbering,buf[
i+3],buf[
i+2],buf[
i+1],buf[
i],sign1,ddu_common,ddu_inst_n,
1248 ddu_trail1,ddu_tr1_err_common);
1253 else if (extraction&&(!ddu_h1_check)&&(!dcc_check))
1257 sprintf(tempbuf,
"%6i %04x %04x %04x %04x",
1258 word_numbering,buf[
i+3],buf[
i+2],buf[
i+1],buf[
i]);
1264 std::cout <<
"..................................................." << std::endl;
1269 else if ((!ddu_h1_check)&&(!dcc_check))
1271 sprintf(tempbuf,
"%6i %04x %04x %04x %04x",word_numbering,buf[
i+3],buf[
i+2],buf[
i+1],buf[
i]);
1280 std::cout <<
"********************************************************************************" <<
1281 std::endl << std::endl;
1283 std::cout <<
"For complete output turn off VisualFEDShort in muonCSCDigis configuration file." << std::endl;
1284 std::cout <<
"********************************************************************************" <<
1285 std::endl << std::endl;
1289 std::cout << ddu_h1_coll.size() <<
" "<< ddu_common <<
" "<<ddu_header1 <<
" "<<
"found" << std::endl;
1294 for (
unsigned int k=0;
k<ddu_h1_coll.size(); ++
k)
1301 std::cout <<
"Line: " <<
" " << ddu_h1_coll[
k] <<
" " << sign1 <<
" " <<
1302 ddu_common <<
" " << ddu_h1_n_coll[
k] <<
" " << dmb_common_l1a <<
" " << ddu_l1a_coll[
k] <<
" " <<
1303 alct_common_bxn <<
" " << ddu_bxn_coll[
k] << std::endl;
1308 std::cout <<
"||||||||||||||||||||" << std::endl;
1310 std::cout << ddu_h2_coll.size() <<
" "<< ddu_common <<
" "<<ddu_header2 <<
" "<<
"found" << std::endl;
1311 for (
unsigned int k=0;
k<ddu_h2_coll.size(); ++
k)
1312 std::cout <<
"Line: " << ddu_h2_coll[
k] << std::endl;
1314 std::cout <<
"||||||||||||||||||||" << std::endl;
1316 std::cout << ddu_h3_coll.size() <<
" "<< ddu_common <<
" "<<ddu_header3 <<
" "<<
"found" << std::endl;
1317 for (
unsigned int k=0;
k<ddu_h3_coll.size(); ++
k)
1318 std::cout <<
"Line: " << ddu_h3_coll[
k] << std::endl;
1320 std::cout <<
"||||||||||||||||||||" << std::endl;
1322 std::cout << ddu_t1_coll.size() <<
" "<< ddu_common <<
" "<<ddu_trail1 <<
" "<<
"found" << std::endl;
1323 for (
unsigned int k=0;
k<ddu_t1_coll.size(); ++
k)
1324 std::cout <<
"Line: " << ddu_t1_coll[
k] << std::endl;
1326 std::cout <<
"||||||||||||||||||||" << std::endl;
1328 std::cout << ddu_t2_coll.size() <<
" "<< ddu_common <<
" "<<ddu_trail2 <<
" "<<
"found" << std::endl;
1329 for (
unsigned int k=0;
k<ddu_t2_coll.size(); ++
k)
1330 std::cout <<
"Line: " << ddu_t2_coll[
k] << std::endl;
1332 std::cout <<
"||||||||||||||||||||" << std::endl;
1334 std::cout << ddu_t3_coll.size() <<
" "<< ddu_common <<
" "<<ddu_trail3 <<
" "<<
"found" << std::endl;
1335 for (
unsigned int k=0;
k<ddu_t3_coll.size(); ++
k)
1336 std::cout <<
"Line: " << ddu_t3_coll[
k] << std::endl;
1338 std::cout <<
"||||||||||||||||||||" << std::endl;
1340 std::cout << dmb_h1_coll.size() <<
" "<< dmb_common <<
" "<<dmb_header1 <<
" "<<
"found" << std::endl;
1342 for (
unsigned int k=0;
k<dmb_h1_coll.size(); ++
k)
1349 std::cout <<
"Line: " <<
" " << dmb_h1_coll[
k] <<
" " << sign1 << dmb_common
1350 <<
" " << dmb_common_crate <<
" " << dmb_crate_coll[
k] <<
" " << dmb_common_slot <<
" " <<
1351 dmb_slot_coll[
k] <<
" " << dmb_common_l1a <<
" " << dmb_l1a_coll[
k] << std::endl;
1354 std::cout <<
"||||||||||||||||||||" << std::endl;
1356 std::cout << dmb_h2_coll.size() <<
" "<< dmb_common <<
" "<<dmb_header2 <<
" "<<
"found" << std::endl;
1357 for (
unsigned int k=0;
k<dmb_h2_coll.size(); ++
k)
1358 std::cout <<
"Line: " << dmb_h2_coll[
k] << std::endl;
1360 std::cout <<
"||||||||||||||||||||" << std::endl;
1362 std::cout << dmb_t1_coll.size() <<
" "<< dmb_common <<
" "<<dmb_tr1 <<
" "<<
"found" << std::endl;
1363 for (
unsigned int k=0;
k<dmb_t1_coll.size(); ++
k)
1364 std::cout <<
"Line: " << dmb_t1_coll[
k] << std::endl;
1366 std::cout <<
"||||||||||||||||||||" << std::endl;
1368 std::cout << dmb_t2_coll.size() <<
" "<< dmb_common <<
" "<<dmb_tr2 <<
" "<<
"found" << std::endl;
1369 for (
unsigned int k=0;
k<dmb_t2_coll.size(); ++
k)
1370 std::cout <<
"Line: " << dmb_t2_coll[
k] << std::endl;
1372 std::cout <<
"||||||||||||||||||||" << std::endl;
1374 std::cout << alct_h1_coll.size() <<
" "<< alct_common <<
" "<<alct_header1 <<
" "<<
"found" << std::endl;
1375 for (
unsigned int k=0;
k<alct_h1_coll.size(); ++
k)
1384 alct_h1_coll[
k] <<
" " << sign1 <<
" " << alct_common <<
" " <<
1385 dmb_common_l1a <<
" " << alct_l1a_coll[
k] << std::endl;
1389 std::cout <<
"||||||||||||||||||||" << std::endl;
1391 std::cout << alct_h2_coll.size() <<
" "<< alct_common <<
" "<<alct_header2 <<
" "<<
"found" << std::endl;
1392 for (
unsigned int k=0;
k<alct_h2_coll.size(); ++
k)
1401 alct_h1_coll[
k] <<
" " << sign1 <<
" " << alct_common <<
" " <<
1402 alct_common_bxn <<
" " << alct_bxn_coll[
k] << std::endl;
1406 std::cout <<
"||||||||||||||||||||" << std::endl;
1408 std::cout << alct_t1_coll.size() <<
" "<< alct_common <<
" "<<alct_tr1 <<
" "<<
"found" << std::endl;
1409 for (
unsigned int k=0;
k<alct_t1_coll.size(); ++
k)
1417 std::cout <<
"Line: " <<
" " << alct_t1_coll[
k] <<
" " << sign1 <<
" " << alct_common <<
" " <<
1418 alct_common_wcnt1 <<
" " << alct_wcnt1_coll[
k] <<
" " << alct_common_wcnt2 <<
" ";
1419 if (alct_wcnt2_coll.size()>0)
1421 std::cout << alct_wcnt2_coll[
k] << std::endl;
1425 std::cout <<
"Undefined (ALCT Header is not found) " << std::endl;
1430 std::cout <<
"||||||||||||||||||||" << std::endl;
1432 std::cout << tmb_h1_coll.size() <<
" "<< tmb_common <<
" "<<tmb_header1 <<
" "<<
"found" << std::endl;
1433 for (
unsigned int k=0;
k<tmb_h1_coll.size(); ++
k)
1441 std::cout <<
"Line: " <<
" " << tmb_h1_coll[
k] <<
" " << sign1 <<
" " << tmb_common <<
" " <<
1442 dmb_common_l1a <<
" " << tmb_l1a_coll[
k] << std::endl;
1446 std::cout <<
"||||||||||||||||||||" << std::endl;
1448 std::cout << tmb_t1_coll.size() <<
" "<< tmb_common <<
" "<<tmb_tr1 <<
" "<<
"found" << std::endl;
1449 for (
unsigned int k=0;
k<tmb_t1_coll.size(); ++
k)
1457 std::cout <<
"Line: " <<
" " << tmb_t1_coll[
k] <<
" " << sign1 <<
" " << tmb_common <<
" " <<
1458 alct_common_wcnt1 <<
" " << tmb_wcnt1_coll[
k] <<
" " << alct_common_wcnt2 <<
" " << tmb_wcnt2_coll[
k]
1464 std::cout <<
"||||||||||||||||||||" << std::endl;
1466 std::cout << cfeb_t1_coll.size() <<
" "<< cfeb_common <<
" "<<cfeb_tr1 <<
" "<<
"found" << std::endl;
1467 for (
unsigned int k=0;
k<cfeb_t1_coll.size(); ++
k)
1468 std::cout <<
"Line: " << cfeb_t1_coll[
k] << std::endl;
1469 std::cout <<
"********************************************************************************" << std::endl;