ATLAS Offline Software
MCExecStep.py
Go to the documentation of this file.
1 #
2 # Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 #
4 
5 '''
6 Specialisation of ExecStep for MC production tests
7 '''
8 
9 
10 from TrigValTools.TrigValSteering.ExecStep import ExecStep
11 from TrigValTools.TrigMCCommonParams import mcDefaults
12 
13 class MCExecStep(ExecStep):
14  '''
15  Provides standard default settings for the MC test execution
16  '''
17 
18  def __init__(
19  self, name=None, menu=None, signatures=None,
20  global_tag=mcDefaults.global_tag, mc_campaign=mcDefaults.mc_campaign
21  ):
22  super(MCExecStep, self).__init__(name)
23 
24  assert menu is not None, "Menu must be supplied to MCExecStep"
25 
26  self.type = 'athena'
27  self.job_options = 'TriggerJobOpts/runHLT.py'
28 
29 
30  self.flags = [
31  f'Trigger.triggerMenuSetup="{menu}"',
32  f'IOVDb.GlobalTag="{global_tag}"'
33  ]
34  self.args += f'--preInclude "{mc_campaign}"'
35 
36  if signatures is not None:
37  enabled_signatures_str = ','.join([f'\\\"{sig}\\\"' for sig in signatures])
38  self.flags.append(f'Trigger.enabledSignatures=[{enabled_signatures_str}]')
39 
41  '''
42  Provides standard default settings for the MC test execution
43  '''
44 
45  def __init__(
46  self, name=None, menu=None, signatures=None,
47  global_tag=mcDefaults.global_tag, mc_campaign=mcDefaults.mc_campaign
48  ):
49  super(MCBuildStep, self).__init__(name, menu, signatures, global_tag, mc_campaign)
50  self.threads = 1
51 
53  '''
54  Provides standard default settings for the MC test execution
55  '''
56 
57  def __init__(
58  self, name=None, menu=None, signatures=None,
59  global_tag=mcDefaults.global_tag, mc_campaign=mcDefaults.mc_campaign,
60  ):
61  super(MCGridStep, self).__init__(name, menu, signatures, global_tag, mc_campaign)
62  self.threads = 8
63  self.concurrent_events = 8
MCExecStep.MCExecStep.flags
flags
Definition: MCExecStep.py:27
MCExecStep.MCBuildStep
Definition: MCExecStep.py:40
MCExecStep.MCGridStep.threads
threads
Definition: MCExecStep.py:59
MCExecStep.MCExecStep.type
type
Definition: MCExecStep.py:23
dumpHVPathFromNtuple.append
bool append
Definition: dumpHVPathFromNtuple.py:91
MCExecStep.MCExecStep.job_options
job_options
Definition: MCExecStep.py:24
MCExecStep.MCGridStep.__init__
def __init__(self, name=None, menu=None, signatures=None, global_tag=mcDefaults.global_tag, mc_campaign=mcDefaults.mc_campaign)
Definition: MCExecStep.py:57
MCExecStep.MCExecStep.__init__
def __init__(self, name=None, menu=None, signatures=None, global_tag=mcDefaults.global_tag, mc_campaign=mcDefaults.mc_campaign)
Definition: MCExecStep.py:18
MCExecStep.MCBuildStep.threads
threads
Definition: MCExecStep.py:47
TCS::join
std::string join(const std::vector< std::string > &v, const char c=',')
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/Root/StringUtils.cxx:10
MCExecStep.MCGridStep
Definition: MCExecStep.py:52
MCExecStep.MCExecStep
Definition: MCExecStep.py:13
MCExecStep.MCGridStep.concurrent_events
concurrent_events
Definition: MCExecStep.py:60
MCExecStep.MCBuildStep.__init__
def __init__(self, name=None, menu=None, signatures=None, global_tag=mcDefaults.global_tag, mc_campaign=mcDefaults.mc_campaign)
Definition: MCExecStep.py:45