10#include <klm/dataobjects/KLMChannelArrayIndex.h>
13#include <framework/logging/Logger.h>
21int main(
int argc,
char* argv[])
24 if (argc == 1 or std::string(argv[1]) ==
"--help" or std::string(argv[1]) ==
"-h") {
25 std::cout <<
"Usage: " << argv[0] <<
" [CHANNEL1] [CHANNEL2] ... [CHANNELN]\n\n"
26 " This tool converts the given channel numbers into the corresponding channel indexes.\n"
27 " A basf2 FATAL message is printed if a channel number does not exist.\n";
31 int nChannels = argc - 1;
34 B2ERROR(
"There are no channels to convert.");
39 for (
int i = 1; i <= nChannels; ++i) {
41 uint16_t index = channelArrayIndex->
getIndex(number);
42 B2INFO(
"Channel number: " << number <<
" ==> Channel index: " << index);
static const KLMChannelArrayIndex & Instance()
Instantiation.
uint16_t getIndex(uint16_t number) const
Get element index.
uint16_t KLMChannelNumber
Channel number.
Abstract base class for different kinds of events.