ATLAS Offline Software
Functions | Variables
python.PostExec Namespace Reference

Functions

def forceConditions (run, lb, iovDbSvc=None)
 
def reverseViews ()
 
def dbmod_BFieldAutoConfig ()
 

Variables

 log
 
 __postExec_frame
 
 __globals
 

Function Documentation

◆ dbmod_BFieldAutoConfig()

def python.PostExec.dbmod_BFieldAutoConfig ( )
Use DCS currents to configure magnetic field

Definition at line 88 of file PostExec.py.

88 def dbmod_BFieldAutoConfig(): # DB modifier for debug recovery when using an online SMK
89  """Use DCS currents to configure magnetic field"""
90 
91  log.info(dbmod_BFieldAutoConfig.__doc__)
92 
93  from GaudiPython.Bindings import iProperty
94  # Add the DCS folder
95  f = '<db>COOLOFL_DCS/CONDBR2</db> /EXT/DCS/MAGNETS/SENSORDATA'
96  iProperty('IOVDbSvc').Folders += [f]
97  iProperty('CondInputLoader').Load.add(('CondAttrListCollection','/EXT/DCS/MAGNETS/SENSORDATA'))
98  # Configure CondAlgs
99  iProperty('AtlasFieldCacheCondAlg').UseDCS = True
100  iProperty('AtlasFieldMapCondAlg').LoadMapOnStart = False
101  iProperty('AtlasFieldMapCondAlg').UseMapsFromCOOL = True
102  iProperty('HltEventLoopMgr').setMagFieldFromPtree = False

◆ forceConditions()

def python.PostExec.forceConditions (   run,
  lb,
  iovDbSvc = None 
)
Force all conditions (except prescales) to match the given run and LB number

Definition at line 31 of file PostExec.py.

31 def forceConditions(run, lb, iovDbSvc=None):
32  """Force all conditions (except prescales) to match the given run and LB number"""
33 
34  log.info(forceConditions.__doc__)
35 
36  if iovDbSvc is None:
37  iovDbSvc = __globals['cfg'].getService('IOVDbSvc')
38 
39  # Do not override these folders:
40  ignore = ['/TRIGGER/HLT/PrescaleKey'] # see ATR-22143
41 
42  # All time-based folders (from IOVDbSvc DEBUG message, see athena!38274)
43  timebased = ['/TDAQ/OLC/CALIBRATIONS',
44  '/TDAQ/Resources/ATLAS/SCT/Robins',
45  '/SCT/DAQ/Config/ChipSlim',
46  '/SCT/DAQ/Config/Geog',
47  '/SCT/DAQ/Config/MUR',
48  '/SCT/DAQ/Config/Module',
49  '/SCT/DAQ/Config/ROD',
50  '/SCT/DAQ/Config/RODMUR',
51  '/SCT/HLT/DCS/HV',
52  '/SCT/HLT/DCS/MODTEMP',
53  '/MUONALIGN/Onl/MDT/BARREL',
54  '/MUONALIGN/Onl/MDT/ENDCAP/SIDEA',
55  '/MUONALIGN/Onl/MDT/ENDCAP/SIDEC',
56  '/MUONALIGN/Onl/TGC/SIDEA',
57  '/MUONALIGN/Onl/TGC/SIDEC',
58  '/TRIGGER/L1Calo/V1/Calibration/EfexNoiseCuts',
59  '/TRIGGER/L1Calo/V1/Calibration/EfexEnergyCalib',
60  '/TRIGGER/L1Calo/V1/Calibration/JfexModuleSettings',
61  '/TRIGGER/L1Calo/V1/Calibration/JfexNoiseCuts',
62  '/TRIGGER/L1Calo/V1/Calibration/JfexSystemSettings']
63 
64  from TrigCommon.AthHLT import get_sor_params
65  sor = get_sor_params(run)
66  timestamp = sor['SORTime'] // int(1e9)
67 
68  for i,f in enumerate(iovDbSvc.Folders):
69  if any(name in f for name in ignore):
70  continue
71  if any(name in f for name in timebased):
72  iovDbSvc.Folders[i] += f'<forceTimestamp>{timestamp:d}</forceTimestamp>'
73  else:
74  iovDbSvc.Folders[i] += f'<forceRunNumber>{run:d}</forceRunNumber> <forceLumiblockNumber>{lb:d}</forceLumiblockNumber>'
75 
76 

◆ reverseViews()

def python.PostExec.reverseViews ( )
Process views in reverse order

Definition at line 77 of file PostExec.py.

77 def reverseViews():
78  """Process views in reverse order"""
79 
80  log.info(forceConditions.__doc__)
81 
82  from TriggerJobOpts.TriggerConfig import collectViewMakers
83  viewMakers = collectViewMakers( __globals['cfg'].getSequence() )
84  for alg in viewMakers:
85  alg.ReverseViewsDebug = True
86 
87 

Variable Documentation

◆ __globals

python.PostExec.__globals
private

Definition at line 24 of file PostExec.py.

◆ __postExec_frame

python.PostExec.__postExec_frame
private

Definition at line 21 of file PostExec.py.

◆ log

python.PostExec.log

Definition at line 16 of file PostExec.py.

python.AthHLT.get_sor_params
def get_sor_params(run_number)
Definition: AthHLT.py:28
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
python.PostExec.reverseViews
def reverseViews()
Definition: PostExec.py:77
python.PostExec.dbmod_BFieldAutoConfig
def dbmod_BFieldAutoConfig()
Definition: PostExec.py:88
python.TriggerConfig.collectViewMakers
def collectViewMakers(steps)
Definition: TriggerConfig.py:67
python.PostExec.forceConditions
def forceConditions(run, lb, iovDbSvc=None)
Definition: PostExec.py:31