Visualization of raw data in FED-less events (Robert Harr and Alexander Sakharov)
Visualization of raw data.
538 std::cout << std::endl << std::endl << std::endl;
539 std::cout <<
"Run: "<<
run <<
" Event: " <<
event << std::endl;
542 std::cout <<
"FED-" <<
id <<
" " <<
"(scroll down to see summary)" << std::endl;
544 std::cout <<
"Problem seems in FED-" <<
id <<
" " <<
"(scroll down to see summary)" << std::endl;
545 std::cout <<
"********************************************************************************" << std::endl;
546 std::cout << hl <<
" words of data:" << std::endl;
550 std::vector<int> dcc_id;
553 for (
int i=750;
i<758;
i++)
556 for (
int i=830;
i<838;
i++)
559 char dcc_common[]=
"DCC-";
563 std::vector<int> ddu_id;
565 for (
int i=1;
i<37;
i++)
568 char ddu_common[]=
"DDU-";
569 char ddu_header1[]=
"Header 1";
570 char ddu_header2[]=
"Header 2";
571 char ddu_header3[]=
"Header 3";
572 char ddu_trail1[]=
"Trailer 1", ddu_trail2[]=
"Trailer 2", ddu_trail3[]=
"Trailer 3";
574 char ddu_trailer1_bit[]={
'8',
'0',
'0',
'0',
'f',
'f',
'f',
'f',
'8',
'0',
'0',
'0',
'8',
'0',
'0',
'0'};
575 char ddu_trailer3_bit[]={
'a'};
577 char ddu_tr1_err_common[]=
"Incomplet";
581 char dmb_common[]=
"DMB", dmb_header1[]=
"Header 1", dmb_header2[]=
"Header 2";
582 char dmb_common_crate[]=
"crate:", dmb_common_slot[]=
"slot:";
583 char dmb_common_l1a[]=
"L1A:";
584 char dmb_header1_bit[]={
'9',
'9',
'9',
'9'};
585 char dmb_header2_bit[]={
'a',
'a',
'a',
'a'};
586 char dmb_tr1[]=
"Trailer 1", dmb_tr2[]=
"Trailer 2";
587 char dmb_tr1_bit[]={
'f',
'f',
'f',
'f'}, dmb_tr2_bit[]={
'e',
'e',
'e',
'e'};
593 char alct_common[]=
"ALCT", alct_header1[]=
"Header 1", alct_header2[]=
"Header 2";
594 char alct_common_bxn[]=
"BXN:";
595 char alct_common_wcnt2[]=
"| Actual word count:";
596 char alct_common_wcnt1[]=
"Expected word count:";
597 char alct_header1_bit[]={
'd',
'd',
'd',
'd',
'b',
'0',
'a'};
598 char alct_header2_bit[]={
'0',
'0',
'0',
'0'};
599 char alct_tr1[]=
"Trailer 1";
604 char tmb_common[]=
"TMB", tmb_header1[]=
"Header", tmb_tr1[]=
"Trailer";
605 char tmb_header1_bit[]={
'd',
'd',
'd',
'd',
'b',
'0',
'c'};
606 char tmb_tr1_bit[]={
'd',
'd',
'd',
'd',
'e',
'0',
'f'};
611 char cfeb_common[]=
"CFEB", cfeb_tr1[]=
"Trailer", cfeb_b[]=
"B-word";
612 char cfeb_common_sample[]=
"sample:";
622 char tempbuf_short[17];
623 char sign1[]=
" --->| ";
626 int word_numbering=0;
627 int ddu_inst_i=0, ddu_inst_n=0, ddu_inst_l1a=0;
629 int dmb_inst_crate=0, dmb_inst_slot=0, dmb_inst_l1a=0;
633 int alct_inst_wcnt1=0;
634 int alct_inst_wcnt2=0;
638 int tmb_inst_wcnt1=0;
639 int tmb_inst_wcnt2=0;
650 bool dcc_check=
false;
651 bool ddu_h2_check[sz1]={
false};
652 bool ddu_h1_check=
false;
653 bool dmb_h1_check[sz1]={
false};
654 bool dmb_h2_check[sz1]={
false};
655 bool ddu_h2_h1=
false;
656 bool ddu_tr1_check[sz1]={
false};
657 bool alct_h1_check[sz1]={
false};
658 bool alct_h2_check[sz1]={
false};
659 bool alct_tr1_check[sz1]={
false};
660 bool dmb_tr1_check[sz1]={
false};
661 bool dmb_tr2_check[sz1]={
false};
662 bool tmb_h1_check[sz1]={
false};
663 bool tmb_tr1_check[sz1]={
false};
664 bool cfeb_tr1_check[sz1]={
false};
665 bool cfeb_b_check[sz1]={
false};
666 bool ddu_tr1_bad_check[sz1]={
false};
667 bool extraction=fedshort;
671 std::vector<int> ddu_h1_coll;
672 std::vector<int> ddu_h1_n_coll;
673 std::vector<int> ddu_h2_coll;
674 std::vector<int> ddu_h3_coll;
675 std::vector<int> ddu_t1_coll;
676 std::vector<int> ddu_t2_coll;
677 std::vector<int> ddu_t3_coll;
678 std::vector<int> ddu_l1a_coll;
679 std::vector<int> ddu_bxn_coll;
681 std::vector<int> dmb_h1_coll;
682 std::vector<int> dmb_h2_coll;
683 std::vector<int> dmb_t1_coll;
684 std::vector<int> dmb_t2_coll;
685 std::vector<int> dmb_crate_coll;
686 std::vector<int> dmb_slot_coll;
687 std::vector<int> dmb_l1a_coll;
689 std::vector<int> alct_h1_coll;
690 std::vector<int> alct_h2_coll;
691 std::vector<int> alct_t1_coll;
692 std::vector<int> alct_l1a_coll;
693 std::vector<int> alct_bxn_coll;
694 std::vector<int> alct_wcnt1_coll;
695 std::vector<int> alct_wcnt2_coll;
696 std::vector<int> alct_wcnt2_id_coll;
698 std::vector<int> tmb_h1_coll;
699 std::vector<int> tmb_t1_coll;
700 std::vector<int> tmb_l1a_coll;
701 std::vector<int> tmb_wcnt1_coll;
702 std::vector<int> tmb_wcnt2_coll;
704 std::vector<int> cfeb_t1_coll;
709 char dcc_header1[]=
"DCC Header 1";
710 char dcc_header2[]=
"DCC Header 2";
711 char dcc_trail1[]=
"DCC Trailer 1", dcc_trail1_bit[]={
'e'};
712 char dcc_trail2[]=
"DCC Trailer 2", dcc_trail2_bit[]={
'a'};
715 for (
int i=0;
i < hl;
i++) {
717 for(
int j=-1;
j<4;
j++){
719 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)]);
722 ddu_h2_found++; ddu_h2_found--;
724 ddu_h2_check[
j]=((buf[
i+4*(
j-1)+1]==0x8000)&&
725 (buf[
i+4*(
j-1)+2]==0x0001)&&(buf[
i+4*(
j-1)+3]==0x8000));
727 ddu_tr1_check[
j]=((tempbuf_short[0]==ddu_trailer1_bit[0])&&(tempbuf_short[1]==ddu_trailer1_bit[1])&&
728 (tempbuf_short[2]==ddu_trailer1_bit[2])&&(tempbuf_short[3]==ddu_trailer1_bit[3])&&
729 (tempbuf_short[4]==ddu_trailer1_bit[4])&&(tempbuf_short[5]==ddu_trailer1_bit[5])&&
730 (tempbuf_short[6]==ddu_trailer1_bit[6])&&(tempbuf_short[7]==ddu_trailer1_bit[7])&&
731 (tempbuf_short[8]==ddu_trailer1_bit[8])&&(tempbuf_short[9]==ddu_trailer1_bit[9])&&
732 (tempbuf_short[10]==ddu_trailer1_bit[10])&&(tempbuf_short[11]==ddu_trailer1_bit[11])&&
733 (tempbuf_short[12]==ddu_trailer1_bit[12])&&(tempbuf_short[13]==ddu_trailer1_bit[13])&&
734 (tempbuf_short[14]==ddu_trailer1_bit[14])&&(tempbuf_short[15]==ddu_trailer1_bit[15]));
736 dmb_h1_check[
j]=((tempbuf_short[0]==dmb_header1_bit[0])&&(tempbuf_short[4]==dmb_header1_bit[1])&&
737 (tempbuf_short[8]==dmb_header1_bit[2])&&(tempbuf_short[12]==dmb_header1_bit[3]));
739 dmb_h2_check[
j]=((tempbuf_short[0]==dmb_header2_bit[0])&&(tempbuf_short[4]==dmb_header2_bit[1])&&
740 (tempbuf_short[8]==dmb_header2_bit[2])&&(tempbuf_short[12]==dmb_header2_bit[3]));
741 alct_h1_check[
j]=((tempbuf_short[0]==alct_header1_bit[0])&&(tempbuf_short[4]==alct_header1_bit[1])&&
742 (tempbuf_short[8]==alct_header1_bit[2])&&(tempbuf_short[12]==alct_header1_bit[3])&&
743 (tempbuf_short[13]==alct_header1_bit[4])&&(tempbuf_short[14]==alct_header1_bit[5])&&
744 (tempbuf_short[15]==alct_header1_bit[6]));
745 alct_h2_check[
j]=(((tempbuf_short[0]==alct_header2_bit[0])&&(tempbuf_short[1]==alct_header2_bit[1])&&
746 (tempbuf_short[2]==alct_header2_bit[2])&&(tempbuf_short[3]==alct_header2_bit[3]))||
747 ((tempbuf_short[4]==alct_header2_bit[0])&&(tempbuf_short[5]==alct_header2_bit[1])&&
748 (tempbuf_short[6]==alct_header2_bit[2])&&(tempbuf_short[7]==alct_header2_bit[3]))||
749 ((tempbuf_short[8]==alct_header2_bit[0])&&(tempbuf_short[9]==alct_header2_bit[1])&&
750 (tempbuf_short[10]==alct_header2_bit[2])&&(tempbuf_short[11]==alct_header2_bit[3]))||
751 ((tempbuf_short[12]==alct_header2_bit[0])&&(tempbuf_short[13]==alct_header2_bit[1])&&
752 (tempbuf_short[14]==alct_header2_bit[2])&&(tempbuf_short[15]==alct_header2_bit[3]))
756 alct_tr1_check[
j]=(((buf[
i+4*(
j-1)]&0xFFFF)==0xDE0D)&&((buf[
i+4*(
j-1)+1]&0xF800)==0xD000)&&
757 ((buf[
i+4*(
j-1)+2]&0xF800)==0xD000)&&((buf[
i+4*(
j-1)+3]&0xF000)==0xD000));
759 dmb_tr1_check[
j]=((tempbuf_short[0]==dmb_tr1_bit[0])&&(tempbuf_short[4]==dmb_tr1_bit[1])&&
760 (tempbuf_short[8]==dmb_tr1_bit[2])&&(tempbuf_short[12]==dmb_tr1_bit[3]));
761 dmb_tr2_check[
j]=((tempbuf_short[0]==dmb_tr2_bit[0])&&(tempbuf_short[4]==dmb_tr2_bit[1])&&
762 (tempbuf_short[8]==dmb_tr2_bit[2])&&(tempbuf_short[12]==dmb_tr2_bit[3]));
764 tmb_h1_check[
j]=((tempbuf_short[0]==tmb_header1_bit[0])&&(tempbuf_short[4]==tmb_header1_bit[1])&&
765 (tempbuf_short[8]==tmb_header1_bit[2])&&(tempbuf_short[12]==tmb_header1_bit[3])&&
766 (tempbuf_short[13]==tmb_header1_bit[4])&&(tempbuf_short[14]==tmb_header1_bit[5])&&
767 (tempbuf_short[15]==tmb_header1_bit[6]));
768 tmb_tr1_check[
j]=((tempbuf_short[0]==tmb_tr1_bit[0])&&(tempbuf_short[4]==tmb_tr1_bit[1])&&
769 (tempbuf_short[8]==tmb_tr1_bit[2])&&(tempbuf_short[12]==tmb_tr1_bit[3])&&
770 (tempbuf_short[13]==tmb_tr1_bit[4])&&(tempbuf_short[14]==tmb_tr1_bit[5])&&
771 (tempbuf_short[15]==tmb_tr1_bit[6]));
773 cfeb_tr1_check[
j]=(((buf[
i+4*(
j-1)+1]&0xF000)==0x7000) &&
774 ((buf[
i+4*(
j-1)+2]&0xF000)==0x7000) &&
775 (( buf[
i+4*(
j-1)+1]!= 0x7FFF) || (buf[
i+4*(
j-1)+2] != 0x7FFF)) &&
776 ((buf[
i+4*(
j-1)+3] == 0x7FFF) ||
777 ((buf[
i+4*(
j-1)+3]&buf[
i+4*(
j-1)]) == 0x0&&(buf[
i+4*(
j-1)+3] + buf[
i+4*(
j-1)] == 0x7FFF ))) );
778 cfeb_b_check[
j]=(((buf[
i+4*(
j-1)+3]&0xF000)==0xB000)&&((buf[
i+4*(
j-1)+2]&0xF000)==0xB000) &&
779 ((buf[
i+4*(
j-1)+1]&0xF000)==0xB000)&&((buf[
i+4*(
j-1)]=3&0xF000)==0xB000) );
781 ddu_tr1_bad_check[
j]=((tempbuf_short[0]!=ddu_trailer1_bit[0])&&
784 (tempbuf_short[4]!=ddu_trailer1_bit[4])&&
787 (tempbuf_short[8]==ddu_trailer1_bit[8])&&(tempbuf_short[9]==ddu_trailer1_bit[9])&&
788 (tempbuf_short[10]==ddu_trailer1_bit[10])&&(tempbuf_short[11]==ddu_trailer1_bit[11])&&
789 (tempbuf_short[12]==ddu_trailer1_bit[12])&&(tempbuf_short[13]==ddu_trailer1_bit[13])&&
790 (tempbuf_short[14]==ddu_trailer1_bit[14])&&(tempbuf_short[15]==ddu_trailer1_bit[15]));
794 ddu_h2_h1=ddu_h2_check[2];
796 sprintf(tempbuf_short,
"%04x%04x%04x%04x",buf[
i+3],buf[
i+2],buf[
i+1],buf[
i]);
799 ddu_h1_12_13=(buf[
i]>>8);
800 for (
int kk=0;
kk<36;
kk++){
801 if(((buf[
i+3]&0xF000)==0x5000)&&(ddu_h1_12_13==ddu_id[
kk])&&ddu_h2_h1){
802 ddu_h1_coll.push_back(word_numbering); ddu_h1_n_coll.push_back(ddu_id[
kk]);
803 ddu_inst_l1a=((buf[
i+2]&0xFFFF)+((buf[
i+3]&0x00FF)<<16));
804 ddu_l1a_coll.push_back(ddu_inst_l1a);
805 ddu_inst_bxn=(buf[
i+1]&0xFFF0)>>4;
806 ddu_bxn_coll.push_back(ddu_inst_bxn);
807 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s%i %s%s %s %i %s %i",
808 word_numbering,buf[
i+3],buf[
i+2],buf[
i+1],buf[
i],
809 sign1,ddu_common,ddu_id[kk],ddu_header1,sign1,dmb_common_l1a,ddu_inst_l1a,alct_common_bxn,ddu_inst_bxn);
810 std::cout << tempbuf1 << std::endl; w=0; ddu_h1_check=
true; ddu_inst_l1a=0;
818 dcc_h1_id=(((buf[
i+1]<<12)&0xF000)>>4)+(buf[
i]>>8);
819 for(
int dcci=0;dcci<16;dcci++){
820 if((dcc_id[dcci]==dcc_h1_id)&&(((buf[
i+3]&0xF000)==0x5000)&&(!ddu_h1_check))){
821 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s%i %s",word_numbering,buf[
i+3],buf[
i+2],buf[
i+1],buf[
i],
822 sign1,dcc_common,dcc_h1_id,dcc_header1); dcc_h1_check=word_numbering; w=0;
829 if(((word_numbering-1)==dcc_h1_check)&&((buf[
i+3]&0xFF00)==0xD900)) {
830 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s",word_numbering,buf[
i+3],buf[
i+2],buf[
i+1],buf[
i],
834 else if((word_numbering==word_lines-1)&&(tempbuf_short[0]==dcc_trail1_bit[0])){
835 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s",word_numbering,buf[
i+3],buf[
i+2],buf[
i+1],buf[
i],
839 else if((word_numbering==word_lines)&&(tempbuf_short[0]==dcc_trail2_bit[0])){
840 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s",word_numbering,buf[
i+3],buf[
i+2],buf[
i+1],buf[
i],
846 else if(ddu_h2_check[1]){
847 ddu_inst_i = ddu_h1_n_coll.size();
849 ddu_inst_n=ddu_h1_n_coll[ddu_inst_i-1];
851 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s%i %s",
852 word_numbering,buf[
i+3],buf[
i+2],buf[
i+1],buf[
i],sign1,ddu_common,
853 ddu_inst_n, ddu_header2);
854 ddu_h2_coll.push_back(word_numbering);
860 else if((ddu_h2_check[0]&&dmb_h1_check[2])||(ddu_h2_check[0]&&ddu_tr1_check[2])){
861 ddu_inst_i = ddu_h1_n_coll.size();
863 ddu_inst_n=ddu_h1_n_coll[ddu_inst_i-1];
865 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s%i %s",word_numbering,buf[
i+3],buf[
i+2],buf[
i+1],buf[
i],
866 sign1,ddu_common,ddu_inst_n,ddu_header3);
867 ddu_h3_coll.push_back(word_numbering);
874 else if(dmb_h1_check[1]){
875 dmb_inst_crate=0; dmb_inst_slot=0; dmb_inst_l1a=0;
876 dmb_inst_l1a=((buf[
i]&0x0FFF)+((buf[
i+1]&0xFFF)<<12));
877 dmb_l1a_coll.push_back(dmb_inst_l1a);
879 dmb_inst_crate=((buf[
i+4+1]>>4)&0xFF); dmb_inst_slot=(buf[
i+4+1]&0xF);
880 dmb_crate_coll.push_back(dmb_inst_crate); dmb_slot_coll.push_back(dmb_inst_slot);
882 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s %s%s%s %i %s %i %s %i",
883 word_numbering,buf[
i+3],buf[
i+2],buf[
i+1],buf[
i],
884 sign1,dmb_common,dmb_header1,sign1,dmb_common_crate,dmb_inst_crate,
885 dmb_common_slot,dmb_inst_slot,dmb_common_l1a,dmb_inst_l1a);
886 dmb_h1_coll.push_back(word_numbering);
891 else if(dmb_h2_check[1]){
892 dmb_inst_crate=((buf[
i+1]>>4)&0xFF); dmb_inst_slot=(buf[
i+1]&0xF);
893 dmb_h2_coll.push_back(word_numbering);
895 dmb_inst_l1a=((buf[
i-4]&0x0FFF)+((buf[
i-4+1]&0xFFF)<<12));
896 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s %s%s%s %i %s %i %s %i",
897 word_numbering,buf[
i+3],buf[
i+2],buf[
i+1],buf[
i],
898 sign1,dmb_common,dmb_header2,sign1,dmb_common_crate,dmb_inst_crate,
899 dmb_common_slot,dmb_inst_slot,dmb_common_l1a,dmb_inst_l1a);
906 else if(ddu_tr1_check[1]){
907 ddu_inst_i = ddu_h1_n_coll.size();
909 ddu_inst_n=ddu_h1_n_coll[ddu_inst_i-1];
912 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s%i %s",
913 word_numbering,buf[
i+3],buf[
i+2],buf[
i+1],buf[
i],sign1,ddu_common,ddu_inst_n,ddu_trail1);
914 ddu_t1_coll.push_back(word_numbering);
919 else if(alct_h1_check[1]){
920 alct_start=word_numbering;
921 alct_inst_l1a=(buf[
i+2]&0x0FFF);
922 alct_l1a_coll.push_back(alct_inst_l1a);
923 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s %s%s %s %i",
924 word_numbering,buf[
i+3],buf[
i+2],buf[
i+1],buf[
i],
925 sign1,alct_common,alct_header1,sign1,dmb_common_l1a,alct_inst_l1a);
926 alct_h1_coll.push_back(word_numbering);
927 std::cout << tempbuf1 << std::endl; w=0; alct_inst_l1a=0;
930 else if((alct_h1_check[0])&&(alct_h2_check[2])) {
931 alct_inst_bxn=(buf[
i]&0x0FFF);
932 alct_bxn_coll.push_back(alct_inst_bxn);
933 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s %s%s%s %i",
934 word_numbering,buf[
i+3],buf[
i+2],buf[
i+1],buf[
i],
935 sign1,alct_common,alct_header2,sign1,alct_common_bxn,alct_inst_bxn);
936 alct_h2_coll.push_back(word_numbering);
937 std::cout << tempbuf1 << std::endl; w=0; alct_inst_bxn=0;
941 else if(alct_tr1_check[1]){
942 alct_stop=word_numbering;
943 if((alct_start!=0)&&(alct_stop!=0)&&(alct_stop>alct_start)) {
944 alct_inst_wcnt2=4*(alct_stop-alct_start+1);
945 alct_wcnt2_coll.push_back(alct_inst_wcnt2);
946 alct_wcnt2_id_coll.push_back(alct_start);
948 alct_inst_wcnt1=(buf[
i+3]&0x7FF);
949 alct_wcnt1_coll.push_back(alct_inst_wcnt1);
950 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s %s%s%s %i %s %i",
951 word_numbering,buf[
i+3],buf[
i+2],buf[
i+1],buf[
i],
952 sign1,alct_common,alct_tr1,sign1,alct_common_wcnt1,alct_inst_wcnt1,
953 alct_common_wcnt2,alct_inst_wcnt2);
954 alct_t1_coll.push_back(word_numbering);
955 std::cout << tempbuf1 << std::endl; w=0; alct_inst_wcnt1=0;
960 else if((ddu_tr1_check[-1])&&(tempbuf_short[0]==ddu_trailer3_bit[0])){
962 ddu_inst_i = ddu_h1_n_coll.size();
964 ddu_inst_n=ddu_h1_n_coll[ddu_inst_i-1];
967 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s%i %s",
968 word_numbering,buf[
i+3],buf[
i+2],buf[
i+1],buf[
i],sign1,ddu_common,ddu_inst_n,ddu_trail3);
969 ddu_t3_coll.push_back(word_numbering);
973 else if((ddu_tr1_check[0])&&(tempbuf_short[0]!=ddu_trailer3_bit[0])){
975 ddu_inst_i = ddu_h1_n_coll.size();
977 ddu_inst_n=ddu_h1_n_coll[ddu_inst_i-1];
980 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s%i %s",
981 word_numbering,buf[
i+3],buf[
i+2],buf[
i+1],buf[
i],sign1,ddu_common,ddu_inst_n,ddu_trail2);
982 ddu_t2_coll.push_back(word_numbering);
987 else if(dmb_tr1_check[1]){
988 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s %s",
989 word_numbering,buf[
i+3],buf[
i+2],buf[
i+1],buf[
i],sign1,dmb_common,dmb_tr1);
990 dmb_t1_coll.push_back(word_numbering);
995 else if(dmb_tr2_check[1]){
996 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s %s",
997 word_numbering,buf[
i+3],buf[
i+2],buf[
i+1],buf[
i],sign1,dmb_common,dmb_tr2);
998 dmb_t2_coll.push_back(word_numbering);
1002 else if(tmb_h1_check[1]){
1003 tmb_start=word_numbering;
1004 tmb_inst_l1a=(buf[
i+2]&0x000F);
1005 tmb_l1a_coll.push_back(tmb_inst_l1a);
1006 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s %s%s%s %i",
1007 word_numbering,buf[
i+3],buf[
i+2],buf[
i+1],buf[
i],sign1,tmb_common,tmb_header1,
1008 sign1,dmb_common_l1a,tmb_inst_l1a);
1009 tmb_h1_coll.push_back(word_numbering);
1010 std::cout << tempbuf1 << std::endl; w=0; tmb_inst_l1a=0;
1012 else if(tmb_tr1_check[1]){
1013 tmb_stop=word_numbering;
1014 if((tmb_start!=0)&&(tmb_stop!=0)&&(tmb_stop>tmb_start)) {
1015 tmb_inst_wcnt2=4*(tmb_stop-tmb_start+1);
1016 tmb_wcnt2_coll.push_back(tmb_inst_wcnt2);
1018 tmb_inst_wcnt1=(buf[
i+3]&0x7FF);
1019 tmb_wcnt1_coll.push_back(tmb_inst_wcnt1);
1020 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s %s%s%s %i %s %i",
1021 word_numbering,buf[
i+3],buf[
i+2],buf[
i+1],buf[
i],
1022 sign1,tmb_common,tmb_tr1,sign1,alct_common_wcnt1,tmb_inst_wcnt1,
1023 alct_common_wcnt2,tmb_inst_wcnt2);
1024 tmb_t1_coll.push_back(word_numbering);
1025 std::cout << tempbuf1 << std::endl; w=0;
1029 else if(cfeb_tr1_check[1]){
1031 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s %s%s %s %i",
1032 word_numbering,buf[
i+3],buf[
i+2],buf[
i+1],buf[
i],
1033 sign1,cfeb_common,cfeb_tr1,sign1,cfeb_common_sample,cfeb_sample);
1034 cfeb_t1_coll.push_back(word_numbering); w=0;
1035 std::cout << tempbuf1 << std::endl; w=0;
1037 else if(cfeb_b_check[1]){
1038 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s %s",
1039 word_numbering,buf[
i+3],buf[
i+2],buf[
i+1],buf[
i],sign1,cfeb_common,cfeb_b);
1040 std::cout << tempbuf1 << std::endl; w=0;
1045 else if(ddu_tr1_bad_check[1]){
1046 ddu_inst_i = ddu_h1_n_coll.size(); ddu_inst_n=ddu_h1_n_coll[ddu_inst_i-1];
1047 sprintf(tempbuf1,
"%6i %04x %04x %04x %04x%s%s%i %s %s",
1048 word_numbering,buf[
i+3],buf[
i+2],buf[
i+1],buf[
i],sign1,ddu_common,ddu_inst_n,
1049 ddu_trail1,ddu_tr1_err_common);
1050 std::cout << tempbuf1 << std::endl; w=0;
1053 else if(extraction&&(!ddu_h1_check)&&(!dcc_check)){
1055 sprintf(tempbuf,
"%6i %04x %04x %04x %04x",
1056 word_numbering,buf[
i+3],buf[
i+2],buf[
i+1],buf[
i]);
1057 std::cout << tempbuf << std::endl; w++;}
1059 std::cout <<
"..................................................." << std::endl; w++;}
1062 else if((!ddu_h1_check)&&(!dcc_check)){
1063 sprintf(tempbuf,
"%6i %04x %04x %04x %04x",word_numbering,buf[
i+3],buf[
i+2],buf[
i+1],buf[
i]);
1067 i+=3; ddu_h1_check=
false; dcc_check=
false;
1070 std::cout <<
"********************************************************************************" <<
1071 std::endl << std::endl;
1073 std::cout <<
"For complete output turn off VisualFEDShort in muonCSCDigis configuration file." << std::endl;
1074 std::cout <<
"********************************************************************************" <<
1075 std::endl << std::endl;
1079 std::cout << ddu_h1_coll.size() <<
" "<< ddu_common <<
" "<<ddu_header1 <<
" "<<
"found" << std::endl;
1084 for(
unsigned int k=0;
k<ddu_h1_coll.size();++
k){
1090 std::cout <<
"Line: " <<
" " << ddu_h1_coll[
k] <<
" " << sign1 <<
" " <<
1091 ddu_common <<
" " << ddu_h1_n_coll[
k] <<
" " << dmb_common_l1a <<
" " << ddu_l1a_coll[
k] <<
" " <<
1092 alct_common_bxn <<
" " << ddu_bxn_coll[
k] << std::endl;
1097 std::cout <<
"||||||||||||||||||||" << std::endl;
1099 std::cout << ddu_h2_coll.size() <<
" "<< ddu_common <<
" "<<ddu_header2 <<
" "<<
"found" << std::endl;
1100 for(
unsigned int k=0;
k<ddu_h2_coll.size();++
k)
1101 std::cout <<
"Line: " << ddu_h2_coll[
k] << std::endl;
1103 std::cout <<
"||||||||||||||||||||" << std::endl;
1105 std::cout << ddu_h3_coll.size() <<
" "<< ddu_common <<
" "<<ddu_header3 <<
" "<<
"found" << std::endl;
1106 for(
unsigned int k=0;
k<ddu_h3_coll.size();++
k)
1107 std::cout <<
"Line: " << ddu_h3_coll[
k] << std::endl;
1109 std::cout <<
"||||||||||||||||||||" << std::endl;
1111 std::cout << ddu_t1_coll.size() <<
" "<< ddu_common <<
" "<<ddu_trail1 <<
" "<<
"found" << std::endl;
1112 for(
unsigned int k=0;
k<ddu_t1_coll.size();++
k)
1113 std::cout <<
"Line: " << ddu_t1_coll[
k] << std::endl;
1115 std::cout <<
"||||||||||||||||||||" << std::endl;
1117 std::cout << ddu_t2_coll.size() <<
" "<< ddu_common <<
" "<<ddu_trail2 <<
" "<<
"found" << std::endl;
1118 for(
unsigned int k=0;
k<ddu_t2_coll.size();++
k)
1119 std::cout <<
"Line: " << ddu_t2_coll[
k] << std::endl;
1121 std::cout <<
"||||||||||||||||||||" << std::endl;
1123 std::cout << ddu_t3_coll.size() <<
" "<< ddu_common <<
" "<<ddu_trail3 <<
" "<<
"found" << std::endl;
1124 for(
unsigned int k=0;
k<ddu_t3_coll.size();++
k)
1125 std::cout <<
"Line: " << ddu_t3_coll[
k] << std::endl;
1127 std::cout <<
"||||||||||||||||||||" << std::endl;
1129 std::cout << dmb_h1_coll.size() <<
" "<< dmb_common <<
" "<<dmb_header1 <<
" "<<
"found" << std::endl;
1131 for(
unsigned int k=0;
k<dmb_h1_coll.size();++
k){
1137 std::cout <<
"Line: " <<
" " << dmb_h1_coll[
k] <<
" " << sign1 << dmb_common
1138 <<
" " << dmb_common_crate <<
" " << dmb_crate_coll[
k] <<
" " << dmb_common_slot <<
" " <<
1139 dmb_slot_coll[
k] <<
" " << dmb_common_l1a <<
" " << dmb_l1a_coll[
k] << std::endl;
1142 std::cout <<
"||||||||||||||||||||" << std::endl;
1144 std::cout << dmb_h2_coll.size() <<
" "<< dmb_common <<
" "<<dmb_header2 <<
" "<<
"found" << std::endl;
1145 for(
unsigned int k=0;
k<dmb_h2_coll.size();++
k)
1146 std::cout <<
"Line: " << dmb_h2_coll[
k] << std::endl;
1148 std::cout <<
"||||||||||||||||||||" << std::endl;
1150 std::cout << dmb_t1_coll.size() <<
" "<< dmb_common <<
" "<<dmb_tr1 <<
" "<<
"found" << std::endl;
1151 for(
unsigned int k=0;
k<dmb_t1_coll.size();++
k)
1152 std::cout <<
"Line: " << dmb_t1_coll[
k] << std::endl;
1154 std::cout <<
"||||||||||||||||||||" << std::endl;
1156 std::cout << dmb_t2_coll.size() <<
" "<< dmb_common <<
" "<<dmb_tr2 <<
" "<<
"found" << std::endl;
1157 for(
unsigned int k=0;
k<dmb_t2_coll.size();++
k)
1158 std::cout <<
"Line: " << dmb_t2_coll[
k] << std::endl;
1160 std::cout <<
"||||||||||||||||||||" << std::endl;
1162 std::cout << alct_h1_coll.size() <<
" "<< alct_common <<
" "<<alct_header1 <<
" "<<
"found" << std::endl;
1163 for(
unsigned int k=0;
k<alct_h1_coll.size();++
k){
1171 alct_h1_coll[
k] <<
" " << sign1 <<
" " << alct_common <<
" " <<
1172 dmb_common_l1a <<
" " << alct_l1a_coll[
k] << std::endl;
1176 std::cout <<
"||||||||||||||||||||" << std::endl;
1178 std::cout << alct_h2_coll.size() <<
" "<< alct_common <<
" "<<alct_header2 <<
" "<<
"found" << std::endl;
1179 for(
unsigned int k=0;
k<alct_h2_coll.size();++
k){
1187 alct_h1_coll[
k] <<
" " << sign1 <<
" " << alct_common <<
" " <<
1188 alct_common_bxn <<
" " << alct_bxn_coll[
k] << std::endl;
1192 std::cout <<
"||||||||||||||||||||" << std::endl;
1194 std::cout << alct_t1_coll.size() <<
" "<< alct_common <<
" "<<alct_tr1 <<
" "<<
"found" << std::endl;
1195 for(
unsigned int k=0;
k<alct_t1_coll.size();++
k){
1202 std::cout <<
"Line: " <<
" " << alct_t1_coll[
k] <<
" " << sign1 <<
" " << alct_common <<
" " <<
1203 alct_common_wcnt1 <<
" " << alct_wcnt1_coll[
k] <<
" " << alct_common_wcnt2 <<
" " <<
1204 alct_wcnt2_coll[
k] << std::endl;
1208 std::cout <<
"||||||||||||||||||||" << std::endl;
1210 std::cout << tmb_h1_coll.size() <<
" "<< tmb_common <<
" "<<tmb_header1 <<
" "<<
"found" << std::endl;
1211 for(
unsigned int k=0;
k<tmb_h1_coll.size();++
k){
1218 std::cout <<
"Line: " <<
" " << tmb_h1_coll[
k] <<
" " << sign1 <<
" " << tmb_common <<
" " <<
1219 dmb_common_l1a <<
" " << tmb_l1a_coll[
k] << std::endl;
1223 std::cout <<
"||||||||||||||||||||" << std::endl;
1225 std::cout << tmb_t1_coll.size() <<
" "<< tmb_common <<
" "<<tmb_tr1 <<
" "<<
"found" << std::endl;
1226 for(
unsigned int k=0;
k<tmb_t1_coll.size();++
k){
1233 std::cout <<
"Line: " <<
" " << tmb_t1_coll[
k] <<
" " << sign1 <<
" " << tmb_common <<
" " <<
1234 alct_common_wcnt1 <<
" " << tmb_wcnt1_coll[
k] <<
" " << alct_common_wcnt2 <<
" " << tmb_wcnt2_coll[
k]
1240 std::cout <<
"||||||||||||||||||||" << std::endl;
1242 std::cout << cfeb_t1_coll.size() <<
" "<< cfeb_common <<
" "<<cfeb_tr1 <<
" "<<
"found" << std::endl;
1243 for(
unsigned int k=0;
k<cfeb_t1_coll.size();++
k)
1244 std::cout <<
"Line: " << cfeb_t1_coll[
k] << std::endl;
1245 std::cout <<
"********************************************************************************" << std::endl;