KLM channel map.
More...
#include <KLMChannelMapValue.h>
template<class T>
class Belle2::KLMChannelMapValue< T >
KLM channel map.
Definition at line 33 of file KLMChannelMapValue.h.
◆ KLMChannelMapValue()
◆ ~KLMChannelMapValue()
◆ getChannelData()
Get channel data.
- Parameters
-
[in] | channel | Channel number. |
Definition at line 55 of file KLMChannelMapValue.h.
56 {
57 typename std::map<KLMChannelNumber, T>::const_iterator it;
58 it = m_ChannelData.find(channel);
59 if (it == m_ChannelData.end()) {
60 B2ERROR("No data for KLM channel in map." <<
61 LogVar("Channel number", channel));
62 }
63 return it->second;
64 }
◆ setChannelData()
Set channel data.
- Parameters
-
[in] | channel | Channel number. |
[in] | data | Data. |
Definition at line 71 of file KLMChannelMapValue.h.
72 {
73 typename std::map<KLMChannelNumber, T>::iterator it;
74 it = m_ChannelData.find(channel);
75 if (it == m_ChannelData.end()) {
76 m_ChannelData.insert(std::pair<KLMChannelNumber, T>(channel, data));
77 } else {
78 it->second = data;
79 }
80 }
◆ setDataAllChannels()
template<class T>
void setDataAllChannels |
( |
const T | data | ) |
|
|
inline |
Set data for all channels.
- Parameters
-
Definition at line 86 of file KLMChannelMapValue.h.
87 {
88 KLMChannelIndex klmChannels;
89 for (KLMChannelIndex& klmChannel : klmChannels)
90 setChannelData(klmChannel.getKLMChannelNumber(), data);
91 }
◆ m_ChannelData
The documentation for this class was generated from the following file: