ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
TileCalorimeter
TileEvent
src
TileRawData.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
//*****************************************************************************
6
// Filename : TileRawData.cxx
7
// Author : Alexandre Solodkov
8
// Created : Oct, 2002
9
//
10
// DESCRIPTION:
11
// Implementation comments only. Class level comments go in .h file.
12
//
13
// HISTORY:
14
// 02Oct02: Created
15
//
16
// BUGS:
17
//
18
//
19
//
20
//*****************************************************************************
21
22
#include "
TileEvent/TileRawData.h
"
23
#include "
TileConditions/TileCablingService.h
"
24
25
#include "
TileIdentifier/TileHWID.h
"
26
27
#include <iostream>
28
#include <sstream>
29
#include <iomanip>
30
31
// get cabling
32
namespace
{
33
const
TileCablingService
*
const
s_cabling =
TileCablingService::getInstance
();
34
}
35
36
TileRawData::TileRawData
(
const
Identifier
&
id
)
37
:
m_adc_hwid
(s_cabling->s2h_adc_id(id))
38
{
39
}
40
41
void
TileRawData::print
()
const
42
{
43
std::cout << (std::string) (*
this
) << std::endl;
44
}
45
46
TileRawData::operator std::string()
const
47
{
48
std::string result(
whoami
());
49
result +=
" Id = "
+ s_cabling->getTileHWID()->to_string(
m_adc_hwid
);
50
return
result;
51
}
52
53
Identifier
TileRawData::adc_ID
(
void
)
const
{
54
return
s_cabling->h2s_adc_id(
m_adc_hwid
);
55
}
56
57
Identifier
TileRawData::pmt_ID
(
void
)
const
{
58
return
s_cabling->h2s_pmt_id(
m_adc_hwid
);
59
}
60
61
Identifier
TileRawData::cell_ID
(
void
)
const
{
62
return
s_cabling->h2s_cell_id(
m_adc_hwid
);
63
}
64
65
Identifier
TileRawData::cell_ID_index
(
int
&
index
,
int
& pmt)
const
{
66
return
s_cabling->h2s_cell_id_index(
m_adc_hwid
,
index
, pmt);
67
}
68
69
Identifier
TileRawData::tt_ID
(
void
)
const
{
70
return
s_cabling->pmt2tt_id(
adc_ID
());
71
}
72
73
Identifier
TileRawData::mt_ID
(
void
)
const
{
74
return
s_cabling->pmt2mt_id(
adc_ID
());
75
}
76
77
int
TileRawData::frag_ID
(
void
)
const
{
78
return
s_cabling->frag(
m_adc_hwid
);
79
}
80
81
void
TileRawData::print_to_stream
(
const
std::vector<float>& val,
82
const
std::string &
label
,
83
std::ostringstream & text)
84
{
85
text <<
label
;
86
for
(
float
v : val) {
87
text <<
" "
<< v;
88
}
89
}
90
91
92
void
TileRawData::print_to_stream
(
const
std::vector<double>& val,
93
const
std::string &
label
,
94
std::ostringstream & text)
95
{
96
text <<
label
;
97
for
(
double
v : val) {
98
text <<
" "
<< v;
99
}
100
}
101
102
void
TileRawData::print_to_stream
(
const
std::vector<uint32_t>& val,
103
const
std::string &
label
,
104
std::ostringstream & text)
105
{
106
text <<
label
;
107
for
(uint32_t v : val) {
108
text <<
" "
<< v;
109
}
110
}
111
TileCablingService.h
TileHWID.h
TileRawData.h
TileCablingService
Definition
TileCablingService.h:23
TileCablingService::getInstance
static const TileCablingService * getInstance()
get pointer to service instance
Definition
TileCablingService.cxx:24
TileRawData::cell_ID_index
Identifier cell_ID_index(int &index, int &pmt) const
Definition
TileRawData.cxx:65
TileRawData::mt_ID
Identifier mt_ID(void) const
Definition
TileRawData.cxx:73
TileRawData::pmt_ID
Identifier pmt_ID(void) const
Definition
TileRawData.cxx:57
TileRawData::adc_ID
Identifier adc_ID(void) const
Definition
TileRawData.cxx:53
TileRawData::whoami
virtual std::string whoami(void) const
Definition
TileRawData.h:63
TileRawData::TileRawData
TileRawData()
Definition
TileRawData.h:38
TileRawData::frag_ID
int frag_ID(void) const
Definition
TileRawData.cxx:77
TileRawData::cell_ID
Identifier cell_ID(void) const
Definition
TileRawData.cxx:61
TileRawData::print
virtual void print(void) const
Definition
TileRawData.cxx:41
TileRawData::m_adc_hwid
HWIdentifier m_adc_hwid
Definition
TileRawData.h:82
TileRawData::print_to_stream
static void print_to_stream(const std::vector< float > &val, const std::string &label, std::ostringstream &text)
Definition
TileRawData.cxx:81
TileRawData::tt_ID
Identifier tt_ID(void) const
Definition
TileRawData.cxx:69
label
std::string label(const std::string &format, int i)
Definition
label.h:19
Identifier
Definition
IdentifierFieldParser.cxx:14
index
Definition
index.py:1
Generated on
for ATLAS Offline Software by
1.17.0