![]() |
Project
|
#include <boost/test/unit_test.hpp>
#include <boost/format.hpp>
#include "MCHMappingInterface/CathodeSegmentation.h"
#include "MCHMappingSegContour/CathodeSegmentationContours.h"
#include "MCHMappingSegContour/CathodeSegmentationSVGWriter.h"
#include "MCHContour/SVGWriter.h"
#include <boost/test/data/monomorphic.hpp>
#include <boost/test/data/monomorphic/generators/xrange.hpp>
#include <boost/test/data/test_case.hpp>
#include <fstream>
#include <iostream>
#include "TestParameters.h"
#include "InputDocument.h"
Go to the source code of this file.
Macros | |
#define | BOOST_TEST_DYN_LINK |
Typedefs | |
using | Point = std::pair< double, double > |
using | Comparator = std::function< int(const o2::mch::mapping::CathodeSegmentation &, int, rapidjson::Value &)> |
Functions | |
void | dumpToFile (std::string fileName, const CathodeSegmentation &seg, const std::vector< Point > &points) |
std::vector< Point > | checkGaps (const CathodeSegmentation &seg, double xstep=1.0, double ystep=1.0) |
BOOST_DATA_TEST_CASE (NoGapWithinPads, boost::unit_test::data::make({100, 300, 500, 501, 502, 503, 504, 600, 601, 602, 700, 701, 702, 703, 704, 705, 706, 902, 903, 904, 905}) *boost::unit_test::data::make({true, false}), detElemId, isBendingPlane) | |
bool | areEqual (double a, double b) |
int | testOne (const o2::mch::mapping::CathodeSegmentation &seg, rapidjson::Value &tp, Comparator comp) |
void | TestWithComparator (Comparator comp, const char *msg) |
BOOST_AUTO_TEST_CASE (TestPositions) | |
BOOST_AUTO_TEST_CASE (TestChannelNumbers) | |
BOOST_AUTO_TEST_CASE (TestCathodeForEachPadAndPadIndexRange) | |
#define BOOST_TEST_DYN_LINK |
Definition at line 15 of file CathodeSegmentationLong.cxx.
using Comparator = std::function<int(const o2::mch::mapping::CathodeSegmentation&, int, rapidjson::Value&)> |
Definition at line 101 of file CathodeSegmentationLong.cxx.
using Point = std::pair<double, double> |
Definition at line 35 of file CathodeSegmentationLong.cxx.
bool areEqual | ( | double | a, |
double | b | ||
) |
Definition at line 96 of file CathodeSegmentationLong.cxx.
BOOST_AUTO_TEST_CASE | ( | TestCathodeForEachPadAndPadIndexRange | ) |
Definition at line 214 of file CathodeSegmentationLong.cxx.
BOOST_AUTO_TEST_CASE | ( | TestChannelNumbers | ) |
Definition at line 184 of file CathodeSegmentationLong.cxx.
BOOST_AUTO_TEST_CASE | ( | TestPositions | ) |
Definition at line 165 of file CathodeSegmentationLong.cxx.
BOOST_DATA_TEST_CASE | ( | NoGapWithinPads | , |
boost::unit_test::data::make({100, 300, 500, 501, 502, 503, 504, 600, 601, 602, 700, 701, 702, 703, 704, 705, 706, 902, 903, 904, 905}) *boost::unit_test::data::make({true, false}) | , | ||
detElemId | , | ||
isBendingPlane | |||
) |
Definition at line 81 of file CathodeSegmentationLong.cxx.
std::vector< Point > checkGaps | ( | const CathodeSegmentation & | seg, |
double | xstep = 1.0 , |
||
double | ystep = 1.0 |
||
) |
Check that for all points within the segmentation contour the findPadByPosition actually returns a valid pad
Definition at line 57 of file CathodeSegmentationLong.cxx.
void dumpToFile | ( | std::string | fileName, |
const CathodeSegmentation & | seg, | ||
const std::vector< Point > & | points | ||
) |
Definition at line 40 of file CathodeSegmentationLong.cxx.
int testOne | ( | const o2::mch::mapping::CathodeSegmentation & | seg, |
rapidjson::Value & | tp, | ||
Comparator | comp | ||
) |
Definition at line 103 of file CathodeSegmentationLong.cxx.
void TestWithComparator | ( | Comparator | comp, |
const char * | msg | ||
) |
Definition at line 131 of file CathodeSegmentationLong.cxx.