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
InttMaskedChannelSet.cc
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file InttMaskedChannelSet.cc
1
#include "
InttMaskedChannelSet.h
"
2
3
#include <
cdbobjects/CDBTTree.h
>
4
5
#include <
ffamodules/CDBInterface.h
>
6
7
#include <filesystem>
// for exists
8
9
void
InttMaskedChannelSet::identify
(
10
std::ostream&
out
)
const
11
{
12
out <<
"InttMaskedChannelSet"
13
<<
"\n"
14
<<
"\tBase Version"
15
<<
"\n"
16
<<
"\tUnimplemented"
<< std::endl;
17
}
18
19
std::size_t
InttMaskedChannelSet::size
()
const
20
{
21
return
0;
22
}
23
24
int
InttMaskedChannelSet::LoadFromFile
(
25
std::string
const
&
filename
)
26
{
27
if
(filename.empty())
28
{
29
std::cout <<
"int InttMaskedChannelSet::LoadFromFile(std::string const& filename)"
<< std::endl;
30
std::cout <<
"\tArgument 'filename' is empty string"
<< std::endl;
31
return
1;
32
}
33
34
if
(!
std::filesystem::exists
(filename))
35
{
36
std::cout <<
"int InttMaskedChannelSet::LoadFromFile(std::string const& filename)"
<< std::endl;
37
std::cout <<
"\tFile '"
<< filename <<
"' does not exist"
<< std::endl;
38
return
1;
39
}
40
41
CDBTTree
cdbttree(filename);
42
cdbttree.
LoadCalibrations
();
43
44
return
v_LoadFromCDBTTree
(cdbttree);
45
}
46
47
int
InttMaskedChannelSet::LoadFromCDB
(
48
std::string
const
&
name
)
49
{
50
if
(name.empty())
51
{
52
std::cout <<
"int InttMaskedChannelSet::LoadFromCDB(std::string const& name)"
<< std::endl;
53
std::cout <<
"\tArgument 'name' is empty string"
<< std::endl;
54
return
1;
55
}
56
57
std::string
database =
CDBInterface::instance
()->
getUrl
(name);
58
CDBTTree
cdbttree(database);
59
cdbttree.
LoadCalibrations
();
60
61
return
v_LoadFromCDBTTree
(cdbttree);
62
}
63
64
bool
InttMaskedChannelSet::IsDeadChannel
(
65
int
const
&
layer
,
66
int
const
& ladder_phi,
67
int
const
& ladder_z,
68
int
const
& strip_z,
69
int
const
& strip_phi)
const
70
{
71
return
IsDeadChannel
((
InttMap::Offline_s
){
72
.layer =
layer
,
73
.ladder_phi = ladder_phi,
74
.ladder_z = ladder_z,
75
.strip_phi = strip_phi,
76
.strip_z = strip_z,
77
});
78
}
79
80
bool
InttMaskedChannelSet::IsDeadChannel
(
81
InttMap::Offline_s
const
&
82
/*unused*/
)
const
83
{
84
return
false
;
85
}
86
87
int
InttMaskedChannelSet::v_LoadFromCDBTTree
(
88
CDBTTree
&
89
/*unused*/
)
90
{
91
return
0;
92
}
coresoftware
blob
master
offline
packages
intt
InttMaskedChannelSet.cc
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:06
using
1.8.2 with
sPHENIX GitHub integration