ATLAS Offline Software
InnerDetector
InDetConditions
SCT_ConditionsData
src
SCT_SensorCondData.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
//----------------------------------------------------------------------
6
// Implementation file for the data object class for SCT_SensorsConditionsSvc
7
//----------------------------------------------------------------------
8
9
#include "
SCT_ConditionsData/SCT_SensorCondData.h
"
10
11
//----------------------------------------------------------------------
12
// Constructor
13
SCT_SensorCondData::SCT_SensorCondData
():
14
m_truncatedSerialNumber{0},
15
m_manufacturer{
""
},
16
m_depletionVoltage{0., 0., 0., 0.},
17
m_crystalOrientation{0, 0, 0, 0}
18
{}
19
20
//----------------------------------------------------------------------
21
// Set truncated serial number
22
bool
SCT_SensorCondData::setTruncatedSerialNumber
(
const
CondAttrListCollection::ChanNum
truncatedSerialNumber)
23
{
24
m_truncatedSerialNumber
= truncatedSerialNumber;
25
return
true
;
26
}
27
28
//----------------------------------------------------------------------
29
// Get truncated serial number
30
CondAttrListCollection::ChanNum
SCT_SensorCondData::getTruncatedSerialNumber
()
const
31
{
32
return
m_truncatedSerialNumber
;
33
}
34
35
//----------------------------------------------------------------------
36
// Set manufacturer
37
bool
SCT_SensorCondData::setManufacturer
(
const
std::string& manufacturer)
38
{
39
m_manufacturer
= manufacturer;
40
return
true
;
41
}
42
43
//----------------------------------------------------------------------
44
// Get manufacturer
45
const
std::string&
SCT_SensorCondData::getManufacturer
()
const
46
{
47
return
m_manufacturer
;
48
}
49
50
//----------------------------------------------------------------------
51
// Set depletion voltage
52
bool
SCT_SensorCondData::setDepletionVoltage
(
const
unsigned
int
sensor,
const
float
depletionVoltage)
53
{
54
switch
(sensor) {
55
case
SENSOR1
:
56
m_depletionVoltage
[
SENSOR1
-
OFFSET
] = depletionVoltage;
57
return
true
;
58
case
SENSOR2
:
59
m_depletionVoltage
[
SENSOR2
-
OFFSET
] = depletionVoltage;
60
return
true
;
61
case
SENSOR3
:
62
m_depletionVoltage
[
SENSOR3
-
OFFSET
] = depletionVoltage;
63
return
true
;
64
case
SENSOR4
:
65
m_depletionVoltage
[
SENSOR4
-
OFFSET
] = depletionVoltage;
66
return
true
;
67
default
:
68
return
false
;
69
}
70
}
71
72
//----------------------------------------------------------------------
73
// Get depletion voltage
74
float
SCT_SensorCondData::getDepletionVoltage
(
const
unsigned
int
sensor)
const
75
{
76
switch
(sensor) {
77
case
SENSOR1
:
78
return
m_depletionVoltage
[
SENSOR1
-
OFFSET
];
79
case
SENSOR2
:
80
return
m_depletionVoltage
[
SENSOR2
-
OFFSET
];
81
case
SENSOR3
:
82
return
m_depletionVoltage
[
SENSOR3
-
OFFSET
];
83
case
SENSOR4
:
84
return
m_depletionVoltage
[
SENSOR4
-
OFFSET
];
85
default
:
86
return
-999.;
87
}
88
}
89
90
//----------------------------------------------------------------------
91
// Set crystal Orientation
92
bool
SCT_SensorCondData::setCrystalOrientation
(
const
unsigned
int
sensor,
const
int
crystalOrientation)
93
{
94
switch
(sensor) {
95
case
SENSOR1
:
96
m_crystalOrientation
[
SENSOR1
-
OFFSET
] = crystalOrientation;
97
return
true
;
98
case
SENSOR2
:
99
m_crystalOrientation
[
SENSOR2
-
OFFSET
] = crystalOrientation;
100
return
true
;
101
case
SENSOR3
:
102
m_crystalOrientation
[
SENSOR3
-
OFFSET
] = crystalOrientation;
103
return
true
;
104
case
SENSOR4
:
105
m_crystalOrientation
[
SENSOR4
-
OFFSET
] = crystalOrientation;
106
return
true
;
107
default
:
108
return
false
;
109
}
110
}
111
112
//----------------------------------------------------------------------
113
// Get crystal Orientation
114
int
SCT_SensorCondData::getCrystalOrientation
(
const
unsigned
int
sensor)
const
115
{
116
switch
(sensor) {
117
case
SENSOR1
:
118
return
m_crystalOrientation
[
SENSOR1
-
OFFSET
];
119
case
SENSOR2
:
120
return
m_crystalOrientation
[
SENSOR2
-
OFFSET
];
121
case
SENSOR3
:
122
return
m_crystalOrientation
[
SENSOR3
-
OFFSET
];
123
case
SENSOR4
:
124
return
m_crystalOrientation
[
SENSOR4
-
OFFSET
];
125
default
:
126
return
-999;
127
}
128
}
SCT_SensorCondData::SENSOR3
@ SENSOR3
Definition:
SCT_SensorCondData.h:52
SCT_SensorCondData::SENSOR1
@ SENSOR1
Definition:
SCT_SensorCondData.h:52
SCT_SensorCondData::setCrystalOrientation
bool setCrystalOrientation(const unsigned int sensor, const int crystalOrientation)
Set depletion voltage.
Definition:
SCT_SensorCondData.cxx:92
SCT_SensorCondData::setDepletionVoltage
bool setDepletionVoltage(const unsigned int sensor, const float depletionVoltage)
Set depletion voltage.
Definition:
SCT_SensorCondData.cxx:52
SCT_SensorCondData::SCT_SensorCondData
SCT_SensorCondData()
Constructor.
Definition:
SCT_SensorCondData.cxx:13
SCT_SensorCondData::SENSOR2
@ SENSOR2
Definition:
SCT_SensorCondData.h:52
SCT_SensorCondData::getManufacturer
const std::string & getManufacturer() const
Get manufacturer.
Definition:
SCT_SensorCondData.cxx:45
CondAttrListCollection::ChanNum
unsigned int ChanNum
Definition:
CondAttrListCollection.h:55
SCT_SensorCondData.h
header file for data object for SCT_SensorsCondAlg and SCT_SensorsTool.
SCT_SensorCondData::m_truncatedSerialNumber
CondAttrListCollection::ChanNum m_truncatedSerialNumber
Definition:
SCT_SensorCondData.h:55
SCT_SensorCondData::setManufacturer
bool setManufacturer(const std::string &manufacturer)
Set manufacturer.
Definition:
SCT_SensorCondData.cxx:37
SCT_SensorCondData::OFFSET
@ OFFSET
Definition:
SCT_SensorCondData.h:52
SCT_SensorCondData::getDepletionVoltage
float getDepletionVoltage(const unsigned int sensor) const
Get depletion voltage.
Definition:
SCT_SensorCondData.cxx:74
SCT_SensorCondData::SENSOR4
@ SENSOR4
Definition:
SCT_SensorCondData.h:52
SCT_SensorCondData::m_crystalOrientation
int m_crystalOrientation[NUM_SENSORS]
Definition:
SCT_SensorCondData.h:58
SCT_SensorCondData::m_depletionVoltage
float m_depletionVoltage[NUM_SENSORS]
Definition:
SCT_SensorCondData.h:57
SCT_SensorCondData::setTruncatedSerialNumber
bool setTruncatedSerialNumber(const CondAttrListCollection::ChanNum truncatedSerialNumber)
Set truncated serial number.
Definition:
SCT_SensorCondData.cxx:22
SCT_SensorCondData::getCrystalOrientation
int getCrystalOrientation(const unsigned int sensor) const
Get depletion voltage.
Definition:
SCT_SensorCondData.cxx:114
SCT_SensorCondData::m_manufacturer
std::string m_manufacturer
Definition:
SCT_SensorCondData.h:56
SCT_SensorCondData::getTruncatedSerialNumber
CondAttrListCollection::ChanNum getTruncatedSerialNumber() const
Get truncated serial number.
Definition:
SCT_SensorCondData.cxx:30
Generated on Thu Nov 7 2024 21:25:36 for ATLAS Offline Software by
1.8.18