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
RawTowerDeadMapv1.cc
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file RawTowerDeadMapv1.cc
1
#include "
RawTowerDeadMapv1.h
"
2
3
#include <cstdlib>
4
#include <iostream>
5
#include <map>
6
7
using namespace
std;
8
9
const
RawTowerDeadMapv1::Map
&
10
RawTowerDeadMapv1::getDeadTowers
()
const
11
{
12
return
m_DeadTowers;
13
}
14
15
RawTowerDeadMapv1::Map
&
16
RawTowerDeadMapv1::getDeadTowers
()
17
{
18
return
m_DeadTowers;
19
}
20
21
void
RawTowerDeadMapv1::addDeadTower
(
const
unsigned
int
ieta,
const
int
unsigned
iphi)
22
{
23
RawTowerDefs::keytype
key =
RawTowerDefs::encode_towerid
(_caloid, ieta, iphi);
24
m_DeadTowers.insert(key);
25
}
26
27
void
RawTowerDeadMapv1::addDeadTower
(
RawTowerDefs::keytype
key)
28
{
29
if
(
RawTowerDefs::decode_caloid
(key) != _caloid)
30
{
31
cout <<
"RawTowerDeadMapv1::addDeadTower - Error - adding tower to wrong container! Container CaloID = "
32
<< _caloid <<
", requested CaloID = "
<<
RawTowerDefs::decode_caloid
(key) <<
" based on key "
<< key << endl;
33
exit(2);
34
}
35
m_DeadTowers.insert(key);
36
}
37
38
bool
RawTowerDeadMapv1::isDeadTower
(
RawTowerDefs::keytype
key)
39
{
40
auto
it
= m_DeadTowers.find(key);
41
if
(
it
!= m_DeadTowers.end())
42
{
43
return
true
;
44
}
45
return
false
;
46
}
47
48
bool
RawTowerDeadMapv1::isDeadTower
(
const
unsigned
int
ieta,
const
unsigned
int
iphi)
49
{
50
RawTowerDefs::keytype
key =
RawTowerDefs::encode_towerid
(_caloid, ieta, iphi);
51
return
isDeadTower(key);
52
}
53
54
int
RawTowerDeadMapv1::isValid
()
const
55
{
56
return
size
() > 0;
57
}
58
59
void
RawTowerDeadMapv1::Reset
()
60
{
61
m_DeadTowers.clear();
62
}
63
64
void
RawTowerDeadMapv1::identify
(std::ostream&
os
)
const
65
{
66
os <<
"RawTowerDeadMapv1, number of towers: "
<<
size
() << std::endl;
67
}
coresoftware
blob
master
offline
packages
CaloBase
RawTowerDeadMapv1.cc
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:05
using
1.8.2 with
sPHENIX GitHub integration