ATLAS Offline Software
Functions | Variables
python.JOsupport Namespace Reference

Functions

def get_physics_short ()
 
def check_reset_proc_number (opts)
 
def ls_dir (directory)
 

Variables

 mglog = Logging.logging.getLogger('MCJobOptionUtils')
 

Function Documentation

◆ check_reset_proc_number()

def python.JOsupport.check_reset_proc_number (   opts)

Definition at line 23 of file JOsupport.py.

23 def check_reset_proc_number(opts):
24  if 'ATHENA_CORE_NUMBER' in os.environ and int(os.environ['ATHENA_CORE_NUMBER'])>0:
25  mglog.info('Noticed that you have run with an athena MT-like whole-node setup. Will re-configure now to make sure that the remainder of the job runs serially.')
26  # Try to modify the opts underfoot
27  if not hasattr(opts,'nprocs'):
28  mglog.warning('Did not see option!')
29  else:
30  opts.nprocs = 0
31  mglog.debug(str(opts))
32 
33 

◆ get_physics_short()

def python.JOsupport.get_physics_short ( )

Definition at line 12 of file JOsupport.py.

12 def get_physics_short():
13  FIRST_DIR = (os.environ['JOBOPTSEARCHPATH']).split(":")[0]
14  jofiles = [f for f in os.listdir(FIRST_DIR) if (f.startswith('mc') and f.endswith('.py'))]
15  if len(jofiles)==0:
16  raise RuntimeError('No job options found in '+FIRST_DIR)
17  joparts = os.path.basename(jofiles[0]).split('.')
18  if len(joparts)<2:
19  raise RuntimeError('Malformed job options file name: '+jofiles[0])
20  return joparts[1]
21 
22 

◆ ls_dir()

def python.JOsupport.ls_dir (   directory)

Definition at line 34 of file JOsupport.py.

34 def ls_dir(directory):
35  mglog.info('For your information, ls of '+directory+':')
36  mglog.info( sorted( os.listdir( directory ) ) )
37 
38 

Variable Documentation

◆ mglog

python.JOsupport.mglog = Logging.logging.getLogger('MCJobOptionUtils')

Definition at line 9 of file JOsupport.py.

python.JOsupport.check_reset_proc_number
def check_reset_proc_number(opts)
Definition: JOsupport.py:23
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
DerivationFramework::TriggerMatchingUtils::sorted
std::vector< typename T::value_type > sorted(T begin, T end)
Helper function to create a sorted vector from an unsorted one.
python.JOsupport.get_physics_short
def get_physics_short()
Definition: JOsupport.py:12
str
Definition: BTagTrackIpAccessor.cxx:11
python.JOsupport.ls_dir
def ls_dir(directory)
Definition: JOsupport.py:34
Trk::split
@ split
Definition: LayerMaterialProperties.h:38