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 indexes into the corresponding channel numbers.\n"
27 " A basf2 FATAL message is printed if a channel index 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) {
40 uint16_t index = std::atoi(argv[i]);
42 B2INFO(
"Channel index: " << index <<
" ==> Channel number: " << number);
static const KLMChannelArrayIndex & Instance()
Instantiation.
uint16_t getNumber(uint16_t index) const
Get element number.
uint16_t KLMChannelNumber
Channel number.
Abstract base class for different kinds of events.