![]() |
Project
|
By default the unit (and thus short) tests are running without any input.
To go further though, some stress tests take as input a JSON file containing test positions, using the --testpos
option (it is an option of the test module, not of the test program itself, hence the --
syntax) and call (part of) the test like so :
In the segmentation interface, the various findXXX method return an integer that was first designed as a padId, that would be relevant only within a given implementation. It was later decided to use this integer as a pad index (from 0 to number of pads in the cathode or in the full detection element), and to guarantee that this pad index would be the same whatever the implementation is (i.e. the implemeter has to ensure that this guarantee is fullfilled). The o2-test-mchmapping-PadIndices
test programs are meant for that. They take as input test files that are generated by the o2-mchmapping-generate-pad-indices-implXXX
programs. See for instance the generate-pad-indices.sh
script. The generation program(s) generate by default all the indices of a given detection element, unless the --sparse
option is used, in which case about a 1/16th of the pad indices are generated, which should be enough to spot issues. For a new implementation it is recommended though to test without the --sparse
option. This is to minimize the size of the generated json files.
The number of indices generated can be checked using for instance :
cat test_pad_indices_de100.json| jq . | grep padindex | wc -l
which assumes the jq utility program is available.