10#include <klm/dbobjects/KLMChannelStatus.h>
13#include <klm/dataobjects/KLMChannelIndex.h>
14#include <klm/dataobjects/KLMElementNumbers.h>
17#include <framework/logging/Logger.h>
31 std::map<KLMChannelNumber, enum ChannelStatus>::const_iterator it;
41 std::map<KLMChannelNumber, enum ChannelStatus>::iterator it;
45 std::pair<KLMChannelNumber, enum ChannelStatus>(channel, status));
61 int subdetector, section, sector, layer;
65 module, &subdetector, §ion, §or, &layer);
69 KLMChannelIndex klmModuleTemp(subdetector, section, sector, layer, 0, 1);
70 klmModule = klmModuleTemp;
78 for (; klmChannel != klmNextModule; ++klmChannel) {
82 B2FATAL(
"Incomplete KLM channel data.");
93 std::map<KLMChannelNumber, enum ChannelStatus>::iterator it, it2;
95 it2 = status.m_ChannelStatus.begin();
97 if (it->first != it2->first)
99 if (it->second != it2->second)
109 unsigned int channels = 0;
112 std::map<KLMChannelNumber, enum ChannelStatus>::iterator it, it2;
114 it2 = status.m_ChannelStatus.begin();
116 if (it->first != it2->first)
@ c_IndexLevelLayer
Layer.
@ c_IndexLevelStrip
Strip.
KLMChannelNumber getKLMChannelNumber() const
Get KLM channel number.
void setIndexLevel(enum IndexLevel indexLevel)
Set index level.
void setChannelStatus(KLMChannelNumber channel, enum ChannelStatus status)
Set channel status.
enum ChannelStatus getChannelStatus(KLMChannelNumber channel) const
Get channel status.
void setStatusAllChannels(enum ChannelStatus status)
Set status for all channels.
int getActiveStripsInModule(KLMChannelNumber module) const
Get number of active strips in the specified KLM module.
bool operator==(KLMChannelStatus &status)
Operator ==.
std::map< KLMChannelNumber, enum ChannelStatus > m_ChannelStatus
Channel data.
KLMChannelStatus()
Constructor.
ChannelStatus
Channel status.
@ c_Normal
Normally operating channel.
@ c_Dead
Dead channel (no signal).
@ c_Unknown
Unknown status (no data).
unsigned int newNormalChannels(KLMChannelStatus &status)
Number of new channels with status c_Normal that have a different status in another channel-status da...
~KLMChannelStatus()
Destructor.
static const KLMElementNumbers & Instance()
Instantiation.
void moduleNumberToElementNumbers(KLMModuleNumber module, int *subdetector, int *section, int *sector, int *layer) const
Get element numbers by module number.
uint16_t KLMChannelNumber
Channel number.
Abstract base class for different kinds of events.