Project
Loading...
Searching...
No Matches
BenchCathodeSegmentation.cxx File Reference
#include <algorithm>
#include <random>
#include "benchmark/benchmark.h"
#include "MCHMappingInterface/CathodeSegmentation.h"
#include "MCHMappingSegContour/CathodeSegmentationContours.h"

Go to the source code of this file.

Classes

struct  TestPoint
 
class  BenchO2
 

Functions

std::vector< TestPointgenerateUniformTestPoints (int n, double xmin, double ymin, double xmax, double ymax)
 
 for (auto _ :state)
 
std::vector< intgetDetElemIds ()
 
 BENCHMARK (benchCathodeSegmentationConstructionAll) -> Unit(benchmark::kMillisecond)
 
 BENCHMARK_REGISTER_F (BenchO2, findPadByPosition) -> Apply(segmentationList) ->Unit(benchmark::kMillisecond)
 
 BENCHMARK_REGISTER_F (BenchO2, findPadByFEE) -> Apply(segmentationList) ->Unit(benchmark::kMillisecond)
 
 BENCHMARK_REGISTER_F (BenchO2, ctor) -> Apply(segmentationList) ->Unit(benchmark::kMicrosecond)
 
 BENCHMARK_MAIN ()
 

Variables

benchmark::State & state
 
bool isBendingPlane = state.range(1)
 
o2::mch::mapping::CathodeSegmentation seg {detElemId, isBendingPlane}
 
int ntp {0}
 
state counters ["ntp"] = ntp
 
auto bbox = o2::mch::mapping::getBBox(seg)
 
const int n = 100000
 
auto testpoints = generateUniformTestPoints(n, bbox.xmin(), bbox.ymin(), bbox.xmax(), bbox.ymax())
 

Function Documentation

◆ BENCHMARK()

BENCHMARK ( benchCathodeSegmentationConstructionAll  ) -> Unit(benchmark::kMillisecond)

◆ BENCHMARK_MAIN()

BENCHMARK_MAIN ( )

◆ BENCHMARK_REGISTER_F() [1/3]

BENCHMARK_REGISTER_F ( BenchO2  ,
ctor   
) -> Apply(segmentationList) ->Unit(benchmark::kMicrosecond)

◆ BENCHMARK_REGISTER_F() [2/3]

BENCHMARK_REGISTER_F ( BenchO2  ,
findPadByFEE   
) -> Apply(segmentationList) ->Unit(benchmark::kMillisecond)

◆ BENCHMARK_REGISTER_F() [3/3]

BENCHMARK_REGISTER_F ( BenchO2  ,
findPadByPosition   
) -> Apply(segmentationList) ->Unit(benchmark::kMillisecond)

◆ for()

for ( auto _ :state  )

Definition at line 62 of file BenchCathodeSegmentation.cxx.

◆ generateUniformTestPoints()

std::vector< TestPoint > generateUniformTestPoints ( int  n,
double  xmin,
double  ymin,
double  xmax,
double  ymax 
)

Definition at line 25 of file BenchCathodeSegmentation.cxx.

◆ getDetElemIds()

std::vector< int > getDetElemIds ( )

Definition at line 67 of file BenchCathodeSegmentation.cxx.

Variable Documentation

◆ bbox

Definition at line 118 of file BenchCathodeSegmentation.cxx.

◆ counters

state counters["ntp"] = ntp

Definition at line 106 of file BenchCathodeSegmentation.cxx.

◆ isBendingPlane

bool isBendingPlane = state.range(1)

Definition at line 60 of file BenchCathodeSegmentation.cxx.

◆ n

const int n = 100000

Definition at line 120 of file BenchCathodeSegmentation.cxx.

◆ ntp

int ntp {0}

Definition at line 94 of file BenchCathodeSegmentation.cxx.

◆ seg

◆ state

benchmark::State & state
Initial value:
{
int detElemId = state.range(0)
benchmark::State & state

Definition at line 57 of file BenchCathodeSegmentation.cxx.

◆ testpoints

auto testpoints = generateUniformTestPoints(n, bbox.xmin(), bbox.ymin(), bbox.xmax(), bbox.ymax())

Definition at line 121 of file BenchCathodeSegmentation.cxx.