Definition at line 400 of file sim_rttUpdate.py.
◆ __init__()
def sim_rttUpdate.RttUpdate.__init__ |
( |
|
self, |
|
|
|
opt, |
|
|
|
db |
|
) |
| |
Definition at line 401 of file sim_rttUpdate.py.
407 opt.rel=
'rel_%d'% (dt.date.today().isoweekday() % 7)
410 if opt.rttpath ==
'default':
411 opt.rttpath=
'/afs/cern.ch/atlas/project/RTT/prod/Results/rtt/'+opt.rel+
'/'+opt.branch+
'/build/'+opt.cmt+
'/offline/'+opt.package
412 print 'using default rttpath =',opt.rttpath
415 opt.rttcastor=
'/eos/atlas/atlascerngroupdisk/proj-sit/rtt/prod/rtt/'+opt.rel+
'/'+opt.branch+
'/'+opt.cmt+
'/offline/'+opt.package
416 opt.eoscmd=
'/afs/cern.ch/project/eos/installation/0.1.0-22d/bin/eos.select'
417 opt.eosprefix=
'root://eosatlas.cern.ch/'
420 xrdcp root://eosatlas.cern.ch//eos/atlas/atlascerngroupdisk/proj-sit/rtt/prod/rtt/rel_2/17.1.X.Y/i686-slc5-gcc43-opt/offline/DigitizationTests/mc11_ttbar_LVL1_on/mc11_ttbar.RDO.pool.root root://eosatlas.cern.ch//eos/atlas/atlascerngroupdisk/proj-sit/digitization/RTT/ReferenceFiles/MC12/MC11_ttbar_LVL1_ON.RDO.pool.root
423 opt.testpath,opt.project=db.findPackage(opt.package)
424 opt.ref=db.findReference(opt.branch,opt.project)
427 opt.refpath=
'/eos/atlas/atlascerngroupdisk/proj-sit/'+opt.project+
'/validation/RTT/referenceFiles/'
428 opt.dcubepath=
'/afs/cern.ch/atlas/project/RTT/DCubeReference/offline/'+opt.testpath+
'/'+opt.package+
'/'
430 opt.refpath+=opt.ref+
'/'
431 opt.dcubepath+=opt.ref+
'/'
434 self.djobs=db.findJobs(opt.package,jobtype=
'dcube')
437 self.jobs=db.findJobs(opt.package,jobtype=
'diffpool')
441 print "selected jobs"
443 joblist=opt.jobs.split(
',')
446 self.jobs = dict ( [ (k,self.jobs[k])
for k
in joblist
if self.jobs.has_key(k) ])
448 self.djobs = dict ( [ (k,self.djobs[k])
for k
in joblist
if self.djobs.has_key(k) ])
457 if self.opt.today==
'AUTO':
458 self.opt.today=dt.date.today().strftime(
"%y%m%d")
462 self.logfile=
'/afs/cern.ch/atlas/groups/Simulation/rtt/rttUpdate.log'
◆ ls()
def sim_rttUpdate.RttUpdate.ls |
( |
|
self | ) |
|
◆ printLogFile()
def sim_rttUpdate.RttUpdate.printLogFile |
( |
|
self | ) |
|
◆ printOptions()
def sim_rttUpdate.RttUpdate.printOptions |
( |
|
self | ) |
|
Definition at line 469 of file sim_rttUpdate.py.
469 def printOptions(self):
471 print '*** options: ***'
472 for i
in dir(self.opt):
473 if i==
'ensure_value' or i==
'read_file' or i==
'read_module':
475 if i.startswith(
'_'):
477 print '%12s:'%i,getattr(self.opt,i)
◆ updateDcube()
def sim_rttUpdate.RttUpdate.updateDcube |
( |
|
self | ) |
|
Definition at line 535 of file sim_rttUpdate.py.
535 def updateDcube(self):
536 if len(self.djobs)>0:
537 cmd=
'mkdir '+self.opt.dcubepath+self.opt.today
539 if not self.opt.dryrun:
543 for j,files
in self.djobs.
items():
544 epath=self.opt.rttpath+
'/'+j
545 print '########################################'
547 print 'WARNING, no files given, looking for root files '
548 os.system(
'ls -l '+epath+
'/*.root')
552 if not os.path.exists(src):
553 print src,
'does not exist'
557 dst=self.opt.dcubepath+sj+
'.'+f
558 s=os.system(
'ls '+dst)
560 print 'destination exists'
563 if not self.opt.dryrun:
566 cmd=
'cp -v '+src+
' '+self.opt.dcubepath+self.opt.today+
'/'+sj+
'.'+f
568 if not self.opt.dryrun:
570 cmd=
'ln -s '+self.opt.today+
'/'+sj+
'.'+f+
' '+dst
572 if not self.opt.dryrun:
575 self.updateDcubeXML(j,self.opt.dcubepath)
◆ updateDcubeXML()
def sim_rttUpdate.RttUpdate.updateDcubeXML |
( |
|
self, |
|
|
|
tname, |
|
|
|
path |
|
) |
| |
Definition at line 499 of file sim_rttUpdate.py.
499 def updateDcubeXML(self,tname,path):
500 print "updating dcube xml file"
504 dxml=path+
"dcube-"+tname+
".xml"
511 if l.count(
"Results from")>0:
514 newl=
"Results from "
515 newl+= dt.date.today().strftime(
"%d %B %Y")
516 newl+=
", "+self.opt.rel+
" "
517 newl+= self.opt.branch+
" "
519 self.opt.comment=newl
527 cmd=
"mv "+dxmln+
" "+dxml
529 if not self.opt.dryrun:
◆ updateRefs()
def sim_rttUpdate.RttUpdate.updateRefs |
( |
|
self | ) |
|
Definition at line 579 of file sim_rttUpdate.py.
579 def updateRefs(self):
583 cmd=self.opt.eoscmd+
' mkdir '+self.opt.refpath+self.opt.today
585 if not self.opt.dryrun:
588 for j,files
in self.jobs.
items():
589 epath=self.opt.rttpath+
'/'+j
590 print '########################################'
595 print 'WARNING, no files given, looking for root files '
596 os.system(
'ls -l '+epath+
'/*.root')
600 s=os.system(
'ls -l '+epath+
'/'+f)
603 epath=self.opt.rttcastor+
'/'+j
606 s=os.system(self.opt.eoscmd+
' ls '+epath+
'/'+f)
609 epath= self.opt.eosprefix+epath
616 if len(parts)>1
and parts[1]
in [
'EVNT2TR',
'TR2HITS']:
618 if self.alias.has_key(sj):
624 pref,suff=f.split(
'.',1)
625 dst=self.opt.refpath+sj+self.opt.sbranch+
'.'+suff
627 s=os.system(self.opt.eoscmd+
' ls '+dst)
630 print 'destination exists'
633 cmd=self.opt.eoscmd+
" rm "+dst
635 if not self.opt.dryrun:
637 cmd=
'xrdcp '+src+
' '+self.opt.eosprefix+dst
639 if not self.opt.dryrun:
641 dst=self.opt.refpath+self.opt.today+
'/'+sj+self.opt.sbranch+
'.'+suff
642 cmd=
'xrdcp '+src+
' '+self.opt.eosprefix+dst
644 if not self.opt.dryrun:
647 print 'source not found!'
◆ writeLogFile()
def sim_rttUpdate.RttUpdate.writeLogFile |
( |
|
self | ) |
|
Definition at line 479 of file sim_rttUpdate.py.
479 def writeLogFile(self):
480 f=
file(self.logfile,
'a')
481 for i
in [
'today',
'dryrun',
'user',
'branch',
'rel',
'cmt',
'package',
'jobs',
'comment']:
483 if hasattr(self.opt,i):
484 val =
str(getattr(self.opt,i))
◆ alias
sim_rttUpdate.RttUpdate.alias |
◆ db
sim_rttUpdate.RttUpdate.db |
◆ djobs
sim_rttUpdate.RttUpdate.djobs |
◆ jobs
sim_rttUpdate.RttUpdate.jobs |
◆ logfile
sim_rttUpdate.RttUpdate.logfile |
◆ opt
sim_rttUpdate.RttUpdate.opt |
The documentation for this class was generated from the following file: