ATLAS Offline Software
Functions | Variables
python.L1.Base.MenuUtils Namespace Reference

Functions

def binstr (value, width)
 
def get_smk_psk_Name (menuName)
 

Variables

 log
 

Function Documentation

◆ binstr()

def python.L1.Base.MenuUtils.binstr (   value,
  width 
)
Convert integer into binary string of given (minimum) width

Definition at line 7 of file MenuUtils.py.

7 def binstr(value, width):
8  """Convert integer into binary string of given (minimum) width"""
9  return f"{value:0{width}b}"
10 
11 

◆ get_smk_psk_Name()

def python.L1.Base.MenuUtils.get_smk_psk_Name (   menuName)

Definition at line 12 of file MenuUtils.py.

12 def get_smk_psk_Name(menuName):
13  import re
14  if "mc_prescale" in menuName:
15  form = "(.*)_(.*)_mc_prescale"
16  m = re.match(form, menuName)
17  (smkName, pskName) = m.groups()
18  pskName = pskName+"_mc"
19  elif "prescale" in menuName:
20  #eg lumi1e31_simpleL1Calib_no_prescale
21  form = "(.*)_(.*)_prescale"
22  m = re.match(form, menuName)
23  (smkName, pskName) = m.groups()
24  else:
25  #eg lumi1e31 ps set name can be "default"
26  smkName = menuName
27  pskName = "default"
28 
29  smk_psk_Name = {"smkName": str(smkName),
30  "pskName": f"{smkName}_{pskName}_prescale"}
31 
32  return smk_psk_Name

Variable Documentation

◆ log

python.L1.Base.MenuUtils.log

Definition at line 4 of file MenuUtils.py.

python.L1.Base.MenuUtils.get_smk_psk_Name
def get_smk_psk_Name(menuName)
Definition: MenuUtils.py:12
python.L1.Base.MenuUtils.binstr
def binstr(value, width)
Definition: MenuUtils.py:7
str
Definition: BTagTrackIpAccessor.cxx:11