ATLAS Offline Software
Loading...
Searching...
No Matches
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
10
11//----------------------------------------------------------------------
12// Constructor
19
20//----------------------------------------------------------------------
21// Set truncated serial number
23{
24 m_truncatedSerialNumber = truncatedSerialNumber;
25 return true;
26}
27
28//----------------------------------------------------------------------
29// Get truncated serial number
34
35//----------------------------------------------------------------------
36// Set manufacturer
37bool SCT_SensorCondData::setManufacturer(const std::string& manufacturer)
38{
39 m_manufacturer = manufacturer;
40 return true;
41}
42
43//----------------------------------------------------------------------
44// Get manufacturer
45const std::string& SCT_SensorCondData::getManufacturer() const
46{
47 return m_manufacturer;
48}
49
50//----------------------------------------------------------------------
51// Set depletion voltage
52bool 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
74float SCT_SensorCondData::getDepletionVoltage(const unsigned int sensor) const
75{
76 switch (sensor) {
77 case SENSOR1:
79 case SENSOR2:
81 case SENSOR3:
83 case SENSOR4:
85 default:
86 return -999.;
87 }
88}
89
90//----------------------------------------------------------------------
91// Set crystal Orientation
92bool 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
114int SCT_SensorCondData::getCrystalOrientation(const unsigned int sensor) const
115{
116 switch (sensor) {
117 case SENSOR1:
119 case SENSOR2:
121 case SENSOR3:
123 case SENSOR4:
125 default:
126 return -999;
127 }
128}
header file for data object for SCT_SensorsCondAlg and SCT_SensorsTool.
int m_crystalOrientation[NUM_SENSORS]
int getCrystalOrientation(const unsigned int sensor) const
Get depletion voltage.
const std::string & getManufacturer() const
Get manufacturer.
bool setTruncatedSerialNumber(const CondAttrListCollection::ChanNum truncatedSerialNumber)
Set truncated serial number.
SCT_SensorCondData()
Constructor.
CondAttrListCollection::ChanNum getTruncatedSerialNumber() const
Get truncated serial number.
CondAttrListCollection::ChanNum m_truncatedSerialNumber
bool setDepletionVoltage(const unsigned int sensor, const float depletionVoltage)
Set depletion voltage.
float m_depletionVoltage[NUM_SENSORS]
float getDepletionVoltage(const unsigned int sensor) const
Get depletion voltage.
bool setManufacturer(const std::string &manufacturer)
Set manufacturer.
bool setCrystalOrientation(const unsigned int sensor, const int crystalOrientation)
Set depletion voltage.