Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-06 08:19:17

0001 #include "InttDeadMapv1.h"
0002 
0003 #include <g4detectors/PHG4CellDefs.h>  // for keytype
0004 
0005 #include <iostream>
0006 #include <map>  // for _Rb_tree_const_iterator
0007 
0008 const InttDeadMapv1::Map&
0009 InttDeadMapv1::getDeadChannels() const
0010 {
0011   return m_DeadChannels;
0012 }
0013 
0014 InttDeadMapv1::Map&
0015 InttDeadMapv1::getDeadChannels()
0016 {
0017   return m_DeadChannels;
0018 }
0019 
0020 void InttDeadMapv1::addDeadChannel(PHG4CellDefs::keytype key)
0021 {
0022   m_DeadChannels.insert(key);
0023 }
0024 
0025 bool InttDeadMapv1::isDeadChannel(PHG4CellDefs::keytype key) const
0026 {
0027   auto it = m_DeadChannels.find(key);
0028   if (it != m_DeadChannels.end())
0029   {
0030     return true;
0031   }
0032   return false;
0033 }
0034 
0035 int InttDeadMapv1::isValid() const
0036 {
0037   return size() > 0;
0038 }
0039 
0040 void InttDeadMapv1::Reset()
0041 {
0042   m_DeadChannels.clear();
0043 }
0044 
0045 void InttDeadMapv1::identify(std::ostream& os) const
0046 {
0047   os << "InttDeadMapv1, number of dead channel & sensors: " << size() << std::endl;
0048 }