ATLAS Offline Software
Loading...
Searching...
No Matches
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
11
12#include <iostream>
13
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
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
29
31 if (this != &parameters) {
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
40unsigned 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
45bool 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
54void 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}
unsigned short int m_feet_thresholds
unsigned short int m_cma_mask
bool set_feet_threshold(unsigned short int it, unsigned short int th)
void Print(std::ostream &stream) const
unsigned short int feet_threshold(unsigned short int it) const
RPCPadParameters & operator=(const RPCPadParameters &)