Skip to content
Snippets Groups Projects
Commit e220b68e authored by Pierre-Alain Loizeau's avatar Pierre-Alain Loizeau
Browse files

[CI][GEOM] Disable sampling part of overlap check macro

- Make overlap threshold optional input parameter (default = 0.0001 as before)
- Make sampling controllable by flag (disabled by default)
- Make number of samples in sampling mode controllable by input par (default = 0 leading to ROOT default of 1M)

Two problems from ROOT side lead to it being unrelyable for now
- Threshold is not working in this method
- Changing the number of samples lead to really small overlaps apearing and disappearing

See https://github.com/root-project/root/issues/14675 for reference
parent 1828c9bc
No related branches found
No related tags found
1 merge request!1656[CI] Disable/downgrade sampling part of check overlap macro
Pipeline #27176 passed
......@@ -287,7 +287,8 @@ bool expected_cbm_sampling(TGeoOverlap* ov)
return false;
}
void check_overlaps(TString dataset = "test", TString alignment_matrices = "")
void check_overlaps(TString dataset = "test", TString alignment_matrices = "", Double_t dThr = 0.0001,
bool bTestsampling = false, uint32_t uSamplesNb = 0)
{
// 2014-07-04 - DE - test CBM setups for collisions in nightly tests
// 2014-07-04 - DE - currently there are 2 overlaps between the PIPE and STS layer 8
......@@ -339,7 +340,7 @@ void check_overlaps(TString dataset = "test", TString alignment_matrices = "")
}
}
gGeoManager->CheckOverlaps(0.0001);
gGeoManager->CheckOverlaps(dThr);
TIter next(gGeoManager->GetListOfOverlaps());
TGeoOverlap* ov;
while ((ov = (TGeoOverlap*) next())) {
......@@ -359,28 +360,35 @@ void check_overlaps(TString dataset = "test", TString alignment_matrices = "")
std::cout << std::endl;
/*
* Commented the sampling part of the check as its threshold is broken
* Disabled by defaults the sampling part of the check as its threshold is broken
* For explanation see
* - https://git.cbm.gsi.de/computing/cbmroot/-/merge_requests/1639
* - https://github.com/root-project/root/issues/14675
// Threshold | N Samples
gGeoManager->CheckOverlaps(0.0001, "s2000000");
TIter next1(gGeoManager->GetListOfOverlaps());
while ((ov = (TGeoOverlap*) next1())) {
if ((dataset.Contains("mcbm") && expected_mcbm_sampling(ov)) || expected_cbm_sampling(ov)) {
/// Detected and logged in special function above
continue;
* - https://redmine.cbm.gsi.de/issues/3198
*/
if (bTestsampling) {
// Threshold | N Samples
if (0 < uNbSamples) {
gGeoManager->CheckOverlaps(dThr, Form("s%u", uNbSamples));
}
else {
std::cout << "Unexpected Overlap (sampled):" << std::endl;
ov->PrintInfo();
std::cout << std::endl;
unexpectedOverlaps++;
gGeoManager->CheckOverlaps(dThr, "s");
}
TIter next1(gGeoManager->GetListOfOverlaps());
while ((ov = (TGeoOverlap*) next1())) {
if ((dataset.Contains("mcbm") && expected_mcbm_sampling(ov)) || expected_cbm_sampling(ov)) {
/// Detected and logged in special function above
continue;
}
else {
std::cout << "Unexpected Overlap (sampled):" << std::endl;
ov->PrintInfo();
std::cout << std::endl;
unexpectedOverlaps++;
}
}
std::cout << std::endl;
}
std::cout << std::endl;
*/
if (unexpectedOverlaps != 0) {
std::cout << " Test failed" << std::endl;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment