ATLAS Offline Software
Public Member Functions | Public Attributes | List of all members
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

 command
 
 output_checks
 
 ID
 
 tag
 
 steps
 
 digest_checks
 
 skip_performance_checks
 
 run
 
 type
 
 setup
 
 logger
 

Detailed Description

Digitization with pile-up workflow test.

Definition at line 164 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 167 of file StandardTests.py.

167  def __init__(self, ID: str, run: WorkflowRun, type: WorkflowType, steps: List[str], setup: TestSetup, extra_args: str = "") -> None:
168  if "maxEvents" not in extra_args:
169  extra_args += " --maxEvents 5"
170 
171  if "StandardInTimeOnlyTruth" in extra_args:
172  input_high = input_HITS_minbias_high_fulltruth[run]
173  input_low = input_HITS_minbias_low_fulltruth[run]
174  else:
175  input_high = input_HITS_minbias_high[run]
176  input_low = input_HITS_minbias_low[run]
177 
178  self.command = \
179  (f"Digi_tf.py --AMIConfig {ID} --jobNumber 1 --digiSeedOffset1 1 --digiSeedOffset2 1"
180  f" --inputHITSFile {input_HITS_neutrino[run]} --inputHighPtMinbiasHitsFile {input_high} --inputLowPtMinbiasHitsFile {input_low} --outputRDOFile myRDO.pool.root"
181  f" --imf False {extra_args}")
182 
183  self.output_checks = [
184  FrozenTier0PolicyCheck(setup, "RDO", 5),
185  MetadataCheck(setup, "RDO"),
186  ]
187 
188  super().__init__(ID, run, type, steps, setup)
189 
190 

Member Function Documentation

◆ run_checks()

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

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

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

◆ run_reference()

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

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

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

◆ run_validation()

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

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

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

Member Data Documentation

◆ command

python.StandardTests.PileUpTest.command

Definition at line 178 of file StandardTests.py.

◆ digest_checks

python.Test.WorkflowTest.digest_checks
inherited

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

◆ ID

python.Test.WorkflowTest.ID
inherited

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

◆ logger

python.Test.WorkflowTest.logger
inherited

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

◆ output_checks

python.StandardTests.PileUpTest.output_checks

Definition at line 183 of file StandardTests.py.

◆ run

python.Test.WorkflowTest.run
inherited

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

◆ setup

python.Test.WorkflowTest.setup
inherited

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

◆ skip_performance_checks

python.Test.WorkflowTest.skip_performance_checks
inherited

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

◆ steps

python.Test.WorkflowTest.steps
inherited

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

◆ tag

python.Test.WorkflowTest.tag
inherited

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

◆ type

python.Test.WorkflowTest.type
inherited

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


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