CMS 3D CMS Logo

Functions | Variables
mergeAndRegister Namespace Reference

Functions

def filecheck (rootfile)
 
def sendmail (EmailAddress, run)
 

Variables

 allOldFiles
 
 destdir
 
 destfile
 
 logfile
 
 LOGFILE
 
 NEW
 
 newFiles
 loop for runs More...
 
 NFOUND
 search new files More...
 
 ntries
 
 oldfiles
 
 paths
 
 rest
 
 runnr
 
 slice
 
 TAG
 
 TempTag
 
 tmpdestfile
 
 version
 

Function Documentation

◆ filecheck()

def mergeAndRegister.filecheck (   rootfile)

Definition at line 23 of file mergeAndRegister.py.

23 def filecheck(rootfile):
24  f = TFile(rootfile)
25  if (f.IsZombie()):
26  #print "File corrupted"
27  f.Close()
28  return 0
29  else:
30  hist = f.FindObjectAny("reportSummaryContents")
31  #(skip filecheck for HcalTiming files!!)
32  if (hist == None and rootfile.rfind('HcalTiming') == -1):
33  #print "File is incomplete"
34  f.Close()
35  return 0
36  else:
37  #print "File is OK"
38  f.Close()
39  return 1
40 
41 
42 

◆ sendmail()

def mergeAndRegister.sendmail (   EmailAddress,
  run 
)

Definition at line 12 of file mergeAndRegister.py.

12 def sendmail(EmailAddress,run):
13  s=smtplib.SMTP("localhost")
14  tolist=[EmailAddress]
15  body="File merge failed by unknown reason for run"+run
16  msg = MIMEText(body)
17  msg['Subject'] = "File merge failed."
18  msg['From'] = ServerMail
19  msg['To'] = EmailAddress
20  s.sendmail(ServerMail,tolist,msg.as_string())
21  s.quit()
22 

Variable Documentation

◆ allOldFiles

mergeAndRegister.allOldFiles

Definition at line 70 of file mergeAndRegister.py.

◆ destdir

mergeAndRegister.destdir

Definition at line 73 of file mergeAndRegister.py.

◆ destfile

mergeAndRegister.destfile

Definition at line 77 of file mergeAndRegister.py.

◆ logfile

mergeAndRegister.logfile

Definition at line 85 of file mergeAndRegister.py.

◆ LOGFILE

mergeAndRegister.LOGFILE

Definition at line 95 of file mergeAndRegister.py.

◆ NEW

mergeAndRegister.NEW

Definition at line 50 of file mergeAndRegister.py.

◆ newFiles

mergeAndRegister.newFiles

loop for runs

Definition at line 69 of file mergeAndRegister.py.

◆ NFOUND

mergeAndRegister.NFOUND

search new files

Definition at line 49 of file mergeAndRegister.py.

◆ ntries

mergeAndRegister.ntries

Definition at line 93 of file mergeAndRegister.py.

Referenced by FFTJetPileupProcessor.mixExtraGrid().

◆ oldfiles

mergeAndRegister.oldfiles

Definition at line 74 of file mergeAndRegister.py.

◆ paths

mergeAndRegister.paths

Definition at line 53 of file mergeAndRegister.py.

◆ rest

mergeAndRegister.rest

◆ runnr

mergeAndRegister.runnr

Definition at line 72 of file mergeAndRegister.py.

◆ slice

mergeAndRegister.slice

◆ TAG

mergeAndRegister.TAG

Definition at line 51 of file mergeAndRegister.py.

◆ TempTag

mergeAndRegister.TempTag

Definition at line 43 of file mergeAndRegister.py.

◆ tmpdestfile

mergeAndRegister.tmpdestfile

Definition at line 86 of file mergeAndRegister.py.

◆ version

mergeAndRegister.version

Definition at line 75 of file mergeAndRegister.py.

mergeAndRegister.filecheck
def filecheck(rootfile)
Definition: mergeAndRegister.py:23
mergeAndRegister.sendmail
def sendmail(EmailAddress, run)
Definition: mergeAndRegister.py:12