Analysis Software
Documentation for sPHENIX simulation software
 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
2 
3 #include <cdbobjects/CDBTTree.h>
4 
5 #include <string>
6 
8 {
9  delete m_HotChannelSet;
10 }
11 
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 
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 
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 }