Project
Loading...
Searching...
No Matches
Segmentation.cxx File Reference
#include <boost/test/unit_test.hpp>
#include "boost/format.hpp"
#include "MCHMappingInterface/Segmentation.h"
#include "MCHMappingSegContour/SegmentationContours.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 <fmt/format.h>

Go to the source code of this file.

Classes

struct  SEG100
 
struct  PadInfo
 

Macros

#define BOOST_TEST_DYN_LINK
 

Functions

 BOOST_AUTO_TEST_CASE (GetSegmentationMustNotThrowIfDetElemIdIsValid)
 
 BOOST_AUTO_TEST_CASE (GetSegmentationThrowsIfDetElemIdIsNotValid)
 
 BOOST_AUTO_TEST_CASE (CheckNofPads)
 
 BOOST_AUTO_TEST_CASE (TotalNofFECInSegTypesIs2265)
 
 BOOST_AUTO_TEST_CASE (CheckBoundingBoxesAreAsExpected)
 
 BOOST_AUTO_TEST_CASE (CheckNofBendingFEC)
 
 BOOST_AUTO_TEST_CASE (PadCountInSegmentationTypesMustBe143469)
 
 BOOST_AUTO_TEST_CASE (PadCountInAllSegmentationsMustBe1064008)
 
 BOOST_AUTO_TEST_CASE (NumberOfSegmentationsMustBe21)
 
 BOOST_AUTO_TEST_CASE (CheckPadOffsetsAfterCopy)
 
 BOOST_AUTO_TEST_CASE (TestForEachPadAndPadIndexRange)
 
 BOOST_AUTO_TEST_CASE (CheckOnePadPositionPresentOnOnlyBendingPlaneDE600)
 
 BOOST_AUTO_TEST_CASE (CheckOnePadPositionPresentOnOnlyBendingPlaneDE825)
 
 BOOST_AUTO_TEST_CASE (CheckOnePadPositionTotallyAbsentDE604)
 
 BOOST_AUTO_TEST_CASE (CheckOnePosition)
 
bool checkSameCathode (const Segmentation &seg, int depadindex, const std::vector< int > &padindices)
 
bool areEqual (double a, double b)
 
bool testNeighbours (const Segmentation &seg, int dePadIndex, std::vector< PadInfo > &expected)
 
 BOOST_AUTO_TEST_CASE (CheckOnePadNeighbours)
 
 BOOST_AUTO_TEST_CASE (CircularTest)
 
 BOOST_AUTO_TEST_CASE (ThrowsIfDualSampaChannelIsNotBetween0And63)
 
 BOOST_AUTO_TEST_CASE (ReturnsTrueIfPadIsConnected)
 
 BOOST_AUTO_TEST_CASE (ReturnsFalseIfPadIsNotConnected)
 
 BOOST_AUTO_TEST_CASE (ReturnsFalseIfCatPadIdIsOutOfRange)
 
 BOOST_AUTO_TEST_CASE (HasPadByPosition)
 
 BOOST_AUTO_TEST_CASE (CheckOnePadPositionPresentOnOnlyBendingPlane)
 
 BOOST_AUTO_TEST_CASE (WhenOnlyOneCathodeHasAPadTheValidIndexMustRelativeToDeNotToCathode)
 
 BOOST_AUTO_TEST_CASE (CheckCopy)
 
 BOOST_AUTO_TEST_CASE (CheckAssignment)
 

Macro Definition Documentation

◆ BOOST_TEST_DYN_LINK

#define BOOST_TEST_DYN_LINK
Author
Laurent Aphecetche

Definition at line 15 of file Segmentation.cxx.

Function Documentation

◆ areEqual()

bool areEqual ( double  a,
double  b 
)

Definition at line 319 of file Segmentation.cxx.

◆ BOOST_AUTO_TEST_CASE() [1/26]

BOOST_AUTO_TEST_CASE ( CheckAssignment  )

Definition at line 502 of file Segmentation.cxx.

◆ BOOST_AUTO_TEST_CASE() [2/26]

BOOST_AUTO_TEST_CASE ( CheckBoundingBoxesAreAsExpected  )

Definition at line 99 of file Segmentation.cxx.

◆ BOOST_AUTO_TEST_CASE() [3/26]

BOOST_AUTO_TEST_CASE ( CheckCopy  )

Definition at line 495 of file Segmentation.cxx.

◆ BOOST_AUTO_TEST_CASE() [4/26]

BOOST_AUTO_TEST_CASE ( CheckNofBendingFEC  )

Definition at line 123 of file Segmentation.cxx.

◆ BOOST_AUTO_TEST_CASE() [5/26]

BOOST_AUTO_TEST_CASE ( CheckNofPads  )

Definition at line 53 of file Segmentation.cxx.

◆ BOOST_AUTO_TEST_CASE() [6/26]

BOOST_AUTO_TEST_CASE ( CheckOnePadNeighbours  )

Definition at line 353 of file Segmentation.cxx.

◆ BOOST_AUTO_TEST_CASE() [7/26]

BOOST_AUTO_TEST_CASE ( CheckOnePadPositionPresentOnOnlyBendingPlane  )

Definition at line 467 of file Segmentation.cxx.

◆ BOOST_AUTO_TEST_CASE() [8/26]

BOOST_AUTO_TEST_CASE ( CheckOnePadPositionPresentOnOnlyBendingPlaneDE600  )

Definition at line 235 of file Segmentation.cxx.

◆ BOOST_AUTO_TEST_CASE() [9/26]

BOOST_AUTO_TEST_CASE ( CheckOnePadPositionPresentOnOnlyBendingPlaneDE825  )

Definition at line 254 of file Segmentation.cxx.

◆ BOOST_AUTO_TEST_CASE() [10/26]

BOOST_AUTO_TEST_CASE ( CheckOnePadPositionTotallyAbsentDE604  )

Definition at line 273 of file Segmentation.cxx.

◆ BOOST_AUTO_TEST_CASE() [11/26]

BOOST_AUTO_TEST_CASE ( CheckOnePosition  )

Definition at line 291 of file Segmentation.cxx.

◆ BOOST_AUTO_TEST_CASE() [12/26]

BOOST_AUTO_TEST_CASE ( CheckPadOffsetsAfterCopy  )

Definition at line 187 of file Segmentation.cxx.

◆ BOOST_AUTO_TEST_CASE() [13/26]

BOOST_AUTO_TEST_CASE ( CircularTest  )

Definition at line 415 of file Segmentation.cxx.

◆ BOOST_AUTO_TEST_CASE() [14/26]

BOOST_AUTO_TEST_CASE ( GetSegmentationMustNotThrowIfDetElemIdIsValid  )

Definition at line 36 of file Segmentation.cxx.

◆ BOOST_AUTO_TEST_CASE() [15/26]

BOOST_AUTO_TEST_CASE ( GetSegmentationThrowsIfDetElemIdIsNotValid  )

Definition at line 45 of file Segmentation.cxx.

◆ BOOST_AUTO_TEST_CASE() [16/26]

BOOST_AUTO_TEST_CASE ( HasPadByPosition  )

Definition at line 460 of file Segmentation.cxx.

◆ BOOST_AUTO_TEST_CASE() [17/26]

BOOST_AUTO_TEST_CASE ( NumberOfSegmentationsMustBe21  )

Definition at line 178 of file Segmentation.cxx.

◆ BOOST_AUTO_TEST_CASE() [18/26]

BOOST_AUTO_TEST_CASE ( PadCountInAllSegmentationsMustBe1064008  )

Definition at line 165 of file Segmentation.cxx.

◆ BOOST_AUTO_TEST_CASE() [19/26]

BOOST_AUTO_TEST_CASE ( PadCountInSegmentationTypesMustBe143469  )

Definition at line 152 of file Segmentation.cxx.

◆ BOOST_AUTO_TEST_CASE() [20/26]

BOOST_AUTO_TEST_CASE ( ReturnsFalseIfCatPadIdIsOutOfRange  )

Definition at line 449 of file Segmentation.cxx.

◆ BOOST_AUTO_TEST_CASE() [21/26]

BOOST_AUTO_TEST_CASE ( ReturnsFalseIfPadIsNotConnected  )

Definition at line 439 of file Segmentation.cxx.

◆ BOOST_AUTO_TEST_CASE() [22/26]

BOOST_AUTO_TEST_CASE ( ReturnsTrueIfPadIsConnected  )

Definition at line 437 of file Segmentation.cxx.

◆ BOOST_AUTO_TEST_CASE() [23/26]

BOOST_AUTO_TEST_CASE ( TestForEachPadAndPadIndexRange  )

Definition at line 215 of file Segmentation.cxx.

◆ BOOST_AUTO_TEST_CASE() [24/26]

BOOST_AUTO_TEST_CASE ( ThrowsIfDualSampaChannelIsNotBetween0And63  )

Definition at line 431 of file Segmentation.cxx.

◆ BOOST_AUTO_TEST_CASE() [25/26]

BOOST_AUTO_TEST_CASE ( TotalNofFECInSegTypesIs2265  )

Definition at line 86 of file Segmentation.cxx.

◆ BOOST_AUTO_TEST_CASE() [26/26]

BOOST_AUTO_TEST_CASE ( WhenOnlyOneCathodeHasAPadTheValidIndexMustRelativeToDeNotToCathode  )

Definition at line 483 of file Segmentation.cxx.

◆ checkSameCathode()

bool checkSameCathode ( const Segmentation seg,
int  depadindex,
const std::vector< int > &  padindices 
)

Definition at line 302 of file Segmentation.cxx.

◆ testNeighbours()

bool testNeighbours ( const Segmentation seg,
int  dePadIndex,
std::vector< PadInfo > &  expected 
)

Definition at line 327 of file Segmentation.cxx.