Analysis Software
Documentation for
sPHENIX
simulation software
Home page
Related Pages
Modules
Namespaces
Classes
Files
Examples
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
InttMaskedChannelSetv1.cc
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file InttMaskedChannelSetv1.cc
1
#include "
InttMaskedChannelSetv1.h
"
2
3
#include <
cdbobjects/CDBTTree.h
>
4
5
#include <string>
6
7
InttMaskedChannelSetv1::~InttMaskedChannelSetv1
()
8
{
9
delete
m_HotChannelSet
;
10
}
11
12
void
InttMaskedChannelSetv1::identify
(
13
std::ostream&
out
)
const
14
{
15
out <<
"InttMaskedChannelSetv1"
16
<<
"\n"
17
<<
"\tsize: "
<<
size
() << std::endl;
18
}
19
20
std::size_t
InttMaskedChannelSetv1::size
()
const
21
{
22
if
(!
m_HotChannelSet
)
23
{
24
return
0;
25
}
26
return
m_HotChannelSet
->size();
27
}
28
29
int
InttMaskedChannelSetv1::v_LoadFromCDBTTree
(
30
CDBTTree
& cdbttree)
31
{
32
if
(!
m_HotChannelSet
)
33
{
34
m_HotChannelSet
=
new
Set_t
;
35
}
36
37
m_HotChannelSet
->clear();
38
Long64_t
N
= cdbttree.
GetSingleIntValue
(
"size"
);
39
for
(Long64_t
n
= 0;
n
<
N
; ++
n
)
40
{
41
m_HotChannelSet
->insert((
struct
InttMap::Offline_s
){
42
.layer = cdbttree.
GetIntValue
(
n
,
"layer"
),
43
.ladder_phi = cdbttree.
GetIntValue
(
n
,
"ladder_phi"
),
44
.ladder_z = cdbttree.
GetIntValue
(
n
,
"ladder_z"
),
45
.strip_phi = cdbttree.
GetIntValue
(
n
,
"strip_phi"
),
46
.strip_z = cdbttree.
GetIntValue
(
n
,
"strip_z"
),
47
});
48
}
49
50
return
0;
51
}
52
53
bool
InttMaskedChannelSetv1::IsDeadChannel
(
54
InttMap::Offline_s
const
& ofl)
const
55
{
56
if
(!
m_HotChannelSet
)
57
{
58
return
false
;
59
}
60
return
m_HotChannelSet
->find(ofl) !=
m_HotChannelSet
->end();
61
}
coresoftware
blob
master
offline
packages
intt
InttMaskedChannelSetv1.cc
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:06
using
1.8.2 with
sPHENIX GitHub integration