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')
 cfg = None
 __postExec_frame
 __frame_members = dict(inspect.getmembers(__postExec_frame[0]))

Function Documentation

◆ dbmod_BFieldAutoConfig()

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

Definition at line 95 of file PostExec.py.

95def dbmod_BFieldAutoConfig(): # DB modifier for debug recovery when using an online SMK
96 """Use DCS currents to configure magnetic field"""
97
98 log.info(dbmod_BFieldAutoConfig.__doc__)
99
100 from GaudiPython.Bindings import iProperty
101 # Add the DCS folder
102 f = '<db>COOLOFL_DCS/CONDBR2</db> /EXT/DCS/MAGNETS/SENSORDATA'
103 iProperty('IOVDbSvc').Folders += [f]
104 iProperty('CondInputLoader').Load.add(('CondAttrListCollection','/EXT/DCS/MAGNETS/SENSORDATA'))
105 # Configure CondAlgs
106 iProperty('AtlasFieldCacheCondAlg').UseDCS = True
107 iProperty('AtlasFieldMapCondAlg').LoadMapOnStart = False
108 iProperty('AtlasFieldMapCondAlg').UseMapsFromCOOL = True
109 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 36 of file PostExec.py.

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

◆ reverseViews()

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

Definition at line 84 of file PostExec.py.

84def reverseViews():
85 """Process views in reverse order"""
86
87 log.info(reverseViews.__doc__)
88
89 from TriggerJobOpts.TriggerConfig import collectViewMakers
90 viewMakers = collectViewMakers( cfg.getSequence() )
91 for alg in viewMakers:
92 alg.ReverseViewsDebug = True
93
94

Variable Documentation

◆ __frame_members

python.PostExec.__frame_members = dict(inspect.getmembers(__postExec_frame[0]))
private

Definition at line 27 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 'athenaEF.py' in f.filename or
3 'runHLT.py' in f.filename), inspect.stack()), None)

Definition at line 23 of file PostExec.py.

◆ cfg

python.PostExec.cfg = None

Definition at line 20 of file PostExec.py.

◆ log

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

Definition at line 16 of file PostExec.py.