ATLAS Offline Software
Public Member Functions | Public Attributes | List of all members
python.StandardTests.OverlayTest Class Reference
Inheritance diagram for python.StandardTests.OverlayTest:
Collaboration diagram for python.StandardTests.OverlayTest:

Public Member Functions

None __init__ (self, str ID, WorkflowRun run, WorkflowType type, List[str] steps, TestSetup setup, str extra_args="")
 
None run_reference (self)
 
None run_validation (self)
 
bool run_checks (self, List[WorkflowCheck] performance_checks)
 

Public Attributes

 command
 
 skip_performance_checks
 
 output_checks
 
 ID
 
 tag
 
 steps
 
 digest_checks
 
 run
 
 type
 
 setup
 
 logger
 

Detailed Description

MC overlay workflow test.

Definition at line 108 of file StandardTests.py.

Constructor & Destructor Documentation

◆ __init__()

None python.StandardTests.OverlayTest.__init__ (   self,
str  ID,
WorkflowRun  run,
WorkflowType  type,
List[str steps,
TestSetup  setup,
str   extra_args = "" 
)

Definition at line 111 of file StandardTests.py.

111  def __init__(self, ID: str, run: WorkflowRun, type: WorkflowType, steps: List[str], setup: TestSetup, extra_args: str = "") -> None:
112  if "maxEvents" not in extra_args:
113  extra_args += " --maxEvents 10"
114 
115  self.command = \
116  (f"Overlay_tf.py --AMIConfig {ID}"
117  f" --inputHITSFile {input_HITS[run]} --inputRDO_BKGFile {input_RDO_BKG[run]} --outputRDOFile myRDO.pool.root"
118  f" --imf False {extra_args}")
119 
120  # skip performance checks for now
121  self.skip_performance_checks = True
122 
123  self.output_checks = [
124  FrozenTier0PolicyCheck(setup, "RDO", 10),
125  MetadataCheck(setup, "RDO"),
126  ]
127 
128  super().__init__(ID, run, type, steps, setup)
129 
130 

Member Function Documentation

◆ run_checks()

bool python.Test.WorkflowTest.run_checks (   self,
List[WorkflowCheck performance_checks 
)
inherited

Definition at line 198 of file Tools/WorkflowTestRunner/python/Test.py.

198  def run_checks(self, performance_checks: List[WorkflowCheck]) -> bool:
199  self.logger.info("-----------------------------------------------------")
200  self.logger.info(f"----------- Post-processing of {self.ID} Test -----------")
201  result = True
202 
203  # digest checks
204  for check in self.digest_checks:
205  result = check.run(self) and result
206 
207  # output checks
208  if not self.setup.disable_output_checks:
209  for check in self.output_checks:
210  result = check.run(self) and result
211 
212  if self.setup.validation_only or self.skip_performance_checks:
213  return result # Performance checks against static references not possible
214 
215  # performance checks
216  for check in performance_checks:
217  result = check.run(self) and result
218 
219  return result

◆ run_reference()

None python.Test.WorkflowTest.run_reference (   self)
inherited

Definition at line 161 of file Tools/WorkflowTestRunner/python/Test.py.

161  def run_reference(self) -> None:
162  self.logger.info(f"Running reference in rel {self.setup.release_reference}")
163  self.logger.info(f"\"{self.command}\"")
164 
165  self.reference_path.mkdir(parents=True, exist_ok=True)
166 
167  cmd = (f"cd {self.reference_path};"
168  f"source $AtlasSetup/scripts/asetup.sh {self.setup.release_reference} >& /dev/null;")
169  cmd += f"TRF_NOECHO=1 {self.command} > {self.ID}.log 2>&1"
170 
171  subprocess.call(cmd, shell=True)
172 
173  self.logger.info(f"Finished clean in rel {self.setup.release_reference}")
174  self.logger.info(f"\"{self.command}\"")
175 

◆ run_validation()

None python.Test.WorkflowTest.run_validation (   self)
inherited

Definition at line 176 of file Tools/WorkflowTestRunner/python/Test.py.

176  def run_validation(self) -> None:
177  self.logger.info(f"Running validation in rel {self.setup.release_validation}")
178  self.logger.info(f"\"{self.command}\"")
179 
180  self.validation_path.mkdir(parents=True, exist_ok=True)
181 
182  cmd = f"cd {self.validation_path};"
183  if self.setup.disable_release_setup or not self.setup.release_validation:
184  pass
185  elif "WorkDir_DIR" in environ:
186  cmake_build_dir = environ["WorkDir_DIR"]
187  cmd += (f"source $AtlasSetup/scripts/asetup.sh {self.setup.release_validation} >& /dev/null;"
188  f"source {cmake_build_dir}/setup.sh;")
189  else:
190  cmd += f"source $AtlasSetup/scripts/asetup.sh {self.setup.release_validation} >& /dev/null;"
191  cmd += f"TRF_NOECHO=1 {self.command} > {self.ID}.log 2>&1"
192 
193  subprocess.call(cmd, shell=True)
194 
195  self.logger.info(f"Finished validation in rel {self.setup.release_validation}")
196  self.logger.info(f"\"{self.command}\"")
197 

Member Data Documentation

◆ command

python.StandardTests.OverlayTest.command

Definition at line 115 of file StandardTests.py.

◆ digest_checks

python.Test.WorkflowTest.digest_checks
inherited

Definition at line 149 of file Tools/WorkflowTestRunner/python/Test.py.

◆ ID

python.Test.WorkflowTest.ID
inherited

Definition at line 134 of file Tools/WorkflowTestRunner/python/Test.py.

◆ logger

python.Test.WorkflowTest.logger
inherited

Definition at line 157 of file Tools/WorkflowTestRunner/python/Test.py.

◆ output_checks

python.StandardTests.OverlayTest.output_checks

Definition at line 123 of file StandardTests.py.

◆ run

python.Test.WorkflowTest.run
inherited

Definition at line 154 of file Tools/WorkflowTestRunner/python/Test.py.

◆ setup

python.Test.WorkflowTest.setup
inherited

Definition at line 156 of file Tools/WorkflowTestRunner/python/Test.py.

◆ skip_performance_checks

python.StandardTests.OverlayTest.skip_performance_checks

Definition at line 121 of file StandardTests.py.

◆ steps

python.Test.WorkflowTest.steps
inherited

Definition at line 140 of file Tools/WorkflowTestRunner/python/Test.py.

◆ tag

python.Test.WorkflowTest.tag
inherited

Definition at line 137 of file Tools/WorkflowTestRunner/python/Test.py.

◆ type

python.Test.WorkflowTest.type
inherited

Definition at line 155 of file Tools/WorkflowTestRunner/python/Test.py.


The documentation for this class was generated from the following file:
grepfile.info
info
Definition: grepfile.py:38
plot_material.mkdir
def mkdir(path, recursive=True)
Definition: plot_material.py:16
python.processes.powheg.ZZ.ZZ.__init__
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Definition: ZZ.py:18
python.ScriptUtils.run_checks
bool run_checks(TestSetup setup, List[WorkflowTest] tests, List[WorkflowCheck] performance_checks)
Definition: ScriptUtils.py:269