Project
Loading...
Searching...
No Matches
testMapper.cxx File Reference
#include <boost/test/unit_test.hpp>
#include <fmt/format.h>
#include <DataFormatsEMCAL/Constants.h>
#include "EMCALBase/Mapper.h"
#include <array>
#include <iostream>
#include <fstream>
#include <vector>
#include "RStringView.h"

Go to the source code of this file.

Classes

struct  refchannel
 

Macros

#define BOOST_TEST_MODULE   Test EMCAL Base
 
#define BOOST_TEST_MAIN
 
#define BOOST_TEST_DYN_LINK
 

Functions

std::vector< refchannelloadReferenceMapping (const std::string_view mappingfile)
 Load reference mapping from mapping file.
 
 BOOST_AUTO_TEST_CASE (Mapper_test)
 

Macro Definition Documentation

◆ BOOST_TEST_DYN_LINK

#define BOOST_TEST_DYN_LINK

Definition at line 13 of file testMapper.cxx.

◆ BOOST_TEST_MAIN

#define BOOST_TEST_MAIN

Definition at line 12 of file testMapper.cxx.

◆ BOOST_TEST_MODULE

#define BOOST_TEST_MODULE   Test EMCAL Base

Definition at line 11 of file testMapper.cxx.

Function Documentation

◆ BOOST_AUTO_TEST_CASE()

BOOST_AUTO_TEST_CASE ( Mapper_test  )

\macro Test implementation of the EMCAL mapper

Test coverage:

  • Row, column and channel type from hardware address: all channels
  • Hardware address from row, column and channel type (inverse mapping): all channels
  • Invalid hardware address: exception test
  • Invalid channel row / column: exception test

Definition at line 41 of file testMapper.cxx.

◆ loadReferenceMapping()

std::vector< refchannel > loadReferenceMapping ( const std::string_view  mappingfile)

Load reference mapping from mapping file.

Parameters
mappingfileFull path to the file with the mapping
Returns
Vector with channel information (as integers)

Definition at line 88 of file testMapper.cxx.