|
ATLAS Offline Software
|
Go to the documentation of this file.
68 m_id (std::make_unique<CMAidentity>(
parse))
75 m_id (std::make_unique<CMAidentity>(cma.id()))
77 const CMAprogram* proglow = cma.lowPt_program();
78 const CMAprogram* proghigh = cma.highPt_program();
79 if (proglow) { m_lowPt_program = std ::make_unique<CMAprogram>(*proglow); }
80 if (proghigh) { m_highPt_program = std::make_unique<CMAprogram>(*proghigh); }
82 m_highPt_start_st = cma.highPt_start_st();
83 m_highPt_start_ch = cma.highPt_start_ch();
84 m_highPt_stop_st = cma.highPt_stop_st();
85 m_highPt_stop_ch = cma.highPt_stop_ch();
87 m_active_pivot_chs = cma.active_pivot_chs();
88 m_active_lowPt_chs = cma.active_lowPt_chs();
89 m_active_highPt_chs = cma.active_highPt_chs();
95 reset_pivot_cabling();
96 reset_lowPt_cabling();
97 reset_highPt_cabling();
99 m_pivot_rpc_read = cma.pivot_rpc_read();
100 m_lowPt_rpc_read = cma.lowPt_rpc_read();
101 m_highPt_rpc_read = cma.highPt_rpc_read();
105 for (
int i = 0;
i < m_pivot_rpc_read; ++
i)
106 for (
int j = 0; j < 2; ++j)
111 for (
int i = 0;
i < m_lowPt_rpc_read; ++
i)
112 for (
int j = 0; j < 2; ++j)
117 for (
int i = 0;
i < m_highPt_rpc_read; ++
i)
118 for (
int j = 0; j < 2; ++j)
122 m_first_pivot_code = cma.first_pivot_code();
123 m_last_pivot_code = cma.last_pivot_code();
124 m_first_lowPt_code = cma.first_lowPt_code();
125 m_last_lowPt_code = cma.last_lowPt_code();
126 m_first_highPt_code = cma.first_highPt_code();
127 m_last_highPt_code = cma.last_highPt_code();
129 m_conf_type = cma.conf_type();
142 m_id = std::make_unique<CMAidentity>(cma.
id());
180 for (
int j = 0; j < 2; ++j)
186 for (
int j = 0; j < 2; ++j)
192 for (
int j = 0; j < 2; ++j)
230 for (
int i = 0;
i < rpc_to_read; ++
i)
231 for (
int j = 0; j < 2; ++j)
239 for (
int i = 0;
i < rpc_to_read; ++
i)
240 for (
int j = 0; j < 2; ++j)
248 for (
int i = 0;
i < rpc_to_read; ++
i)
249 for (
int j = 0; j < 2; ++j)
255 return this->
id() == cma.
id();
259 return this->
id() ==
id;
295 unsigned int finish = 164;
298 stream << std::endl <<
"Low Pt and Hi Pt not yet connected!" << std::endl;
299 for (
int i = 0;
i < 80; ++
i)
stream << (
char)finish;
307 char(*displow)[90] =
new char[
ln][90];
310 stream << std::endl <<
"Low Pt matrix connections:" << std::endl << std::endl;
314 for (
int i = 0;
i <
ln; ++
i)
315 if (displow[
i][0] !=
'\0')
stream << displow[
i] << std::endl;
320 stream << std::endl << std::endl <<
"Hi Pt matrix connections:" << std::endl << std::endl;
324 char(*disphi)[90] =
new char[
ln][90];
329 for (
int i = 0;
i <
ln; ++
i)
330 if (disphi[
i][0] !=
'\0')
stream << disphi[
i] << std::endl;
335 for (
int i = 0;
i < 80; ++
i)
stream << (
char)finish;
341 unsigned int up = 19;
342 unsigned int left = 22;
343 unsigned int right = 25;
344 unsigned int middle = 18;
345 unsigned int down = 24;
354 std::ostringstream** disp =
new std::ostringstream*[
ln];
356 for (
int i = 0;
i <
ln; ++
i) disp[
i] =
new std::ostringstream;
374 int shift = 6 * pivot_loop;
376 for (
int i = 0;
i < shift; ++
i) *disp[0] <<
" ";
381 for (
int j = 0; j < pivot_loop; ++j) {
382 if (j) *disp[
i] <<
"|";
391 (std::ostream&)*disp[
i] << (
char)left;
393 unsigned int no_coincidence =
':';
395 const bool* registers = program->
registers();
400 if (registers[third])
402 else if (registers[
second])
404 else if (registers[
first])
407 (std::ostream&)*disp[
i] << (
char)no_coincidence;
412 (std::ostream&)*disp[
i] << (
char)right;
417 for (
int j = 0; j < shift; ++j) *disp[start_confirm] <<
" ";
418 for (
int i = start_confirm + 1;
i < start_confirm + conf_loop * 6; ++
i)
419 for (
int j = 0; j < shift; ++j) *disp[
i] <<
" ";
423 for (
int i = 0;
i < conf_loop; ++
i) {
424 int start = (
i) ? start_confirm +
i * 6 : start_confirm + 1;
430 for (
int j = 0; j < 5; ++j)
435 (std::ostream&)*disp[
start + j] <<
"*";
439 for (
int i = 0;
i <
ln; ++
i) {
440 std::string
tmp = (*disp[
i]).
str();
461 stream <<
"lowPt <" << std::setw(2);
467 stream <<
"highPt<" << std::setw(2);
482 int max_channels = 0;
488 std::ostringstream disp;
489 disp <<
"Error in Sector Type " << this->
sector_type() <<
":" << std::endl
490 << this->
id() <<
" attempted to receive more than " << max_channels <<
" channels for " <<
stat <<
" side";
495 int* strips =
nullptr;
500 strips =
reinterpret_cast<int*
>(
m_pivot);
503 strips =
reinterpret_cast<int*
>(
m_lowPt);
506 strips =
reinterpret_cast<int*
>(
m_highPt);
510 for (
int i = 0;
i < nstrips; ++
i)
511 if (strips[
i] == cabling_code)
return this;
517 std::ostringstream disp;
519 <<
" " << msg <<
" between " <<
name() <<
" n. " <<
number() <<
" and " << cma->
name() <<
" n. " << cma->
number() << std::endl
525 std::ostringstream disp;
530 <<
") for" << std::endl
533 disp <<
"High Pt cabling inconsistence (cabling from connector " <<
m_params.
highPtStartCo <<
" to connector "
541 std::ostringstream disp;
544 disp << this->
id() <<
" receives input from" << std::endl
545 <<
" RPC chamber n. " <<
num <<
" of station " <<
stat <<
" which has no Wired OR readout!";
550 std::ostringstream disp;
552 << this->
id() <<
str;
584 int* strips =
nullptr;
591 strips =
reinterpret_cast<int*
>(
m_pivot);
595 strips =
reinterpret_cast<int*
>(
m_lowPt);
599 strips =
reinterpret_cast<int*
>(
m_highPt);
603 for (
int i = 0;
i < nstrips; ++
i) {
604 if (strips[
i] == cab_code) {
615 int* strips =
nullptr;
618 if (ly >= 2)
return false;
623 strips =
reinterpret_cast<int*
>(
m_pivot);
627 strips =
reinterpret_cast<int*
>(
m_lowPt);
631 strips =
reinterpret_cast<int*
>(
m_highPt);
639 if (*(strips + position) < 0)
return false;
641 code = *(strips + position);
647 short int num)
const {
648 if (Ch1 > Ch2)
return false;
656 map =
reinterpret_cast<int*
>(
m_pivot);
662 map =
reinterpret_cast<int*
>(
m_lowPt);
668 map =
reinterpret_cast<int*
>(
m_highPt);
673 default:
return false;
680 for (
int i = 0;
i < worlo; ++
i) {
681 for (
unsigned short int j = 0; j <
num / 2; ++j) {
682 int pos1 =
i * 2 * maxch +
layer * maxch + Ch1 + j;
683 int pos2 =
i * 2 * maxch +
layer * maxch + Ch2 - j;
684 int tmp = *(map + pos1);
685 *(map + pos1) = *(map + pos2);
694 if (Ch1 +
num - 1 >= Ch2)
return false;
695 for (
int i = 0;
i < worlo; ++
i) {
696 for (
unsigned short int j = 0; j <
num; ++j) {
697 int pos1 =
i * 2 * maxch +
layer * maxch + Ch1 + j;
698 int pos2 =
i * 2 * maxch +
layer * maxch + Ch2 + j;
699 int tmp = *(map + pos1);
700 *(map + pos1) = *(map + pos2);
710 for (
int i = 0;
i < worlo; ++
i) {
711 for (
unsigned short int j = 0; j <
num; ++j) {
712 int pos =
i * 2 * maxch +
layer * maxch + Ch1 + j;
720 for (
int i = 0;
i < worlo; ++
i) {
721 if (
num / abs(
num) == 1) {
722 unsigned short int piv = Ch1 +
num;
724 for (
unsigned short int j = Ch1; j < piv; ++j) {
725 int pos =
i * 2 * maxch +
layer * maxch + j;
729 for (
unsigned short int j = piv; j <= Ch2; ++j) {
730 int pos =
i * 2 * maxch +
layer * maxch + j;
736 if (
num / abs(
num) == -1) {
737 unsigned short int ch = Ch2;
738 short int piv = Ch2 - abs(
num) + 1;
748 int pos =
i * 2 * maxch +
layer * maxch + piv - 1;
753 }
while (piv >
stop);
759 default:
return false;
766 std::list<unsigned int>& StripCodes)
const {
769 if (ijk == 0 || ijk == 1) {
773 int strip_number = CabCode % 100;
774 int rpc_z_index = (CabCode / 100) % 100;
775 int rpc_layer = (CabCode / 10000) % 10;
776 if (deco(this->
id().type(), logic_sector, this->
whichCMAstation(
Pivot), rpc_layer, rpc_z_index, strip_number)) {
777 StripCodes.push_back(deco.
code());
783 if (ijk == 2 || ijk == 3) {
788 int strip_number = CabCode % 100;
789 int rpc_z_index = (CabCode / 100) % 100;
790 int rpc_layer = (CabCode / 10000) % 10;
791 if (deco(this->
id().type(), logic_sector, this->
whichCMAstation(
HighPt), rpc_layer, rpc_z_index, strip_number)) {
792 StripCodes.push_back(deco.
code());
800 int strip_number = CabCode % 100;
801 int rpc_z_index = (CabCode / 100) % 100;
802 int rpc_layer = (CabCode / 10000) % 10;
803 if (deco(this->
id().type(), logic_sector, this->
whichCMAstation(
LowPt), rpc_layer, rpc_z_index, strip_number)) {
804 StripCodes.push_back(deco.
code());
811 if (ijk == 4 || ijk == 5) {
816 int strip_number = CabCode % 100;
817 int rpc_z_index = (CabCode / 100) % 100;
818 int rpc_layer = (CabCode / 10000) % 10;
819 if (deco(this->
id().type(), logic_sector, this->
whichCMAstation(
HighPt), rpc_layer, rpc_z_index, strip_number)) {
820 StripCodes.push_back(deco.
code());
828 int strip_number = CabCode % 100;
829 int rpc_z_index = (CabCode / 100) % 100;
830 int rpc_layer = (CabCode / 10000) % 10;
831 if (deco(this->
id().type(), logic_sector, this->
whichCMAstation(
LowPt), rpc_layer, rpc_z_index, strip_number)) {
832 StripCodes.push_back(deco.
code());
843 int strip_number = CabCode % 100;
844 int rpc_z_index = (CabCode / 100) % 100;
845 int rpc_layer = (CabCode / 10000) % 10;
846 if (deco(this->
id().type(), logic_sector, this->
whichCMAstation(
Pivot), rpc_layer, rpc_z_index, strip_number)) {
847 StripCodes.push_back(deco.
code());
858 if (CabCode != -1)
return ch;
868 if (CabCode != -1)
return ch;
878 if (CabCode != -1)
return ch;
888 if (CabCode != -1)
return ch;
898 if (CabCode != -1)
return ch;
908 if (CabCode != -1)
return ch;
std::string two_obj_error_message(const std::string &, CMAparameters *)
int highPt_start_st() const
int pivotStopChan
RPC chamber to which the RPC strip belongs.
std::string no_confirm_error(int)
int lowPt_station() const
int active_pivot_chs() const
const std::string & name() const
void showMt(char[][90], int, TrigType, int layer) const
int whichCMAstation(CMAinput input) const
int lowPtStation
RPC station number giving input to pivot chs.
int highPt_stop_co() const
int highPt_start_ch() const
int highPtStartCo
Number of connectors giving input to the matrix.
unsigned int first_lowPt_channel() const
int highPt_rpc_read() const
Identifier32::value_type Channel
CMAparameters(const parseParams &parse)
const CMAprogram * lowPt_program() const
unsigned int last_pivot_channel() const
unsigned int m_first_highPt_code
int highPt_stop_ch() const
unsigned int m_first_pivot_code
int lowPtStartCo
RPC chamber to which the RPC strip belongs.
int lowPt_stop_co() const
std::unique_ptr< CMAidentity > m_id
bool get_cabling(CMAinput, int, int, int, unsigned int &) const
const CMAparameters * test(CMAinput, int) const
const CMAidentity & id() const
CMAconfiguration m_conf_type
int pivotStartChan
RPC station number giving input to High Pt ch.
unsigned int last_lowPt_channel() const
int(* m_pivot)[2][pivot_channels]
unsigned int first_lowPt_code() const
int lowPtStopCo
First connector (global-addr) for LowPt confirm.
int active_highPt_chs() const
CablingObject & operator=(const CablingObject &)=default
int pivot_start_st() const
int highPt_number_co() const
bool correct(L1RPCcabCorrection type, CMAinput it, unsigned int layer, unsigned short int Ch1, unsigned short int Ch2, short int num) const
unsigned int m_last_lowPt_code
static constexpr int confirm_channels
int lowPt_start_co() const
int lowPt_start_ch() const
unsigned int code(void) const
int(* m_highPt)[2][confirm_channels]
int lowPtNumCo
Last connector (global-addr) for LowPt confirm.
unsigned int m_first_lowPt_code
unsigned int first_highPt_code() const
void reset_highPt_cabling()
int highPtStation
RPC station number giving input to Low Pt ch.
int pivot_station() const
std::unique_ptr< CMAprogram > m_highPt_program
std::string error_header() const
unsigned int m_last_highPt_code
CMAparameters & operator=(const CMAparameters &)
int(* m_lowPt)[2][confirm_channels]
const CMAprogram * highPt_program() const
void reset_lowPt_cabling()
std::string noMoreChannels(const std::string &stat)
int lowPt_start_st() const
void create_lowPt_map(int)
unsigned int last_lowPt_code() const
std::string no_wor_readout(int, int)
unsigned int first_pivot_channel() const
int highPtNumCo
Last connector (global-addr) for HiPt confirm.
void fill(H5::Group &out_file, size_t iterations)
bool give_connection(int, int, CMAinput &, int &, int &) const
void create_highPt_map(int)
unsigned int last_pivot_code() const
unsigned int last_highPt_channel() const
int highPtStopCo
First connector (global-addr) for HiPt confirm.
int pivot_rpc_read() const
void reset_pivot_cabling()
int lowPt_stop_st() const
CMAinput whichCMAinput(int) const
int lowPt_stop_ch() const
virtual void Print(std::ostream &, bool) const override
int highPt_station() const
unsigned int first_highPt_channel() const
unsigned int m_last_pivot_code
int lowPt_number_co() const
int highPt_stop_st() const
CMAparameters & operator+=(const CMAparameters &)
std::unique_ptr< CMAprogram > m_lowPt_program
int active_lowPt_chs() const
int pivot_start_ch() const
void showDt(std::ostream &, int layer) const
CMAconfiguration conf_type() const
std::string error(const std::string &)
bool get_channel(CMAinput, int, int &, int &) const
static constexpr int pivot_channels
void create_pivot_map(int)
int pivot_stop_ch() const
unsigned int last_highPt_code() const
constexpr int pow(int base, int exp) noexcept
int highPt_start_co() const
int pivot_stop_st() const
const bool * registers(void) const
bool operator==(const CMAparameters &) const
unsigned int first_pivot_code() const
void give_strip_code(unsigned int logic_sector, unsigned short int lh, unsigned short int ijk, unsigned short int Channel, std::list< unsigned int > &StripCodes) const
int lowPt_rpc_read() const