ATLAS Offline Software
Classes | Functions | Variables
beamspotman Namespace Reference

Classes

class  BeamSpotOption
 

Functions

def check_commsep (option, opt, value)
 
def getT0DbConnection ()
 
def getTaskManager ()
 
def fail (message)
 
def dataset_from_run_and_tag (run, tag)
 
def run_jobs (script, ds_name, task_name, params, *args)
 

Variables

list __authors__ = ['Juerg Beringer', 'Carl Suster']
 
string __version__ = 'beamspotman.py atlas/athena'
 
string __usage__
 
string proddir = '/afs/cern.ch/user/a/atlidbs/jobs'
 
string produserfile = '/afs/cern.ch/user/a/atlidbs/private/produsers.dat'
 
string prodcoolpasswdfile = '/afs/cern.ch/user/a/atlidbs/private/coolinfo.dat'
 
string flaskcoolpasswdfile = '/afs/cern.ch/user/a/atlidbs/private/flaskinfo.dat'
 
string proddqcoolpasswdfile = '/afs/cern.ch/user/a/atlidbs/private/cooldqinfo.dat'
 
string tier0dbinfofile = '/afs/cern.ch/user/a/atlidbs/private/t0dbinfo.dat'
 
string beamspottag = ''
 
string backuppath = '/eos/atlas/atlascerngroupdisk/phys-beamspot/jobs/backup'
 
string archivepath = '/eos/atlas/atlascerngroupdisk/phys-beamspot/jobs/archive'
 
 parser = OptionParser(usage=__usage__, version=__version__, option_class=BeamSpotOption)
 
 g_input = OptionGroup(parser, 'Input file options')
 
 dest
 
 default
 
 False
 
 action
 
 help
 
 None
 
 g_mode = OptionGroup(parser, 'Mode flags')
 
 type
 
 g_deprecated = OptionGroup(parser, 'Deprecated Options')
 
 options
 
 args
 
 cmd = args[0]
 
 cmdargs = args[1:]
 
 dbfile = args[1]
 
 passwd = passwdfile.read().strip()
 
 flaskpasswd = flaskpasswdfile.read().strip()
 
 stat
 
 run = args[1]
 
 tag = args[2]
 
 dataset
 
 dsname = cmdargs[0]
 
bool lbinfoinfiles = True
 
string lboptions = '--lbperjob=10' if lbinfoinfiles else '--files-per-job=10'
 
string queue = options.batch_queue or '"tomorrow"'
 
dictionary params
 
 p = s.split('=',1)
 
 tmplist = glob.glob(args[1]+'/')
 
list dirlist = []
 
 d = dslash[:-1]
 
string baklog = d+'/backup.log'
 
 status = status >> 8
 
 output
 
 a = input('\nARE YOU SURE [n] ? ')
 
string tmpdir = '/tmp'
 
 outname = d.replace('/','-')+time.strftime('-%G_%m_%d.tar.gz')
 
string path = archivepath
 
 fs
 
 qual = ["where DSNAME like '%s' and TASKNAME like '%s'" % (dssel,tasksel)]
 
 taskname = cmdargs[1]
 
int steps = options.postprocsteps if len(cmdargs) < 3 else cmdargs[2].split(',')
 
 taskList
 
 t = taskman.getTaskDict(taskName[0], taskName[1])
 
 taskman
 
 BeamSpotPostProcessing
 
 forceRun
 
 requireSingleTask
 
 True
 
 confirmWithUser
 
 batch
 
 addWildCards
 
string ignoremode = '--passopt="--appendlocked --ignoremode %s"' % options.ignoremode
 
string batchmode = '--batch'
 
string uploadflag = dbfile[0]+'.uploaded'
 
string cooltags = options.beamspottag
 
string nextbeamspot = ''
 
string dir = os.path.join(dsname, task)
 
string griddsname = '%s.%s-%s' % (options.griduser,dsname,task)
 
 statfile = glob.glob('%s/000/*.status.SUBMITTED' % (dir))
 
 basename = statfile[0][:-17]
 
 tags = task.split('.')[-1]
 
string t0TaskName = '%s.recon.ESD.%s.beamspotproc.task' % (dsname,tags)
 
def oracle = getT0DbConnection()
 
def cur = oracle.cursor()
 
 sql = str("SELECT status FROM tasks WHERE taskname='%s' AND tasktype='beamspotproc'" % t0TaskName)
 
def r = cur.fetchall()
 
 dssel = args[1]
 
 tasksel = args[2]
 
 runnr = t['RUNNR']
 
 n = taskman.getNTasks(["where DSNAME ='%s' and TASKNAME like '%s'" % (dsname,options.excludeiftask)])
 
 excludeList = options.excludeds.split(',')
 
 out
 
 fullcmd = cmd % t
 
 earliestUpdateTime = time.time()-float(args[1])
 
 onDiskCode = TaskManager.OnDiskCodes['ALLONDISK']
 
 taskName = t['TASKNAME']
 
 datatag = taskName.split('.')[-1].split('_')[0]
 
string monTaskName = 'MON.%s.%s' % (taskName,datatag)
 
bool useRun = True
 
 m = next(taskman.taskIterDict('*',["where RUNNR =",DbParam(runnr),"and DSNAME =",DbParam(dsname),"and TASKNAME =",DbParam(monTaskName),"order by UPDATED desc"]))
 
 ptag = dsname.split('.')[0]
 
 stream = dsname.split('.')[2]
 
 fulldatatag = taskName.split('.')[-1]
 
string bstag = cooltags.split()[0]
 
string filter = 'AOD'
 
string t0dsname = '%s.merge.AOD.%s%%' % (dsname, datatag)
 
 c = getJobConfig('.',dsname,taskName)
 
bool submitjob = True
 
 eospath = options.eospath
 
string origt0TaskName = '%s.recon.AOD.%s%%.aodmerge.task' % (dsname,datatag)
 
string paramValues = ''
 
string testFlag = ''
 
 archivedCode = TaskManager.OnDiskCodes.get('RESULTSONDISK',None) if options.resultsondisk else TaskManager.OnDiskCodes.get('ARCHIVED',None)
 
list exceptList = ['*dqflags.txt', '*.gif', '*.pdf', '*.config.py*', '*.argdict.gpickle', '*.AveBeamSpot.log', '*.PlotBeamSpotCompareReproc.log', '*.sh', '*.BeamSpotNt*', '*.BeamSpotGlobalNt.log', '*.status.*', '*.exit.*']
 
string oscmd = "find %s ! \‍( -name '%s' \‍) -type f -exec rm {} \;" % (dir, "' -or -name '".join(exceptList))
 
string basepath = os.path.join(os.getcwd(), dsname, taskname)
 
 dircontents = os.listdir(basepath)
 
string condorScriptTemplate
 
string jobname = dir
 
string fullpath = os.path.join(basepath, dir)
 
bool isRunning = False
 
bool isFailed = False
 
dictionary jobConfig
 
string condorScript = condorScriptTemplate % jobConfig
 
 script = open('condorSubmit.sub','w')
 
string batchCmd = 'condor_submit condorSubmit.sub'
 
 jobopts = args[1]
 
 inputdata = args[4]
 
 lbperjob = options.lbperjob
 
list files = []
 
dictionary lbMap = {}
 
 backend = DiskUtils.EOS() if options.eos else None
 
dictionary jobFileDict = {}
 
dictionary jobLBDict = {}
 
int jobId = 1
 
 lbs = sorted(lbMap[f.split('/')[-1]])
 
int jobnr = i*lbperjob+1
 
list intlbs = []
 
 runner
 
 comment
 
dictionary jobParams = {}
 
 coolQuery = COOLQuery()
 
 lbTimes = coolQuery.getLbTimes( getRunFromName(dsname, None, True) )
 
 tokens = line.split()
 
 plbnr
 
 tstart
 
 tend
 
list rlbs = [lb for (lb,time) in lbTimes.items() if (time[0] - tend/1e9)*(time[1] - tstart/1e9) < 0]
 
list filenames = []
 
string bcidTaskName = 'BCID.%s.%s' % (taskName,datatag)
 
 folderHandle = openBeamSpotDbFile(dbfile, dbName = 'OFLP200', forceNew = True)
 
int runMin = options.runMin if options.runMin is not None else 0
 
int runMax = options.runMax if options.runMax is not None else (1 << 31)-1
 
 posX
 
 posY
 
 posZ
 
 sigmaX
 
 sigmaY
 
 sigmaZ
 
 tiltX
 
 tiltY
 
 sigmaXY
 
 posXErr
 
 posYErr
 
 posZErr
 
 sigmaXErr
 
 sigmaYErr
 
 sigmaZErr
 
 tiltXErr
 
 tiltYErr
 
 sigmaXYErr
 
 dbName = options.destdbname
 

Function Documentation

◆ check_commsep()

def beamspotman.check_commsep (   option,
  opt,
  value 
)

Definition at line 76 of file beamspotman.py.

76 def check_commsep(option, opt, value):
77  return re.split('\s*,\s*|\s+', value)

◆ dataset_from_run_and_tag()

def beamspotman.dataset_from_run_and_tag (   run,
  tag 
)
Given a run number and tag, check input dataset and work out name. 

Definition at line 206 of file beamspotman.py.

206 def dataset_from_run_and_tag(run, tag):
207  ''' Given a run number and tag, check input dataset and work out name. '''
208  fs = DiskUtils.FileSet.from_ds_info(run,
209  project=options.project,
210  stream=options.stream,
211  base=options.eospath)
212  datasets = list(fs
213  .strict_mode()
214  .use_files_from(options.filelist)
215  .matching(options.filter + tag + '.*')
216  .excluding(r'.*\.TMP\.log.*')
217  .only_single_dataset())
218  dataset = os.path.dirname(datasets[0])
219  dsname = '.'.join(os.path.basename(datasets[0]).split('.')[:3])
220  return (dataset, dsname)
221 

◆ fail()

def beamspotman.fail (   message)

Definition at line 201 of file beamspotman.py.

201 def fail(message):
202  print()
203  print ('ERROR:', message)
204  sys.exit(1)
205 

◆ getT0DbConnection()

def beamspotman.getT0DbConnection ( )

Definition at line 169 of file beamspotman.py.

169 def getT0DbConnection():
170  try:
171  with open(tier0dbinfofile, 'r') as dbinfofile:
172  connstring = dbinfofile.read().strip()
173  except:
174  sys.exit('ERROR: Unable to read connection information for Tier-0 database')
175  dbtype, dbname = connstring.split(':',1)
176  if dbtype!='oracle':
177  sys.exit('ERROR: Invalid T0 connection string')
178  import cx_Oracle
179  try:
180  oracle = cx_Oracle.connect(dbname)
181  except:
182  print ('ERROR: First connection attempt to Tier-0 Oracle database failed; will retry in 10s ...')
183  try:
184  time.sleep(10)
185  oracle = cx_Oracle.connect(dbname)
186  except Exception as e:
187  print (e)
188  sys.exit('ERROR: Unable to connect to Tier-0 Oracle database')
189  if not oracle:
190  sys.exit('ERROR: Unable to connect to Tier-0 Oracle database (invalid cx_Oracle connection)')
191  return oracle
192 

◆ getTaskManager()

def beamspotman.getTaskManager ( )
Open task manager (used by all following commands, at the very least through subcommands) 

Definition at line 193 of file beamspotman.py.

193 def getTaskManager():
194  ''' Open task manager (used by all following commands, at the very least through subcommands) '''
195  try:
196  return TaskManager(options.dbconn)
197  except:
198  print ('ERROR: Unable to access task manager database %s' % options.dbconn)
199  sys.exit(1)
200 

◆ run_jobs()

def beamspotman.run_jobs (   script,
  ds_name,
  task_name,
  params,
args 
)
Invoke runJobs.py 

Definition at line 222 of file beamspotman.py.

222 def run_jobs(script, ds_name, task_name, params, *args):
223  ''' Invoke runJobs.py '''
224  arg_list = ['runJobs']
225  arg_list.extend(map(str, args))
226  if params:
227  param_args = []
228  for k,v in params.items():
229  param_args.append("{}={}".format(k,repr(v)))
230  arg_list.extend(['--params', ', '.join(param_args)])
231  if options.testonly:
232  arg_list.append('--test')
233  arg_list.extend([script, ds_name, task_name])
234 
235  print (subprocess.list2cmdline(arg_list))
236  subprocess.check_call(arg_list)
237 
238 #
239 # Upload any SQLite file to COOL (independent of task, w/o book keeping)
240 #

Variable Documentation

◆ __authors__

list beamspotman.__authors__ = ['Juerg Beringer', 'Carl Suster']
private

Definition at line 10 of file beamspotman.py.

◆ __usage__

string beamspotman.__usage__
private

Definition at line 12 of file beamspotman.py.

◆ __version__

string beamspotman.__version__ = 'beamspotman.py atlas/athena'
private

Definition at line 11 of file beamspotman.py.

◆ a

beamspotman.a = input('\nARE YOU SURE [n] ? ')

Definition at line 408 of file beamspotman.py.

◆ action

beamspotman.action

Definition at line 86 of file beamspotman.py.

◆ addWildCards

beamspotman.addWildCards

Definition at line 536 of file beamspotman.py.

◆ archivedCode

beamspotman.archivedCode = TaskManager.OnDiskCodes.get('RESULTSONDISK',None) if options.resultsondisk else TaskManager.OnDiskCodes.get('ARCHIVED',None)

Definition at line 950 of file beamspotman.py.

◆ archivepath

string beamspotman.archivepath = '/eos/atlas/atlascerngroupdisk/phys-beamspot/jobs/archive'

Definition at line 57 of file beamspotman.py.

◆ args

beamspotman.args

Definition at line 148 of file beamspotman.py.

◆ backend

beamspotman.backend = DiskUtils.EOS() if options.eos else None

Definition at line 1134 of file beamspotman.py.

◆ backuppath

string beamspotman.backuppath = '/eos/atlas/atlascerngroupdisk/phys-beamspot/jobs/backup'

Definition at line 56 of file beamspotman.py.

◆ baklog

string beamspotman.baklog = d+'/backup.log'

Definition at line 386 of file beamspotman.py.

◆ basename

beamspotman.basename = statfile[0][:-17]

Definition at line 640 of file beamspotman.py.

◆ basepath

string beamspotman.basepath = os.path.join(os.getcwd(), dsname, taskname)

Definition at line 1018 of file beamspotman.py.

◆ batch

beamspotman.batch

Definition at line 536 of file beamspotman.py.

◆ batchCmd

string beamspotman.batchCmd = 'condor_submit condorSubmit.sub'

Definition at line 1087 of file beamspotman.py.

◆ batchmode

string beamspotman.batchmode = '--batch'

Definition at line 570 of file beamspotman.py.

◆ bcidTaskName

string beamspotman.bcidTaskName = 'BCID.%s.%s' % (taskName,datatag)

Definition at line 1541 of file beamspotman.py.

◆ BeamSpotPostProcessing

beamspotman.BeamSpotPostProcessing

Definition at line 524 of file beamspotman.py.

◆ beamspottag

beamspotman.beamspottag = ''

Definition at line 55 of file beamspotman.py.

◆ bstag

string beamspotman.bstag = cooltags.split()[0]

Definition at line 858 of file beamspotman.py.

◆ c

beamspotman.c = getJobConfig('.',dsname,taskName)

Definition at line 866 of file beamspotman.py.

◆ cmd

string beamspotman.cmd = args[0]

Definition at line 150 of file beamspotman.py.

◆ cmdargs

beamspotman.cmdargs = args[1:]

Definition at line 151 of file beamspotman.py.

◆ comment

beamspotman.comment

Definition at line 1216 of file beamspotman.py.

◆ condorScript

string beamspotman.condorScript = condorScriptTemplate % jobConfig

Definition at line 1080 of file beamspotman.py.

◆ condorScriptTemplate

string beamspotman.condorScriptTemplate
Initial value:
1 = """executable = %(scriptfile)s
2 arguments = $(ClusterID) $(ProcId)
3 output = %(logfile)s.out
4 error = %(logfile)s.err
5 log = %(logfile)s.log
6 universe = vanilla
7 +JobFlavour = %(batchqueue)s
8 queue
9 """

Definition at line 1021 of file beamspotman.py.

◆ confirmWithUser

beamspotman.confirmWithUser

Definition at line 536 of file beamspotman.py.

◆ coolQuery

beamspotman.coolQuery = COOLQuery()

Definition at line 1275 of file beamspotman.py.

◆ cooltags

beamspotman.cooltags = options.beamspottag

Definition at line 587 of file beamspotman.py.

◆ cur

def beamspotman.cur = oracle.cursor()

Definition at line 671 of file beamspotman.py.

◆ d

beamspotman.d = dslash[:-1]

Definition at line 384 of file beamspotman.py.

◆ dataset

beamspotman.dataset

Definition at line 286 of file beamspotman.py.

◆ datatag

beamspotman.datatag = taskName.split('.')[-1].split('_')[0]

Definition at line 816 of file beamspotman.py.

◆ dbfile

string beamspotman.dbfile = args[1]

Definition at line 242 of file beamspotman.py.

◆ dbName

beamspotman.dbName = options.destdbname

Definition at line 1653 of file beamspotman.py.

◆ default

beamspotman.default

Definition at line 86 of file beamspotman.py.

◆ dest

beamspotman.dest

Definition at line 86 of file beamspotman.py.

◆ dir

string beamspotman.dir = os.path.join(dsname, task)

Definition at line 623 of file beamspotman.py.

◆ dircontents

beamspotman.dircontents = os.listdir(basepath)

Definition at line 1019 of file beamspotman.py.

◆ dirlist

list beamspotman.dirlist = []

Definition at line 382 of file beamspotman.py.

◆ dsname

beamspotman.dsname = cmdargs[0]

Definition at line 286 of file beamspotman.py.

◆ dssel

beamspotman.dssel = args[1]

Definition at line 696 of file beamspotman.py.

◆ earliestUpdateTime

int beamspotman.earliestUpdateTime = time.time()-float(args[1])

Definition at line 795 of file beamspotman.py.

◆ eospath

string beamspotman.eospath = options.eospath

Definition at line 874 of file beamspotman.py.

◆ exceptList

list beamspotman.exceptList = ['*dqflags.txt', '*.gif', '*.pdf', '*.config.py*', '*.argdict.gpickle', '*.AveBeamSpot.log', '*.PlotBeamSpotCompareReproc.log', '*.sh', '*.BeamSpotNt*', '*.BeamSpotGlobalNt.log', '*.status.*', '*.exit.*']

Definition at line 951 of file beamspotman.py.

◆ excludeList

beamspotman.excludeList = options.excludeds.split(',')

Definition at line 739 of file beamspotman.py.

◆ False

beamspotman.False

Definition at line 86 of file beamspotman.py.

◆ filenames

list beamspotman.filenames = []

Definition at line 1298 of file beamspotman.py.

◆ files

dictionary beamspotman.files = []

Definition at line 1114 of file beamspotman.py.

◆ filter

string beamspotman.filter = 'AOD'

Definition at line 860 of file beamspotman.py.

◆ flaskcoolpasswdfile

string beamspotman.flaskcoolpasswdfile = '/afs/cern.ch/user/a/atlidbs/private/flaskinfo.dat'

Definition at line 52 of file beamspotman.py.

◆ flaskpasswd

beamspotman.flaskpasswd = flaskpasswdfile.read().strip()

Definition at line 253 of file beamspotman.py.

◆ folderHandle

beamspotman.folderHandle = openBeamSpotDbFile(dbfile, dbName = 'OFLP200', forceNew = True)

Definition at line 1616 of file beamspotman.py.

◆ forceRun

beamspotman.forceRun

Definition at line 524 of file beamspotman.py.

◆ fs

beamspotman.fs
Initial value:
1 = DiskUtils.FileSet.from_ds_info(run,
2  project=options.project,
3  stream=options.stream,
4  base=options.eospath)

Definition at line 470 of file beamspotman.py.

◆ fullcmd

beamspotman.fullcmd = cmd % t

Definition at line 781 of file beamspotman.py.

◆ fulldatatag

beamspotman.fulldatatag = taskName.split('.')[-1]

Definition at line 850 of file beamspotman.py.

◆ fullpath

string beamspotman.fullpath = os.path.join(basepath, dir)

Definition at line 1039 of file beamspotman.py.

◆ g_deprecated

beamspotman.g_deprecated = OptionGroup(parser, 'Deprecated Options')

Definition at line 144 of file beamspotman.py.

◆ g_input

beamspotman.g_input = OptionGroup(parser, 'Input file options')

Definition at line 85 of file beamspotman.py.

◆ g_mode

beamspotman.g_mode = OptionGroup(parser, 'Mode flags')

Definition at line 98 of file beamspotman.py.

◆ griddsname

string beamspotman.griddsname = '%s.%s-%s' % (options.griduser,dsname,task)

Definition at line 624 of file beamspotman.py.

◆ help

beamspotman.help

Definition at line 86 of file beamspotman.py.

◆ ignoremode

string beamspotman.ignoremode = '--passopt="--appendlocked --ignoremode %s"' % options.ignoremode

Definition at line 566 of file beamspotman.py.

◆ inputdata

beamspotman.inputdata = args[4]

Definition at line 1109 of file beamspotman.py.

◆ intlbs

list beamspotman.intlbs = []

Definition at line 1185 of file beamspotman.py.

◆ isFailed

bool beamspotman.isFailed = False

Definition at line 1042 of file beamspotman.py.

◆ isRunning

bool beamspotman.isRunning = False

Definition at line 1041 of file beamspotman.py.

◆ jobConfig

dictionary beamspotman.jobConfig
Initial value:
1 = {
2  'test': 'this',
3  'batchqueue' : queue,
4  'jobname' : jobname,
5  'jobdir' : fullpath,
6  }

Definition at line 1071 of file beamspotman.py.

◆ jobFileDict

dictionary beamspotman.jobFileDict = {}

Definition at line 1143 of file beamspotman.py.

◆ jobId

beamspotman.jobId = 1

Definition at line 1148 of file beamspotman.py.

◆ jobLBDict

dictionary beamspotman.jobLBDict = {}

Definition at line 1144 of file beamspotman.py.

◆ jobname

string beamspotman.jobname = dir

Definition at line 1036 of file beamspotman.py.

◆ jobnr

int beamspotman.jobnr = i*lbperjob+1

Definition at line 1180 of file beamspotman.py.

◆ jobopts

beamspotman.jobopts = args[1]

Definition at line 1106 of file beamspotman.py.

◆ jobParams

dictionary beamspotman.jobParams = {}

Definition at line 1270 of file beamspotman.py.

◆ lbinfoinfiles

bool beamspotman.lbinfoinfiles = True

Definition at line 329 of file beamspotman.py.

◆ lbMap

dictionary beamspotman.lbMap = {}

Definition at line 1133 of file beamspotman.py.

◆ lboptions

string beamspotman.lboptions = '--lbperjob=10' if lbinfoinfiles else '--files-per-job=10'

Definition at line 334 of file beamspotman.py.

◆ lbperjob

beamspotman.lbperjob = options.lbperjob

Definition at line 1111 of file beamspotman.py.

◆ lbs

beamspotman.lbs = sorted(lbMap[f.split('/')[-1]])

Definition at line 1154 of file beamspotman.py.

◆ lbTimes

beamspotman.lbTimes = coolQuery.getLbTimes( getRunFromName(dsname, None, True) )

Definition at line 1277 of file beamspotman.py.

◆ m

beamspotman.m = next(taskman.taskIterDict('*',["where RUNNR =",DbParam(runnr),"and DSNAME =",DbParam(dsname),"and TASKNAME =",DbParam(monTaskName),"order by UPDATED desc"]))

Definition at line 826 of file beamspotman.py.

◆ monTaskName

string beamspotman.monTaskName = 'MON.%s.%s' % (taskName,datatag)

Definition at line 817 of file beamspotman.py.

◆ n

beamspotman.n = taskman.getNTasks(["where DSNAME ='%s' and TASKNAME like '%s'" % (dsname,options.excludeiftask)])

Definition at line 731 of file beamspotman.py.

◆ nextbeamspot

string beamspotman.nextbeamspot = ''

Definition at line 593 of file beamspotman.py.

◆ None

beamspotman.None

Definition at line 94 of file beamspotman.py.

◆ onDiskCode

beamspotman.onDiskCode = TaskManager.OnDiskCodes['ALLONDISK']

Definition at line 805 of file beamspotman.py.

◆ options

beamspotman.options

Definition at line 148 of file beamspotman.py.

◆ oracle

def beamspotman.oracle = getT0DbConnection()

Definition at line 670 of file beamspotman.py.

◆ origt0TaskName

string beamspotman.origt0TaskName = '%s.recon.AOD.%s%%.aodmerge.task' % (dsname,datatag)

Definition at line 889 of file beamspotman.py.

◆ oscmd

string beamspotman.oscmd = "find %s ! \‍( -name '%s' \‍) -type f -exec rm {} \;" % (dir, "' -or -name '".join(exceptList))

Definition at line 990 of file beamspotman.py.

◆ out

beamspotman.out

Definition at line 746 of file beamspotman.py.

◆ outname

string beamspotman.outname = d.replace('/','-')+time.strftime('-%G_%m_%d.tar.gz')

Definition at line 414 of file beamspotman.py.

◆ output

beamspotman.output

Definition at line 389 of file beamspotman.py.

◆ p

dictionary beamspotman.p = s.split('=',1)

Definition at line 360 of file beamspotman.py.

◆ params

dictionary beamspotman.params
Initial value:
1 = {
2  'cmdjobpreprocessing' : 'export STAGE_SVCCLASS=atlcal; export ATLAS_LOCAL_ROOT_BASE=/cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase',
3  'useBeamSpot' : True,
4  'beamspottag' : options.beamspottag
5  }

Definition at line 350 of file beamspotman.py.

◆ paramValues

string beamspotman.paramValues = ''

Definition at line 907 of file beamspotman.py.

◆ parser

beamspotman.parser = OptionParser(usage=__usage__, version=__version__, option_class=BeamSpotOption)

Definition at line 83 of file beamspotman.py.

◆ passwd

beamspotman.passwd = passwdfile.read().strip()

Definition at line 247 of file beamspotman.py.

◆ path

string beamspotman.path = archivepath

Definition at line 415 of file beamspotman.py.

◆ plbnr

beamspotman.plbnr

Definition at line 1285 of file beamspotman.py.

◆ posX

beamspotman.posX

Definition at line 1624 of file beamspotman.py.

◆ posXErr

beamspotman.posXErr

Definition at line 1629 of file beamspotman.py.

◆ posY

beamspotman.posY

Definition at line 1624 of file beamspotman.py.

◆ posYErr

beamspotman.posYErr

Definition at line 1629 of file beamspotman.py.

◆ posZ

beamspotman.posZ

Definition at line 1624 of file beamspotman.py.

◆ posZErr

beamspotman.posZErr

Definition at line 1629 of file beamspotman.py.

◆ prodcoolpasswdfile

string beamspotman.prodcoolpasswdfile = '/afs/cern.ch/user/a/atlidbs/private/coolinfo.dat'

Definition at line 51 of file beamspotman.py.

◆ proddir

beamspotman.proddir = '/afs/cern.ch/user/a/atlidbs/jobs'

Definition at line 49 of file beamspotman.py.

◆ proddqcoolpasswdfile

string beamspotman.proddqcoolpasswdfile = '/afs/cern.ch/user/a/atlidbs/private/cooldqinfo.dat'

Definition at line 53 of file beamspotman.py.

◆ produserfile

string beamspotman.produserfile = '/afs/cern.ch/user/a/atlidbs/private/produsers.dat'

Definition at line 50 of file beamspotman.py.

◆ ptag

beamspotman.ptag = dsname.split('.')[0]

Definition at line 847 of file beamspotman.py.

◆ qual

list beamspotman.qual = ["where DSNAME like '%s' and TASKNAME like '%s'" % (dssel,tasksel)]

Definition at line 481 of file beamspotman.py.

◆ queue

string beamspotman.queue = options.batch_queue or '"tomorrow"'

Definition at line 347 of file beamspotman.py.

◆ r

def beamspotman.r = cur.fetchall()

Definition at line 676 of file beamspotman.py.

◆ requireSingleTask

beamspotman.requireSingleTask

Definition at line 536 of file beamspotman.py.

◆ rlbs

list beamspotman.rlbs = [lb for (lb,time) in lbTimes.items() if (time[0] - tend/1e9)*(time[1] - tstart/1e9) < 0]

Definition at line 1295 of file beamspotman.py.

◆ run

beamspotman.run = args[1]

Definition at line 284 of file beamspotman.py.

◆ runMax

int beamspotman.runMax = options.runMax if options.runMax is not None else (1 << 31)-1

Definition at line 1619 of file beamspotman.py.

◆ runMin

int beamspotman.runMin = options.runMin if options.runMin is not None else 0

Definition at line 1618 of file beamspotman.py.

◆ runner

beamspotman.runner
Initial value:
1 = HTCondorJobRunner.HTCondorJobRunner(
2  jobnr=jobnr,
3  jobdir=os.path.join(os.getcwd(), dsname, taskname, jobname),
4  jobname=jobname,
5  inputds='',
6  inputfiles=files,
7  joboptionpath=jobopts,
8  filesperjob=len(files),
9  batchqueue=queue,
10  addinputtopoolcatalog=True,
11  taskpostprocsteps='ReprocVertexDefaultProcessing',
12  #outputfilelist=['dpd.root', 'nt.root', 'monitoring,root', 'beamspot.db'],
13  autoconfparams='DetDescrVersion',
14  returnstatuscode=True,
15  comment=cmd,
16  **params)

Definition at line 1192 of file beamspotman.py.

◆ runnr

beamspotman.runnr = t['RUNNR']

Definition at line 724 of file beamspotman.py.

◆ script

beamspotman.script = open('condorSubmit.sub','w')

Definition at line 1082 of file beamspotman.py.

◆ sigmaX

beamspotman.sigmaX

Definition at line 1625 of file beamspotman.py.

◆ sigmaXErr

beamspotman.sigmaXErr

Definition at line 1630 of file beamspotman.py.

◆ sigmaXY

beamspotman.sigmaXY

Definition at line 1628 of file beamspotman.py.

◆ sigmaXYErr

beamspotman.sigmaXYErr

Definition at line 1632 of file beamspotman.py.

◆ sigmaY

beamspotman.sigmaY

Definition at line 1625 of file beamspotman.py.

◆ sigmaYErr

beamspotman.sigmaYErr

Definition at line 1630 of file beamspotman.py.

◆ sigmaZ

beamspotman.sigmaZ

Definition at line 1625 of file beamspotman.py.

◆ sigmaZErr

beamspotman.sigmaZErr

Definition at line 1630 of file beamspotman.py.

◆ sql

beamspotman.sql = str("SELECT status FROM tasks WHERE taskname='%s' AND tasktype='beamspotproc'" % t0TaskName)

Definition at line 674 of file beamspotman.py.

◆ stat

beamspotman.stat
Initial value:
1 = os.system('/afs/cern.ch/user/a/atlcond/utilsproxy/AtlCoolMerge.py --flask --nobackup --client_id cool-flask-beamspot-client --client_secret %s --nomail %s %s --folder /Indet/Beampos --tag %s --retag %s --destdb %s %s %s ATONR_COOLOFL_GPN ATLAS_COOLOFL_INDET_W %s' % (
2  flaskpasswd,
3  '--batch' if options.batch else '',
4  ('--ignoremode %s' % options.ignoremode) if options.ignoremode else '',
5  options.srctag,
6  options.beamspottag,
7  options.destdbname,
8  dbfile,
9  options.srcdbname,
10  passwd))

Definition at line 266 of file beamspotman.py.

◆ statfile

beamspotman.statfile = glob.glob('%s/000/*.status.SUBMITTED' % (dir))

Definition at line 634 of file beamspotman.py.

◆ status

int beamspotman.status = status >> 8

Definition at line 389 of file beamspotman.py.

◆ steps

beamspotman.steps = options.postprocsteps if len(cmdargs) < 3 else cmdargs[2].split(',')

Definition at line 505 of file beamspotman.py.

◆ stream

beamspotman.stream = dsname.split('.')[2]

Definition at line 848 of file beamspotman.py.

◆ submitjob

bool beamspotman.submitjob = True

Definition at line 873 of file beamspotman.py.

◆ t

beamspotman.t = taskman.getTaskDict(taskName[0], taskName[1])

Definition at line 522 of file beamspotman.py.

◆ t0dsname

string beamspotman.t0dsname = '%s.merge.AOD.%s%%' % (dsname, datatag)

Definition at line 862 of file beamspotman.py.

◆ t0TaskName

string beamspotman.t0TaskName = '%s.recon.ESD.%s.beamspotproc.task' % (dsname,tags)

Definition at line 662 of file beamspotman.py.

◆ tag

beamspotman.tag = args[2]

Definition at line 285 of file beamspotman.py.

◆ tags

beamspotman.tags = task.split('.')[-1]

Definition at line 659 of file beamspotman.py.

◆ taskList

list beamspotman.taskList
Initial value:
1 = getFullTaskNames(taskman,
2  dsname,
3  taskname,
4  confirmWithUser=not options.batch,
5  addWildCards=not options.nowildcards)

Definition at line 514 of file beamspotman.py.

◆ taskman

beamspotman.taskman

Definition at line 524 of file beamspotman.py.

◆ taskname

beamspotman.taskname = cmdargs[1]

Definition at line 500 of file beamspotman.py.

◆ taskName

beamspotman.taskName = t['TASKNAME']

Definition at line 815 of file beamspotman.py.

◆ tasksel

beamspotman.tasksel = args[2]

Definition at line 697 of file beamspotman.py.

◆ tend

beamspotman.tend

Definition at line 1285 of file beamspotman.py.

◆ testFlag

string beamspotman.testFlag = ''

Definition at line 910 of file beamspotman.py.

◆ tier0dbinfofile

string beamspotman.tier0dbinfofile = '/afs/cern.ch/user/a/atlidbs/private/t0dbinfo.dat'

Definition at line 54 of file beamspotman.py.

◆ tiltX

beamspotman.tiltX

Definition at line 1626 of file beamspotman.py.

◆ tiltXErr

beamspotman.tiltXErr

Definition at line 1631 of file beamspotman.py.

◆ tiltY

beamspotman.tiltY

Definition at line 1627 of file beamspotman.py.

◆ tiltYErr

beamspotman.tiltYErr

Definition at line 1631 of file beamspotman.py.

◆ tmpdir

string beamspotman.tmpdir = '/tmp'

Definition at line 412 of file beamspotman.py.

◆ tmplist

beamspotman.tmplist = glob.glob(args[1]+'/')

Definition at line 381 of file beamspotman.py.

◆ tokens

beamspotman.tokens = line.split()

Definition at line 1284 of file beamspotman.py.

◆ True

beamspotman.True

Definition at line 536 of file beamspotman.py.

◆ tstart

beamspotman.tstart

Definition at line 1285 of file beamspotman.py.

◆ type

beamspotman.type

Definition at line 124 of file beamspotman.py.

◆ uploadflag

string beamspotman.uploadflag = dbfile[0]+'.uploaded'

Definition at line 582 of file beamspotman.py.

◆ useRun

bool beamspotman.useRun = True

Definition at line 818 of file beamspotman.py.

vtune_athena.format
format
Definition: vtune_athena.py:14
beamspotman.getT0DbConnection
def getT0DbConnection()
Definition: beamspotman.py:169
beamspotman.dataset_from_run_and_tag
def dataset_from_run_and_tag(run, tag)
Definition: beamspotman.py:206
beamspotman.run_jobs
def run_jobs(script, ds_name, task_name, params, *args)
Definition: beamspotman.py:222
python.TaskManager.getFullTaskNames
def getFullTaskNames(taskman, dsname, taskname, requireSingleTask=False, confirmWithUser=False, addWildCards=True)
Definition: TaskManager.py:74
PyAthena::repr
std::string repr(PyObject *o)
returns the string representation of a python object equivalent of calling repr(o) in python
Definition: PyAthenaUtils.cxx:106
histSizes.list
def list(name, path='/')
Definition: histSizes.py:38
TCS::join
std::string join(const std::vector< std::string > &v, const char c=',')
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/Root/StringUtils.cxx:10
beamspotman.check_commsep
def check_commsep(option, opt, value)
Definition: beamspotman.py:76
Trk::open
@ open
Definition: BinningType.h:40
beamspotman.getTaskManager
def getTaskManager()
Definition: beamspotman.py:193
dbg::print
void print(std::FILE *stream, std::format_string< Args... > fmt, Args &&... args)
Definition: SGImplSvc.cxx:70
Trk::split
@ split
Definition: LayerMaterialProperties.h:38
beamspotman.fail
def fail(message)
Definition: beamspotman.py:201