ATLAS Offline Software
Loading...
Searching...
No Matches
TileCondIdTransforms.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
5// Athena includes
7
8// Calo includes
10
11// Tile includes
15
16
17//
18//____________________________________________________________________
19static const InterfaceID IID_TileCondIdTransforms("TileCondIdTransforms", 1, 0);
20
23}
24
25//
26//_____________________________________________________________________________
27TileCondIdTransforms::TileCondIdTransforms(const std::string& type, const std::string& name,
28 const IInterface* parent)
29 : AthAlgTool(type, name, parent)
30 , m_tileHWID(nullptr)
31 , m_tileID(nullptr)
32{
33 declareInterface<TileCondIdTransforms>(this);
34}
35
36//
37//_____________________________________________________________________________
39
40 ATH_MSG_DEBUG( "in initialize()" );
41
42 //=== TileHWID
43 CHECK( detStore()->retrieve(m_tileHWID) );
44
45 //=== TileID
46 CHECK( detStore()->retrieve(m_tileID) );
47
48 return StatusCode::SUCCESS;
49}
50
51//
52//_____________________________________________________________________________
54 ATH_MSG_DEBUG( "finalize called" );
55 return StatusCode::SUCCESS;
56}
57
58//
59//_____________________________________________________________________________
61 , unsigned int& ros
62 , unsigned int& drawer
63 , unsigned int& channel
64 , unsigned int& adc) const {
65
66 ros = m_tileHWID->ros(hwid);
67 drawer = m_tileHWID->drawer(hwid);
68 channel = m_tileHWID->channel(hwid);
69 adc = m_tileHWID->adc(hwid);
70}
71
72//
73//_____________________________________________________________________________
75 , unsigned int& drawerIdx
76 , unsigned int& channel
77 , unsigned int& adc) const {
78
79 unsigned int ros = m_tileHWID->ros(hwid);
80 unsigned int drawer = m_tileHWID->drawer(hwid);
81 drawerIdx = TileCalibUtils::getDrawerIdx(ros, drawer);
82 channel = m_tileHWID->channel(hwid);
83 adc = m_tileHWID->adc(hwid);
84}
85
86//
87//_____________________________________________________________________________
89 , unsigned int& drawerIdx
90 , unsigned int& channel) const {
91
92 unsigned int ros = m_tileHWID->ros(hwid);
93 unsigned int drawer = m_tileHWID->drawer(hwid);
94 drawerIdx = TileCalibUtils::getDrawerIdx(ros, drawer);
95 channel = m_tileHWID->channel(hwid);
96}
97
98//
99//_____________________________________________________________________________
101 , unsigned int& drawerIdx
102 , unsigned int& channel) const {
103
104 if (hash_id < m_tileHWID->channel_hash_max()) {
105 HWIdentifier hwid = m_tileHWID->channel_id(hash_id);
106 unsigned int ros = m_tileHWID->ros(hwid);
107 unsigned int drawer = m_tileHWID->drawer(hwid);
108 drawerIdx = TileCalibUtils::getDrawerIdx(ros, drawer);
109 channel = m_tileHWID->channel(hwid);
110 } else {
111 drawerIdx = 0;
112 channel = 0;
113 }
114
115}
116
#define ATH_MSG_DEBUG(x)
Helpers for checking error return status codes and reporting errors.
#define CHECK(...)
Evaluate an expression and check for errors.
static const InterfaceID IID_TileCondIdTransforms("TileCondIdTransforms", 1, 0)
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
const ServiceHandle< StoreGateSvc > & detStore() const
This is a "hash" representation of an Identifier.
static unsigned int getDrawerIdx(unsigned int ros, unsigned int drawer)
Returns a drawer hash.
static const InterfaceID & interfaceID()
const TileHWID * m_tileHWID
void getIndices(const HWIdentifier &hwid, unsigned int &ros, unsigned int &drawer, unsigned int &channel, unsigned int &adc) const
TileCondIdTransforms(const std::string &type, const std::string &name, const IInterface *parent)