Project
Loading...
Searching...
No Matches
CathodeSegmentationLong.cxx File Reference
#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< PointcheckGaps (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)
 

Macro Definition Documentation

◆ BOOST_TEST_DYN_LINK

#define BOOST_TEST_DYN_LINK
Author
Laurent Aphecetche

Definition at line 15 of file CathodeSegmentationLong.cxx.

Typedef Documentation

◆ Comparator

Definition at line 101 of file CathodeSegmentationLong.cxx.

◆ Point

using Point = std::pair<double, double>

Definition at line 35 of file CathodeSegmentationLong.cxx.

Function Documentation

◆ areEqual()

bool areEqual ( double  a,
double  b 
)

Definition at line 96 of file CathodeSegmentationLong.cxx.

◆ BOOST_AUTO_TEST_CASE() [1/3]

BOOST_AUTO_TEST_CASE ( TestCathodeForEachPadAndPadIndexRange  )

Definition at line 214 of file CathodeSegmentationLong.cxx.

◆ BOOST_AUTO_TEST_CASE() [2/3]

BOOST_AUTO_TEST_CASE ( TestChannelNumbers  )

Definition at line 184 of file CathodeSegmentationLong.cxx.

◆ BOOST_AUTO_TEST_CASE() [3/3]

BOOST_AUTO_TEST_CASE ( TestPositions  )

Definition at line 165 of file CathodeSegmentationLong.cxx.

◆ BOOST_DATA_TEST_CASE()

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.

◆ checkGaps()

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.

◆ dumpToFile()

void dumpToFile ( std::string  fileName,
const CathodeSegmentation seg,
const std::vector< Point > &  points 
)

Definition at line 40 of file CathodeSegmentationLong.cxx.

◆ testOne()

int testOne ( const o2::mch::mapping::CathodeSegmentation seg,
rapidjson::Value tp,
Comparator  comp 
)

Definition at line 103 of file CathodeSegmentationLong.cxx.

◆ TestWithComparator()

void TestWithComparator ( Comparator  comp,
const char msg 
)

Definition at line 131 of file CathodeSegmentationLong.cxx.