Skip to content

[ATR-20810] Bunchgroup reader update and minimally needed TriggerDB package restructuring

Joerg Stelzer requested to merge BunchgroupReaderUpdate into master

The BunchGroupReader.py is responsible for reading a bunchgroup set definition created by the CTP and turns it into a json file. The CTP thereby can define bunchgroups based on the current LHC fill or based on a filling scheme csv (or soon json) file when put into a certain location.

This MR implements/improves the following

  • For the BGS creation from a filling scheme file a shell script and this python script had to be run in the past. Now all the functionality is in the python script BunchGroupReader
  • ers logging has been added
  • The option to upload the created bunchgroup set to the TRIGGERDB has been added to BunchGroupReader (in the past a separate upload script had to be run)
  • The script scripts/dbio/insertBunchGroupSet.py has been emptied out and the code been moved to python/TriggerDB/DBUploader.py. It is still called by the insetBunchGroupSet.py script, but can now be called also from BunchGroupReader.py. In DBUploader.py functionality has been split into a base class, and a bunchgroupset-specific class, in foresight of further restructuring of the package.

Further in this MR in a new directory test code has been placed that one can use to test the BunchGroupReader functionality outside P1. More in test/README.md

  • test/TinyPartition.sh: creates a small partition to hold bunchgroup sets in IS
  • test/WriteBGS2IS.py: a script that can write bunchgroup sets to IS to two different structures, identical to what the CTP does at P1. It can also run in a loop-mode, simulating the way bunchgroups are created from a filling-scheme file at P1. When run in this mode, one can fully test the functionality of the BunchGroupReader.py in the testbed in both modes.

This is needed to finalize ATR-20810

Merge request reports