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

In check_media macro, do not stop on 1st missing file and print all

parent 1fb0fea4
No related branches found
No related tags found
1 merge request!535Change setups for CI testing suite of mcbm simulation to current/future ones....
Pipeline #13780 failed
...@@ -28,6 +28,7 @@ void check_media(const char* dataset = "test") ...@@ -28,6 +28,7 @@ void check_media(const char* dataset = "test")
int wrong_media {0}; int wrong_media {0};
int missing_file {0};
TGeoNode* topNode = gGeoManager->GetTopNode(); TGeoNode* topNode = gGeoManager->GetTopNode();
TObjArray* nodes = topNode->GetNodes(); TObjArray* nodes = topNode->GetNodes();
for (Int_t iNode = 0; iNode < nodes->GetEntriesFast(); iNode++) { for (Int_t iNode = 0; iNode < nodes->GetEntriesFast(); iNode++) {
...@@ -37,15 +38,15 @@ void check_media(const char* dataset = "test") ...@@ -37,15 +38,15 @@ void check_media(const char* dataset = "test")
std::cout << "Checking node " << nodename << std::endl; std::cout << "Checking node " << nodename << std::endl;
std::pair<int, int> retval = CheckGeometry(nodename); std::pair<int, int> retval = CheckGeometry(nodename);
if (-1 == retval.second) { if (-1 == retval.second) {
RemoveGeoManager(); ++missing_file;
return; continue;
} }
wrong_media += retval.second; wrong_media += retval.second;
std::cout << "Checked " << retval.first << " sub nodes from " << nodename << " and found " << retval.second std::cout << "Checked " << retval.first << " sub nodes from " << nodename << " and found " << retval.second
<< " with wrongly assigned media" << std::endl; << " with wrongly assigned media" << std::endl;
} }
if (0 == wrong_media) { if (0 == wrong_media && 0 == missing_file) {
std::cout << std::endl; std::cout << std::endl;
std::cout << "Test passed" << std::endl; std::cout << "Test passed" << std::endl;
std::cout << "All ok" << std::endl; std::cout << "All ok" << std::endl;
...@@ -53,6 +54,7 @@ void check_media(const char* dataset = "test") ...@@ -53,6 +54,7 @@ void check_media(const char* dataset = "test")
else { else {
std::cout << std::endl; std::cout << std::endl;
std::cout << "Test failed" << std::endl; std::cout << "Test failed" << std::endl;
std::cout << "In total " << missing_file << " files were missing" << std::endl;
std::cout << "Found in total " << wrong_media << " nodes with wrongly assigned media" << std::endl; std::cout << "Found in total " << wrong_media << " nodes with wrongly assigned media" << std::endl;
} }
RemoveGeoManager(); RemoveGeoManager();
......
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