Skip to content

ROC configuration class and files

Artur Lobanov requested to merge roc_config into HGCROCv2

Create a ROC class similar to the DAQ class, which allows loading a default ROC slow control (SC) configuration from a file, add/modify parameters and configure the ROC through the set/read_parameter functions similar to before:

roc = ROC("configs/roc_config.yaml") 

roc.add_sc_param("ReferenceVoltage","all","LowRange", 1)                                                                                                                                                
roc.add_sc_param("ch",1,"Sel_trigger_toa", 1)                                                                                                                                                           
roc.add_sc_param("ch",1,"Sel_trigger_tot", 1)                                                                                                                                                           

A new parsing allows setting blockIds in a range or providing a list:

roc.set_parameter("ch", "1-20", "LowRange", 1)
roc.set_parameter("ch", "1,2,3", "LowRange", 1)

The difference between set_parameter and add_sc_param is whether the parameter will be configured, or whether it will be added to the SC parameter list, respectively.

The default roc_config.yaml is used in the init file from now, but any other file can be provided in the argument to init.py.

Default config file:

sc:                                                                                                                                                                                                         
  DigitalHalf:                                                                                                                                                                                              
    all:                                                                                                                                                                                                    
      L1Offset: 10                                                                                                                                                                                          
  GlobalAnalog:                                                                                                                                                                                             
    all:                                                                                                                                                                                                    
      Delay87: 1                                                                                                                                                                                            
      Delay9: 2                                                                                                                                                                                             
  ReferenceVoltage:                                                                                                                                                                                         
    all:                                                                                                                                                                                                    
      Vbg_1v: 4                                                                                                                                                                                             
  Top:                                                                                                                                                                                                      
    all:                                                                                                                                                                                                    
      BIAS_I_PLL_D: 63                                                                                                                                                                                      
      EN_HIGH_CAPA: 1                                                                                                                                                                                       
      EN_LOCK_CONTROL: 0                                                                                                                                                                                    
      ERROR_LIMIT_SC: 0                                                                                                                                                                                     
conf_fname:                                                                                                                                                                                                 
  configs/roc_config.yaml                                                                                                                                                                                   
bitmap_fname:                                                                                                                                                                                               
  configs/HGCROCv2_I2C_Params.csv           

Merge request reports