ATLAS Offline Software
Loading...
Searching...
No Matches
MuonSpectrometer
MuonConditions
MuonCondCabling
RPC_CondCabling
src
RPCPadParameters.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
/***************************************************************************
6
RPCPadParameters
7
-----------------------------------------
8
***************************************************************************/
9
10
#include "
RPC_CondCabling/RPCPadParameters.h
"
11
12
#include <iostream>
13
14
RPCPadParameters::RPCPadParameters
() {
15
m_eta_and_phi
=
true
;
16
m_feet_on
=
false
;
17
m_cma_mask
= 0x0;
// no mask
18
m_feet_thresholds
= 0x88;
19
}
20
21
RPCPadParameters::RPCPadParameters
(
const
RPCPadParameters
& parameters) {
22
m_eta_and_phi
= parameters.eta_and_phi();
23
m_feet_on
= parameters.feet_on();
24
m_feet_thresholds
= parameters.feet_thresholds();
25
m_cma_mask
= parameters.cma_mask();
26
}
27
28
RPCPadParameters::~RPCPadParameters
() {}
29
30
RPCPadParameters
&
RPCPadParameters::operator=
(
const
RPCPadParameters
& parameters) {
31
if
(
this
!= ¶meters) {
32
m_eta_and_phi
= parameters.eta_and_phi();
33
m_feet_on
= parameters.feet_on();
34
m_feet_thresholds
= parameters.feet_thresholds();
35
m_cma_mask
= parameters.cma_mask();
36
}
37
return
*
this
;
38
}
39
40
unsigned
short
int
RPCPadParameters::feet_threshold
(
unsigned
short
int
it)
const
{
41
if
(it >= 3)
return
0;
42
return
(0x7 & (
m_feet_thresholds
>> (3 * it)));
43
}
44
45
bool
RPCPadParameters::set_feet_threshold
(
unsigned
short
int
it,
unsigned
short
int
th) {
46
static
const
short
int
mask[3] = {0x1F8, 0x1c7, 0x3F};
47
48
if
(it >= 3 || th >= 6)
return
false
;
49
50
m_feet_thresholds
= (
m_feet_thresholds
& mask[it]) + (th << (3 * it));
51
return
true
;
52
}
53
54
void
RPCPadParameters::Print
(std::ostream& stream)
const
{
55
stream <<
"Pad Parameters : "
56
<<
" eta_and_phi = "
<<
m_eta_and_phi
<<
" cma_mask = "
<<
m_cma_mask
<<
" feet_on = "
<<
m_feet_on
;
57
if
(
m_feet_on
) stream <<
" feet_thresholds = "
<<
feet_threshold
(0) <<
" "
<<
feet_threshold
(1) <<
" "
<<
feet_threshold
(2);
58
stream << std::endl;
59
}
RPCPadParameters.h
RPCPadParameters::m_eta_and_phi
bool m_eta_and_phi
Definition
RPCPadParameters.h:19
RPCPadParameters::m_feet_thresholds
unsigned short int m_feet_thresholds
Definition
RPCPadParameters.h:20
RPCPadParameters::m_cma_mask
unsigned short int m_cma_mask
Definition
RPCPadParameters.h:21
RPCPadParameters::set_feet_threshold
bool set_feet_threshold(unsigned short int it, unsigned short int th)
Definition
RPCPadParameters.cxx:45
RPCPadParameters::RPCPadParameters
RPCPadParameters()
Definition
RPCPadParameters.cxx:14
RPCPadParameters::Print
void Print(std::ostream &stream) const
Definition
RPCPadParameters.cxx:54
RPCPadParameters::feet_threshold
unsigned short int feet_threshold(unsigned short int it) const
Definition
RPCPadParameters.cxx:40
RPCPadParameters::operator=
RPCPadParameters & operator=(const RPCPadParameters &)
Definition
RPCPadParameters.cxx:30
RPCPadParameters::m_feet_on
bool m_feet_on
Definition
RPCPadParameters.h:18
RPCPadParameters::~RPCPadParameters
~RPCPadParameters()
Definition
RPCPadParameters.cxx:28
Generated on
for ATLAS Offline Software by
1.14.0