ATLAS Offline Software
Loading...
Searching...
No Matches
python.PostExec Namespace Reference

Functions

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

Variables

 log = logging.getLogger('TriggerJobOpts.PostExec')
 __postExec_frame
 __globals = dict(inspect.getmembers(__postExec_frame[0]))["f_globals"]

Function Documentation

◆ dbmod_BFieldAutoConfig()

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

Definition at line 90 of file PostExec.py.

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

◆ forceConditions()

python.PostExec.forceConditions ( run,
lb,
timestamp = None,
iovDbSvc = None )
Force all conditions (except prescales) to match the given run and LB number, a timestamp can also be provided for MC

Definition at line 31 of file PostExec.py.

31def forceConditions(run, lb, timestamp=None, iovDbSvc=None):
32 """Force all conditions (except prescales) to match the given run and LB number, a timestamp can also be provided for MC"""
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 '/TRIGGER/L1Calo/V1/Calibration/GfexModuleSettings']
64
65 if timestamp is None:
66 from TrigCommon.AthHLT import get_sor_params
67 sor = get_sor_params(run)
68 timestamp = sor['SORTime'] // int(1e9)
69
70 for i,f in enumerate(iovDbSvc.Folders):
71 if any(name in f for name in ignore):
72 continue
73 if any(name in f for name in timebased):
74 iovDbSvc.Folders[i] += f'<forceTimestamp>{timestamp:d}</forceTimestamp>'
75 else:
76 iovDbSvc.Folders[i] += f'<forceRunNumber>{run:d}</forceRunNumber> <forceLumiblockNumber>{lb:d}</forceLumiblockNumber>'
77
78

◆ reverseViews()

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

Definition at line 79 of file PostExec.py.

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

Variable Documentation

◆ __globals

python.PostExec.__globals = dict(inspect.getmembers(__postExec_frame[0]))["f_globals"]
private

Definition at line 24 of file PostExec.py.

◆ __postExec_frame

python.PostExec.__postExec_frame
private
Initial value:
1= next(filter(lambda f : ('TrigPSCPythonCASetup.py' in f.filename or
2 'runHLT.py' in f.filename), inspect.stack()), None)

Definition at line 21 of file PostExec.py.

◆ log

python.PostExec.log = logging.getLogger('TriggerJobOpts.PostExec')

Definition at line 16 of file PostExec.py.