ATLAS Offline Software
Loading...
Searching...
No Matches
SectorLogic.cxx File Reference
Include dependency graph for SectorLogic.cxx:

Go to the source code of this file.

Functions

CMAword getbits (CMAword x, int msb, int lsb)
unsigned setbits (unsigned x, int msb, int lsb, unsigned y)
ostreamdfpa (ostream &stream, int indent, int whitesp, int ntimes)
ostreamoperator<< (ostream &stream, const DataFromPad &o)
ostreamofsla (ostream &stream, int indent, int whitesp, int ntimes)
ostreamoperator<< (std::ostream &stream, OutputFromSectorLogic &o)
ostreamoperator<< (std::ostream &stream, InternalRegister &o)
std::ostream & operator<< (std::ostream &stream, SectorLogic &o)

Function Documentation

◆ dfpa()

ostream & dfpa ( ostream & stream,
int indent,
int whitesp,
int ntimes )

Definition at line 46 of file SectorLogic.cxx.

46 {
47 int iind = 0, iwhit = 0, itime = 0;
48 for (iind = 0; iind <= indent - 1; iind++) stream << " ";
49 for (itime = 0; itime <= ntimes - 1; itime++) {
50 for (iwhit = 0; iwhit <= whitesp - 1; iwhit++) stream << " ";
51 stream << "b o r o o p m n s";
52 }
53 stream << std::endl;
54 for (iind = 0; iind <= indent - 1; iind++) stream << " ";
55 for (itime = 0; itime <= ntimes - 1; itime++) {
56 for (iwhit = 0; iwhit <= whitesp - 1; iwhit++) stream << " ";
57 stream << "c p s e f t t t g";
58 }
59 stream << std::endl;
60 return stream;
61}

◆ getbits()

CMAword getbits ( CMAword x,
int msb,
int lsb )

Definition at line 27 of file SectorLogic.cxx.

27{ return ~(~0u << (msb - lsb + 1)) & (x >> lsb); }
#define x
@ u
Enums for curvilinear frames.
Definition ParamDefs.h:77

◆ ofsla()

ostream & ofsla ( ostream & stream,
int indent,
int whitesp,
int ntimes )

Definition at line 83 of file SectorLogic.cxx.

83 {
84 int iind = 0, iwhit = 0, itime = 0;
85 for (iind = 0; iind <= indent - 1; iind++) stream << " ";
86 for (itime = 0; itime <= ntimes - 1; itime++) {
87 for (iwhit = 0; iwhit <= whitesp - 1; iwhit++) stream << " ";
88 stream << "ss bnnppoorproorprn";
89 }
90 stream << std::endl;
91 for (iind = 0; iind <= indent - 1; iind++) stream << " ";
92 for (itime = 0; itime <= ntimes - 1; itime++) {
93 for (iwhit = 0; iwhit <= whitesp - 1; iwhit++) stream << " ";
94 stream << "gg cttttefsdiefsdit";
95 }
96 stream << std::endl;
97 for (iind = 0; iind <= indent - 1; iind++) stream << " ";
98 for (itime = 0; itime <= ntimes - 1; itime++) {
99 for (iwhit = 0; iwhit <= whitesp - 1; iwhit++) stream << " ";
100 stream << "21 21212222211111 ";
101 }
102 stream << std::endl;
103 return stream;
104}

◆ operator<<() [1/4]

ostream & operator<< ( ostream & stream,
const DataFromPad & o )

Definition at line 64 of file SectorLogic.cxx.

64 {
65 stream.width(3);
66 stream.fill('x');
67 stream << o.bcid << " ";
68 stream.width(1);
69 stream.fill(' ');
70 stream << o.opl << " ";
71 stream << o.r << " ";
72 stream << o.oveta << " ";
73 stream << o.ovphi << " ";
74 stream << o.pt << " ";
75 stream << o.roi << " ";
76 stream << o.ntrig << " ";
77 stream << o.sign;
78 return stream;
79}

◆ operator<<() [2/4]

ostream & operator<< ( std::ostream & stream,
InternalRegister & o )

Definition at line 140 of file SectorLogic.cxx.

140 {
141 int j = 0;
142 for (j = 0; j <= 7; j++) {
143 stream << "pad[" << j << "] : ";
144 stream << o.pad[j] << std::endl;
145 }
146 stream.setf(ios::hex, ios::basefield);
147 stream << "tile : " << o.tile << std::endl;
148 stream << "sl out : " << o.out;
149 stream.setf(ios::hex, ios::basefield);
150 return stream;
151}
std::array< DataFromPad, 8 > pad
Definition SectorLogic.h:88
OutputFromSectorLogic out
Definition SectorLogic.h:90

◆ operator<<() [3/4]

ostream & operator<< ( std::ostream & stream,
OutputFromSectorLogic & o )

Definition at line 107 of file SectorLogic.cxx.

107 {
108 // stream << "x x ";
109 stream.setf(std::ios::dec, std::ios::basefield);
110 // stream << setw(3);
111 stream << o.sign2;
112 stream << o.sign1;
113 stream.width(3);
114 stream.fill('x');
115 stream << o.bcid;
116 stream.width(1);
117 stream.fill(' ');
118 stream << o.ntrig2;
119 stream << o.ntrig1;
120 stream << o.pt2;
121 stream << o.pt1;
122 stream << o.ove2;
123 stream << o.ovf2;
124 stream << o.r2;
125 stream << o.pad2;
126 stream << o.roi2;
127 stream << o.ove1;
128 stream << o.ovf1;
129 stream << o.r1;
130 stream << o.pad1;
131 stream << o.roi1;
132 stream << o.ntrig;
133 return stream;
134}

◆ operator<<() [4/4]

std::ostream & operator<< ( std::ostream & stream,
SectorLogic & o )

Definition at line 543 of file SectorLogic.cxx.

543 {
544 int nBunMax = o.numberOfBunches();
545 stream << "@@@@@@@@@@ event and sector logic identification @@@@@@@@@@\n\n";
546
547 stream << "run = " << o.m_run << std::endl;
548 stream << "event = " << o.m_event << std::endl;
549 stream << "debug = " << o.m_debug << std::endl;
550 stream << "subsys = " << o.m_subsys << std::endl;
551 stream << "sect = " << o.m_sect << std::endl;
552
553 stream << std::endl;
554
555 // print all the parameters of the sector logic board
556 stream << "@@@@@@@@@@ sector logic configuration parameters @@@@@@@@@@\n\n";
557
558 // tccheck
559 stream.setf(ios::hex, ios::basefield);
560 stream << "EnableTCCheckLow : ";
561 stream.width(8);
562 stream.fill('0');
563 stream << o.m_EnableTCCheckLow << std::endl;
564 stream << "EnableTCCheckHigh : ";
565 stream.width(8);
566 stream.fill('0');
567 stream << o.m_EnableTCCheckHigh << std::endl;
568 int jj = 0;
569 int kk = 0;
570 for (jj = 0; jj <= 7; jj++) {
571 stream << "SetTCCheck pad[";
572 stream << jj;
573 stream << "] : ";
574 for (kk = 5; kk >= 0; kk--) {
575 stream.width(8);
576 stream.fill('0');
577 stream << o.m_SetTCCheck[jj][kk] << " ";
578 }
579 stream << std::endl;
580 }
581 stream << std::endl;
582
583 // opl check
584 stream << "EnableOPLCheck : ";
585 stream.width(8);
586 stream.fill('0');
587 stream << o.m_EnableOPLCheck << std::endl;
588 for (jj = 0; jj <= 7; jj++) {
589 stream << "SetOPLCheck pad[";
590 stream << jj;
591 stream << "] : ";
592 for (kk = 2; kk >= 0; kk--) {
593 stream.width(2);
594 stream.fill('0');
595 stream << o.m_SetOPLCheck[jj][kk] << " ";
596 }
597 stream << std::endl;
598 }
599 stream << std::endl;
600
601 stream.width(1);
602 stream.fill(' ');
603
604 // internal register (input register)
605 InternalRegister *intreginp[5];
606 intreginp[0] = o.m_LowPtFilter_in.data();
607 intreginp[1] = o.m_TileCalConfirm_in.data();
608 intreginp[2] = o.m_SolveEtaOverlap_in.data();
609 intreginp[3] = o.m_SortHighest_in.data();
610 intreginp[4] = o.m_Sort2ndHighest_in.data();
611 // internal register (output register)
612 InternalRegister *intregoutp[5];
613 intregoutp[0] = o.m_LowPtFilter_out.data();
614 intregoutp[1] = o.m_TileCalConfirm_out.data();
615 intregoutp[2] = o.m_SolveEtaOverlap_out.data();
616 intregoutp[3] = o.m_SortHighest_out.data();
617 intregoutp[4] = o.m_Sort2ndHighest_out.data();
618
619 int ibx = 0;
620
621 // print the input registers of the sector logic board
622 stream << "@@@@@@@@@@ sector logic input registers @@@@@@@@@@\n\n";
623
624 // print input from pads
625 stream.setf(std::ios::dec, std::ios::basefield);
626 dfpa(stream, 8, 8, nBunMax);
627 int ipad = 0;
628 for (ipad = 0; ipad <= 7; ipad++) {
629 stream << "pad[" << ipad << "] :";
630 for (ibx = 0; ibx <= nBunMax - 1; ibx++) {
631 stream << " ";
632 stream << o.m_InFromPad[ibx][ipad];
633 }
634 stream << std::endl;
635 }
636
637 // print input from tilecal
638 stream.setf(std::ios::hex, std::ios::basefield);
639 stream << "tile :";
640 for (ibx = 0; ibx <= nBunMax - 1; ibx++) {
641 stream << " ";
642 stream.width(8);
643 stream.fill('0');
644 stream << o.m_InFromTileCal[ibx];
645 }
646 stream.width(1);
647 stream.fill(' ');
648 stream << std::endl << std::endl;
649
650 // print all sector logic internal registers
651 stream << "@@@@@@@@@@ sector logic internal registers @@@@@@@@@@\n\n";
652
653 int ireg = 0;
654 for (ireg = 0; ireg <= 4; ireg++) {
655 // input registers
656 stream << "internal registers # " << ireg + 1 << " (input)" << std::endl;
657 // DataFromPad
658 stream.setf(std::ios::dec, std::ios::basefield);
659 dfpa(stream, 8, 8, nBunMax);
660 for (ipad = 0; ipad <= 7; ipad++) {
661 stream << "pad[" << ipad << "] :";
662 for (ibx = 0; ibx <= nBunMax - 1; ibx++) {
663 stream << " ";
664 stream << (intreginp[ireg] + ibx)->pad[ipad];
665 }
666 stream << std::endl;
667 }
668 // Tile Cal
669 stream.setf(ios::hex, ios::basefield);
670 stream << "tile :";
671 for (ibx = 0; ibx <= nBunMax - 1; ibx++) {
672 stream << " ";
673 stream.width(8);
674 stream.fill('0');
675 stream << (intreginp[ireg] + ibx)->tile;
676 }
677 stream.width(1);
678 stream.fill(' ');
679 stream << std::endl;
680 // Sector Logic Output
681 stream.setf(std::ios::dec, std::ios::basefield);
682 stream << "sl out :";
683 for (ibx = 0; ibx <= nBunMax - 1; ibx++) {
684 stream << " ";
685 stream << (intreginp[ireg] + ibx)->out;
686 }
687 stream << std::endl;
688 stream << std::endl;
689
690 // output registers
691 stream << "internal registers # " << ireg + 1 << " (output)" << std::endl;
692 // DataFromPad
693 stream.setf(std::ios::dec, std::ios::basefield);
694 dfpa(stream, 8, 8, nBunMax);
695 for (ipad = 0; ipad <= 7; ipad++) {
696 stream << "pad[" << ipad << "] :";
697 for (ibx = 0; ibx <= nBunMax - 1; ibx++) {
698 stream << " ";
699 stream << (intregoutp[ireg] + ibx)->pad[ipad];
700 }
701 stream << std::endl;
702 }
703 // Tile Cal
704 stream.setf(std::ios::hex, std::ios::basefield);
705 stream << "tile :";
706 for (ibx = 0; ibx <= nBunMax - 1; ibx++) {
707 stream << " ";
708 stream.width(8);
709 stream.fill('0');
710 stream << (intregoutp[ireg] + ibx)->tile;
711 }
712 stream.width(1);
713 stream.fill(' ');
714 stream << std::endl;
715 // Sector Logic Output
716 stream.setf(std::ios::dec, std::ios::basefield);
717 stream << "sl out :";
718 for (ibx = 0; ibx <= nBunMax - 1; ibx++) {
719 stream << " ";
720 stream << (intregoutp[ireg] + ibx)->out;
721 }
722 stream << std::endl << std::endl;
723 }
724
725 // print the output registers of the sector logic board
726 stream.setf(std::ios::dec, std::ios::basefield);
727 stream << "@@@@@@@@@@ sector logic output register @@@@@@@@@@\n\n";
728 ofsla(stream, 8, 5, nBunMax);
729 stream << " ";
730 for (ibx = 0; ibx <= nBunMax - 1; ibx++) {
731 stream << " ";
733 }
734
735 return stream;
736}
ostream & ofsla(ostream &stream, int indent, int whitesp, int ntimes)
ostream & dfpa(ostream &stream, int indent, int whitesp, int ntimes)
std::array< InternalRegister, 8 > m_LowPtFilter_out
std::array< InternalRegister, 8 > m_Sort2ndHighest_out
CMAword m_EnableTCCheckHigh
ubit16 m_sect
std::array< OutputFromSectorLogic, 8 > m_OutFromSectorLogic
std::array< InternalRegister, 8 > m_SortHighest_in
std::array< InternalRegister, 8 > m_SolveEtaOverlap_out
CMAword m_EnableOPLCheck
std::array< InternalRegister, 8 > m_TileCalConfirm_in
std::array< InternalRegister, 8 > m_LowPtFilter_in
std::array< CMAword, 8 > m_InFromTileCal
std::array< InternalRegister, 8 > m_SortHighest_out
ubit16 numberOfBunches() const
CMAword m_debug
std::array< InternalRegister, 8 > m_Sort2ndHighest_in
CMAword m_EnableTCCheckLow
CMAword m_SetTCCheck[8][6]
ubit16 m_subsys
std::array< InternalRegister, 8 > m_SolveEtaOverlap_in
std::array< InternalRegister, 8 > m_TileCalConfirm_out
ubit16 m_SetOPLCheck[8][3]
DataFromPad m_InFromPad[8][8]

◆ setbits()

unsigned setbits ( unsigned x,
int msb,
int lsb,
unsigned y )

Definition at line 32 of file SectorLogic.cxx.

32 {
33 unsigned mask = 0u;
34 mask = (~0u << (msb + 1)) | ~(~0u << lsb);
35 return (x & mask) | (y << lsb);
36}
#define y