ATLAS Offline Software
Functions | Variables
python.CreateTierZeroArgdict Namespace Reference

Functions

def resolve (tag)
 utility functions
More...
 
def evalDatasetNameFion (dsname, dsfionstr)
 

Variables

 parser
 command line argument parsing More...
 
 add_help
 
 True
 
 usage
 
 type
 
 str
 
 help
 
 dest
 
 int
 
 default
 
 args
 
 amitag
 
 dsname
 
 inputflname
 
 maxEvents
 
 ncores
 
 NoMergeTypeList
 
 taskstep
 
 partID
 
 partIDlist
 
 logfilename
 
 jsonflname
 
 jobargdict
 
 ami_tag_content
 
 phconfig
 
 parncores
 
 outputs
 
 dstype
 
 outdatasets
 
 parname
 
 dstp
 
 pcs
 
 pairs
 
 ifmatch
 
 m
 
 dsfionstr
 
 outdsname
 
 outfilename
 
 outfilevalue
 
 jobargdictfile
 
 sort_keys
 
 indent
 
 separators
 

Function Documentation

◆ evalDatasetNameFion()

def python.CreateTierZeroArgdict.evalDatasetNameFion (   dsname,
  dsfionstr 
)

Definition at line 103 of file CreateTierZeroArgdict.py.

103 def evalDatasetNameFion(dsname,dsfionstr):
104  # returns derived dsn or None
105  # raises 'error' in case of problems
106  tokens = dsfionstr.split()
107  if tokens[0] == 'lambda' :
108  dsfion=eval(dsfionstr)
109  newdsname=dsfion(dsname)
110  elif tokens[0] == 'replace' :
111  newdsname = dsname
112  pairs = tokens[1:]
113  while len(pairs) > 1 :
114  newdsname = newdsname.replace(pairs[0],pairs[1])
115  pairs = pairs[2:]
116  elif tokens[0] == 'replace_nth' :
117  parts = dsname.split('.')
118  pairs = tokens[1:]
119  while len(pairs) > 1 :
120  pos = int(pairs[0]) # pos starts counting from 1 !
121  new = pairs[1]
122  parts[pos-1] = new
123  pairs = pairs[2:]
124  newdsname = '.'.join(parts)
125  else :
126  print("ERROR >>> unexpected dsnamefion syntax")
127  raise Exception('error')
128  return newdsname
129 
130 
131 # Executed from the command line

◆ resolve()

def python.CreateTierZeroArgdict.resolve (   tag)

utility functions

Definition at line 73 of file CreateTierZeroArgdict.py.

73 def resolve(tag) :
74  try :
75  amiuser = ''
76  amipwd = ''
77  amiendpoint = 'atlas'
78  ami = pyAMI.client.Client(endpoint = amiendpoint)
79 
80  command = ['GetAMITagInfo','-amiTag=%s' % tag,]
81 
82  if amiuser and amipwd :
83  amires = ami.execute(command, format = 'dict_object', AMIUser = amiuser, AMIPass = amipwd)
84  else :
85  amires = ami.execute(command, format = 'dict_object')
86 
87  # extract the result
88  r = amires.get_rows('amiTagInfo')[0] # assuming simple tag, i.e. not chained
89  # TODO get rid of these empty strings/str/eval at some point
90  res = {'outputs' : eval(r.get('outputs','{}')),
91  'inputs' : eval(r.get('inputs','{}')),
92  'phconfig' : eval(r.get('phconfig','{}')),
93  'moreInfo' : eval(r.get('moreInfo','{}')),
94  'transformation' : str(r.get('transformation','')),
95  'trfsetupcmd' : str(r.get('trfsetupcmd','')),
96  }
97  except Exception:
98  traceback.print_exc()
99  res = 'error'
100  return res
101 
102 

Variable Documentation

◆ add_help

python.CreateTierZeroArgdict.add_help

Definition at line 21 of file CreateTierZeroArgdict.py.

◆ ami_tag_content

python.CreateTierZeroArgdict.ami_tag_content

Definition at line 155 of file CreateTierZeroArgdict.py.

◆ amitag

python.CreateTierZeroArgdict.amitag

Definition at line 58 of file CreateTierZeroArgdict.py.

◆ args

python.CreateTierZeroArgdict.args

Definition at line 50 of file CreateTierZeroArgdict.py.

◆ default

python.CreateTierZeroArgdict.default

Definition at line 39 of file CreateTierZeroArgdict.py.

◆ dest

python.CreateTierZeroArgdict.dest

Definition at line 39 of file CreateTierZeroArgdict.py.

◆ dsfionstr

python.CreateTierZeroArgdict.dsfionstr

Definition at line 213 of file CreateTierZeroArgdict.py.

◆ dsname

python.CreateTierZeroArgdict.dsname

Definition at line 59 of file CreateTierZeroArgdict.py.

◆ dstp

python.CreateTierZeroArgdict.dstp

Definition at line 195 of file CreateTierZeroArgdict.py.

◆ dstype

python.CreateTierZeroArgdict.dstype

Definition at line 190 of file CreateTierZeroArgdict.py.

◆ help

python.CreateTierZeroArgdict.help

Definition at line 34 of file CreateTierZeroArgdict.py.

◆ ifmatch

python.CreateTierZeroArgdict.ifmatch

Definition at line 207 of file CreateTierZeroArgdict.py.

◆ indent

python.CreateTierZeroArgdict.indent

Definition at line 241 of file CreateTierZeroArgdict.py.

◆ inputflname

python.CreateTierZeroArgdict.inputflname

Definition at line 60 of file CreateTierZeroArgdict.py.

◆ int

python.CreateTierZeroArgdict.int

Definition at line 39 of file CreateTierZeroArgdict.py.

◆ jobargdict

python.CreateTierZeroArgdict.jobargdict

Definition at line 152 of file CreateTierZeroArgdict.py.

◆ jobargdictfile

python.CreateTierZeroArgdict.jobargdictfile

Definition at line 240 of file CreateTierZeroArgdict.py.

◆ jsonflname

python.CreateTierZeroArgdict.jsonflname

Definition at line 151 of file CreateTierZeroArgdict.py.

◆ logfilename

python.CreateTierZeroArgdict.logfilename

Definition at line 150 of file CreateTierZeroArgdict.py.

◆ m

python.CreateTierZeroArgdict.m

Definition at line 210 of file CreateTierZeroArgdict.py.

◆ maxEvents

python.CreateTierZeroArgdict.maxEvents

Definition at line 63 of file CreateTierZeroArgdict.py.

◆ ncores

python.CreateTierZeroArgdict.ncores

Definition at line 64 of file CreateTierZeroArgdict.py.

◆ NoMergeTypeList

python.CreateTierZeroArgdict.NoMergeTypeList

Definition at line 65 of file CreateTierZeroArgdict.py.

◆ outdatasets

python.CreateTierZeroArgdict.outdatasets

Definition at line 191 of file CreateTierZeroArgdict.py.

◆ outdsname

python.CreateTierZeroArgdict.outdsname

Definition at line 216 of file CreateTierZeroArgdict.py.

◆ outfilename

python.CreateTierZeroArgdict.outfilename

Definition at line 236 of file CreateTierZeroArgdict.py.

◆ outfilevalue

python.CreateTierZeroArgdict.outfilevalue

Definition at line 237 of file CreateTierZeroArgdict.py.

◆ outputs

python.CreateTierZeroArgdict.outputs

Definition at line 189 of file CreateTierZeroArgdict.py.

◆ pairs

python.CreateTierZeroArgdict.pairs

Definition at line 201 of file CreateTierZeroArgdict.py.

◆ parname

python.CreateTierZeroArgdict.parname

Definition at line 194 of file CreateTierZeroArgdict.py.

◆ parncores

python.CreateTierZeroArgdict.parncores

Definition at line 174 of file CreateTierZeroArgdict.py.

◆ parser

python.CreateTierZeroArgdict.parser

command line argument parsing

Definition at line 21 of file CreateTierZeroArgdict.py.

◆ partID

python.CreateTierZeroArgdict.partID

Definition at line 135 of file CreateTierZeroArgdict.py.

◆ partIDlist

python.CreateTierZeroArgdict.partIDlist

Definition at line 137 of file CreateTierZeroArgdict.py.

◆ pcs

python.CreateTierZeroArgdict.pcs

Definition at line 200 of file CreateTierZeroArgdict.py.

◆ phconfig

python.CreateTierZeroArgdict.phconfig

Definition at line 160 of file CreateTierZeroArgdict.py.

◆ separators

python.CreateTierZeroArgdict.separators

Definition at line 241 of file CreateTierZeroArgdict.py.

◆ sort_keys

python.CreateTierZeroArgdict.sort_keys

Definition at line 241 of file CreateTierZeroArgdict.py.

◆ str

python.CreateTierZeroArgdict.str

Definition at line 34 of file CreateTierZeroArgdict.py.

◆ taskstep

python.CreateTierZeroArgdict.taskstep

Definition at line 67 of file CreateTierZeroArgdict.py.

◆ True

python.CreateTierZeroArgdict.True

Definition at line 21 of file CreateTierZeroArgdict.py.

◆ type

python.CreateTierZeroArgdict.type

Definition at line 34 of file CreateTierZeroArgdict.py.

◆ usage

python.CreateTierZeroArgdict.usage

Definition at line 21 of file CreateTierZeroArgdict.py.

python.CreateTierZeroArgdict.evalDatasetNameFion
def evalDatasetNameFion(dsname, dsfionstr)
Definition: CreateTierZeroArgdict.py:103
python.CreateTierZeroArgdict.resolve
def resolve(tag)
utility functions
Definition: CreateTierZeroArgdict.py:73
TCS::join
std::string join(const std::vector< std::string > &v, const char c=',')
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/Root/StringUtils.cxx:10
str
Definition: BTagTrackIpAccessor.cxx:11
dbg::print
void print(std::FILE *stream, std::format_string< Args... > fmt, Args &&... args)
Definition: SGImplSvc.cxx:70
python.CreateTierZeroArgdict.int
int
Definition: CreateTierZeroArgdict.py:39