ATLAS Offline Software
Loading...
Searching...
No Matches
python.StandardTests.PileUpTest Class Reference
Inheritance diagram for python.StandardTests.PileUpTest:
Collaboration diagram for python.StandardTests.PileUpTest:

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

 ID = ID
 tag = ID
 steps = steps
 command
list output_checks = []
list digest_checks = []
bool skip_performance_checks = False
 diff_tolerances = None
 run = run
 type = type
 setup = setup
 logger = setup.logger
Path validation_path = self.setup.validation_run_path / f"run_{self.ID}"
Path reference_path = self.setup.reference_run_path / f"run_{self.ID}"

Detailed Description

Digitization with pile-up workflow test.

Definition at line 176 of file StandardTests.py.

Constructor & Destructor Documentation

◆ __init__()

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

Definition at line 179 of file StandardTests.py.

179 def __init__(self, ID: str, run: WorkflowRun, type: WorkflowType, steps: list[str], setup: TestSetup, extra_args: str = "") -> None:
180 if "maxEvents" not in extra_args:
181 extra_args += " --maxEvents 5"
182
183 if "StandardInTimeOnlyTruth" in extra_args:
184 input_high = input_HITS_minbias_high_fulltruth[run]
185 input_low = input_HITS_minbias_low_fulltruth[run]
186 else:
187 input_high = input_HITS_minbias_high[run]
188 input_low = input_HITS_minbias_low[run]
189
190 self.command = \
191 (f"Digi_tf.py --AMIConfig {ID} --jobNumber 1 --digiSeedOffset1 1 --digiSeedOffset2 1"
192 f" --inputHITSFile {input_HITS_neutrino[run]} --inputHighPtMinbiasHitsFile {input_high} --inputLowPtMinbiasHitsFile {input_low} --outputRDOFile myRDO.pool.root"
193 f" --imf False {extra_args}")
194
195 self.output_checks = [
196 FrozenTier0PolicyCheck(setup, "RDO", 5),
197 MetadataCheck(setup, "RDO"),
198 ]
199
200 super().__init__(ID, run, type, steps, setup)
201
202

Member Function Documentation

◆ run_checks()

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

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

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

◆ run_reference()

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

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

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

◆ run_validation()

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

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

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

Member Data Documentation

◆ command

python.Test.WorkflowTest.command
inherited

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

◆ diff_tolerances

python.Test.WorkflowTest.diff_tolerances = None
inherited

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

◆ digest_checks

list python.Test.WorkflowTest.digest_checks = []
inherited

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

◆ ID

python.Test.WorkflowTest.ID = ID
inherited

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

◆ logger

python.Test.WorkflowTest.logger = setup.logger
inherited

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

◆ output_checks

list python.Test.WorkflowTest.output_checks = []
inherited

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

◆ reference_path

Path python.Test.WorkflowTest.reference_path = self.setup.reference_run_path / f"run_{self.ID}"
inherited

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

◆ run

python.Test.WorkflowTest.run = run
inherited

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

◆ setup

python.Test.WorkflowTest.setup = setup
inherited

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

◆ skip_performance_checks

bool python.Test.WorkflowTest.skip_performance_checks = False
inherited

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

◆ steps

python.Test.WorkflowTest.steps = steps
inherited

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

◆ tag

python.Test.WorkflowTest.tag = ID
inherited

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

◆ type

python.Test.WorkflowTest.type = type
inherited

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

◆ validation_path

Path python.Test.WorkflowTest.validation_path = self.setup.validation_run_path / f"run_{self.ID}"
inherited

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


The documentation for this class was generated from the following file: