ATLAS Offline Software
Classes | Functions
python.TrigP1TestSteps Namespace Reference

Classes

class  ExtractExpertMonitoring
 
class  TrigBSDumpGrepStep
 

Functions

def check_hlt_properties (filename='HLTJobOptions.db.json')
 
def default_check_steps_OHMon (test, hist_path)
 
def filterBS (stream_name)
 
def decodeBS (stream_name, moduleID=0)
 

Function Documentation

◆ check_hlt_properties()

def python.TrigP1TestSteps.check_hlt_properties (   filename = 'HLTJobOptions.db.json')
Check a few important job options in the JSON file

Definition at line 108 of file TrigP1TestSteps.py.

108 def check_hlt_properties(filename='HLTJobOptions.db.json'):
109  '''Check a few important job options in the JSON file'''
110 
111  log = get_logger()
112 
113  with open(filename) as f:
114  props = json.load(f)['properties']
115 
116  def checkprop(comp, prop, regex):
117  value = props[comp][prop]
118  if re.match(regex, value) is None:
119  log.error('Property "%s.%s" does not match "%s". Current value: "%s"', comp, prop, regex, value)
120  return False
121  return True
122 
123  checks = [
124  checkprop('IOVDbSvc', 'CacheAlign', '0'),
125  checkprop('IOVDbSvc', 'CacheRun', '0'),
126  checkprop('IOVDbSvc', 'CacheTime', '0'),
127  checkprop('AtlasFieldMapCondAlg', 'LoadMapOnStart', 'True'),
128  checkprop('IOVDbSvc', 'Folders', r'.*/TRIGGER/LUMI/HLTPrefLumi\s*<extensible/>.*'),
129  checkprop('IOVDbSvc', 'Folders', r'.*/Indet/Onl/Beampos\s*<extensible/>.*'),
130  checkprop('IOVDbSvc', 'Folders', r'.*/TRIGGER/HLT/PrescaleKey <tag>HEAD</tag>\s*<extensible/>.*'),
131  ]
132  return 0 if all(checks) else 1
133 
134 

◆ decodeBS()

def python.TrigP1TestSteps.decodeBS (   stream_name,
  moduleID = 0 
)
Deserialise HLT data from ByteStream and save to an ESD file

Definition at line 165 of file TrigP1TestSteps.py.

165 def decodeBS(stream_name, moduleID=0):
166  '''Deserialise HLT data from ByteStream and save to an ESD file'''
167  from TrigValTools.TrigValSteering import ExecStep
168  from TrigValTools.TrigValSteering.Common import find_file
169  decodeStep = ExecStep.ExecStep('DecodeBS_'+stream_name)
170  decodeStep.type = 'other'
171  decodeStep.executable = 'python'
172  decodeStep.input = ''
173  decodeStep.explicit_input = True
174  decodeStep.args = f'-m TrigP1Test.DecodeBS --moduleID={moduleID} --filesInput=' + find_file('*'+stream_name+'*._athenaHLT*.data')
175  return decodeStep

◆ default_check_steps_OHMon()

def python.TrigP1TestSteps.default_check_steps_OHMon (   test,
  hist_path 
)

Definition at line 135 of file TrigP1TestSteps.py.

135 def default_check_steps_OHMon(test, hist_path):
136  steps = []
137  # Extract expert-monitoring.root file from OH server output
138  extract_hist = ExtractExpertMonitoring()
139  hist_path_split = hist_path.split(':')
140  if len(hist_path_split) > 1:
141  extract_hist.input_file = hist_path_split[0]
142  extract_hist.path_prefix = hist_path_split[1]
143  else:
144  extract_hist.input_file = hist_path
145  steps.append(extract_hist)
146  # Default check steps
147  steps.extend(CheckSteps.default_check_steps(test))
148  # Remove histogram merging step
149  matches = [step for step in steps if step.name == 'HistMerge']
150  for hm_step in matches:
151  steps.remove(hm_step)
152  return steps
153 

◆ filterBS()

def python.TrigP1TestSteps.filterBS (   stream_name)
Extract ByteStream data for a given stream from a file with multiple streams

Definition at line 154 of file TrigP1TestSteps.py.

154 def filterBS(stream_name):
155  '''Extract ByteStream data for a given stream from a file with multiple streams'''
156  from TrigValTools.TrigValSteering import ExecStep
157  from TrigValTools.TrigValSteering.Common import find_file
158  filterStep = ExecStep.ExecStep('FilterBS_'+stream_name)
159  filterStep.type = 'other'
160  filterStep.executable = 'trigbs_extractStream.py'
161  filterStep.input = ''
162  filterStep.args = '-s ' + stream_name + ' ' + find_file('*_HLTMPPy_output.*.data')
163  return filterStep
164 
python.TrigP1TestSteps.default_check_steps_OHMon
def default_check_steps_OHMon(test, hist_path)
Definition: TrigP1TestSteps.py:135
python.TrigP1TestSteps.check_hlt_properties
def check_hlt_properties(filename='HLTJobOptions.db.json')
Definition: TrigP1TestSteps.py:108
Cut::all
@ all
Definition: SUSYToolsAlg.cxx:67
python.TrigP1TestSteps.decodeBS
def decodeBS(stream_name, moduleID=0)
Definition: TrigP1TestSteps.py:165
python.DumperConfig.find_file
def find_file(fname, refPaths)
Definition: DumperConfig.py:14
python.TrigP1TestSteps.filterBS
def filterBS(stream_name)
Definition: TrigP1TestSteps.py:154
Trk::open
@ open
Definition: BinningType.h:40
python.TrigValSteering.Common.get_logger
def get_logger()
Definition: Common.py:33