Draft: Test if empty branches in the output file exist
Add a macro which loops over all defined branches according to the BranchList folder and checks is empty branches exist. Empty branches indicate a problem. Add test to the CI which execute the macro for all created output files.
Merge request reports
Activity
changed milestone to %OCT23
added Build System CI/CD labels
requested review from @p.-a.loizeau
assigned to @p.-a.loizeau
This MR should only be merged after the creation of the MvdDigi is fixed. Currently the the CI pipelines should fail since new test were added which checks if empty branches in the output files exist. In case empty branches are found the test fails since this is an obvious bug. All existing branches should contain data.
added 20 commits
-
b80b35a3...5c7893f5 - 16 commits from branch
computing:master
- 84ce846a - Fix generation of MvdDigi in event based mode
- c47fff72 - Add back event mode in MVD cluster finder
- 8eb8f942 - Fix the reconstruction topologies at several places
- 96b4166e - Test if empty branches in the output file exist
Toggle commit list-
b80b35a3...5c7893f5 - 16 commits from branch
added 113 commits
-
96b4166e...15116b14 - 112 commits from branch
computing:master
- e508ae33 - Test if empty branches in the output file exist
-
96b4166e...15116b14 - 112 commits from branch
added 1 commit
- 03b5d7ca - Test if empty branches in the output file exist
added 54 commits
-
03b5d7ca...ea9125b8 - 53 commits from branch
computing:master
- dbac3f72 - Test if empty branches in the output file exist
-
03b5d7ca...ea9125b8 - 53 commits from branch
added 34 commits
-
dbac3f72...78e217d6 - 33 commits from branch
computing:master
- 02fa7efe - Test if empty branches in the output file exist
-
dbac3f72...78e217d6 - 33 commits from branch
added 5 commits
-
02fa7efe...b5b9540c - 4 commits from branch
computing:master
- 11a0246d - Test if empty branches in the output file exist
-
02fa7efe...b5b9540c - 4 commits from branch
removed milestone %OCT23
added 179 commits
-
11a0246d...39c00e70 - 178 commits from branch
computing:master
- a2db261a - Test if empty branches in the output file exist
-
11a0246d...39c00e70 - 178 commits from branch
I did not think about it before but the two remaining failed tests kind of make sense if the "no empty branch" convention was not made explicit before: in both case some Muon setup reco test fails with
[ERROR] Branch TrdTrack is empty
What is still strange is that this seems to happen only on
CentOs
while I would expect it to be general to all jobsSwitching to
DAILY
mode (by commenting out the cmakeWEEKLY
option), I can reproduce the error.
When comparing the logs, I get some completely different logs already at transport level, so I am wondering now if the problem is not simply that the random generator behaves differently undercentos
fromvae23
, leading to non-comparable results.If you want to have a look:
meld /lustre/cbm/users/ploizeau/apptainer/empties_*_nov22p1_daylies.txt
- macro/tools/checkBranchFilled.C 0 → 100644
23 std::unique_ptr<TList> _list{dynamic_cast<TList*>(_file->Get("BranchList"))}; 24 25 Int_t retVal = 0; 26 27 // Loop over all branches defined in the BranchList folder. These are the 28 // branches which were registered by the framework 29 for (const auto&& obj : *_list) { 30 // The TList contains a list of TObjString 31 // access the content with GetString() 32 TString branchName = static_cast<TObjString*>(obj)->GetString(); 33 std::cout << "Checking if branch " << branchName << " is empty" << std::endl; 34 35 TBranch* _branch = inTree->FindBranch(branchName); 36 37 // Skip branches which ends with a dot since these are not TClonesArrays 38 // or std::vector but some auxillary data - macro/tools/checkBranchFilled.C 0 → 100644
8 #include "TLeaf.h" 9 #include "TList.h" 10 #include "TObjString.h" 11 #include "TString.h" 12 #include "TTree.h" 13 14 #include <algorithm> 15 #include <iostream> 16 #endif 17 18 int checkBranchFilled(TString inFile) 19 { 20 //Open the file and acces the Tree as well as the TList with branch names 21 std::unique_ptr<TFile> _file{TFile::Open(inFile.Data(), "READ")}; 22 std::unique_ptr<TTree> inTree{dynamic_cast<TTree*>(_file->Get("cbmsim"))}; 23 std::unique_ptr<TList> _list{dynamic_cast<TList*>(_file->Get("BranchList"))}; - macro/tools/checkBranchFilled.C 0 → 100644
35 TBranch* _branch = inTree->FindBranch(branchName); 36 37 // Skip branches which ends with a dot since these are not TClonesArrays 38 // or std::vector but some auxillary data 39 // Also skip entries in the BranchList folder which do not contain a 40 // branch name. This can happen if the branch was only present in memory 41 // and wasn't written to file 42 if (!_branch || branchName.EndsWith(".")) continue; 43 44 TObjArray* leaves = _branch->GetListOfLeaves(); 45 TObjArray* subbranch = _branch->GetListOfBranches(); 46 47 // The following code I put together after one day of trial and error. 48 // Unfortunately I can't really explain it but when the main branch 49 // eg. MvdDigi_ is empty the maximum and the minimum extracted from the 50 // leaf is equal which is used as trigger to indicate an empty branch added 451 commits
-
a2db261a...efe2f65b - 450 commits from branch
computing:master
- f85eb56c - Test if empty branches in the output file exist
-
a2db261a...efe2f65b - 450 commits from branch
added 15 commits
-
f85eb56c...be7478fb - 14 commits from branch
computing:master
- a33e02c9 - Test if empty branches in the output file exist
-
f85eb56c...be7478fb - 14 commits from branch
added 112 commits
-
a33e02c9...e77a8552 - 111 commits from branch
computing:master
- ab09a715 - Test if empty branches in the output file exist
-
a33e02c9...e77a8552 - 111 commits from branch
added 44 commits
-
ab09a715...2964ad91 - 43 commits from branch
computing:master
- 5af40460 - Test if empty branches in the output file exist
-
ab09a715...2964ad91 - 43 commits from branch