CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions | Variables
dqmPostProcessing_online Namespace Reference

Functions

def filecheck
 
def sendmail
 

Variables

list allOldFiles = []
 
string DB = '/home/dqm/dqm.db'
 
string destdir = "%s/%s/%s"
 
string destfile = "%s/DQM_V%04d_R%s.root"
 
string DIR = '/data/dqm/dropbox'
 
string DONEDIR = '/data/dqm/done'
 
string donedir = "%s/%s/%s"
 
string donefile = "%s/%s/%s/%s"
 
list existing = [long(x) for x in os.popen("sqlite3 %s 'select distinct runnr from t_data'" % TMPDB).read().split()]
 
string f = "%s/%s"
 
string FILEDIR = '/data/dqm/merged'
 
list files = NEW[run]
 
string logfile = "%s.log"
 
tuple LOGFILE = open(logfile, 'a')
 
int MAX_RUNS = 10
 
int MAX_TOTAL_RUNS = 400
 
dictionary NEW = {}
 
tuple newer = sorted([x for x in existing if x > runnr])
 
list newFiles = []
 
int NFOUND = 0
 
int NRUNS = 0
 search new files More...
 
tuple older = sorted([x for x in existing if x < runnr])
 
tuple oldfiles = sorted(glob.glob("%s/DQM_V????_R%s.root" % (destdir, runnr)))
 
list runnr = f[-14:-5]
 
string ServerMail = "dqm@srv-C2D05-19.cms"
 
string TMPDB = '/home/dqm/dqm.db.tmp'
 
string tmpdestfile = "%s.tmp"
 
tuple version = int(oldfiles[0][-20:-16])
 
int WAITTIME = 120
 
string YourMail = "lilopera@cern.ch"
 

Function Documentation

def dqmPostProcessing_online.filecheck (   rootfile)

Definition at line 32 of file dqmPostProcessing_online.py.

32 
33 def filecheck(rootfile):
34  f = TFile(rootfile)
35  if (f.IsZombie()):
36  #print "File corrupted"
37  f.Close()
38  return 0
39  else:
40  hist = f.FindObjectAny("reportSummaryContents")
41  #(skip filecheck for HcalTiming files!!)
42  if (hist == None and rootfile.rfind('HcalTiming') == -1):
43  #print "File is incomplete"
44  f.Close()
45  return 0
46  else:
47  #print "File is OK"
48  f.Close()
49  return 1
def dqmPostProcessing_online.sendmail (   EmailAddress,
  run 
)

Definition at line 21 of file dqmPostProcessing_online.py.

21 
22 def sendmail(EmailAddress,run):
23  s=smtplib.SMTP("localhost")
24  tolist=[EmailAddress, "lat@cern.ch"]
25  body="File merge failed by unknown reason for run"+run
26  msg = MIMEText(body)
27  msg['Subject'] = "File merge failed."
28  msg['From'] = ServerMail
29  msg['To'] = EmailAddress
30  s.sendmail(ServerMail,tolist,msg.as_string())
31  s.quit()

Variable Documentation

list dqmPostProcessing_online.allOldFiles = []

Definition at line 72 of file dqmPostProcessing_online.py.

string dqmPostProcessing_online.DB = '/home/dqm/dqm.db'

Definition at line 10 of file dqmPostProcessing_online.py.

Referenced by TFParams.fitpj(), and edm::PileUp.PileUp().

string dqmPostProcessing_online.destdir = "%s/%s/%s"

Definition at line 80 of file dqmPostProcessing_online.py.

string dqmPostProcessing_online.destfile = "%s/DQM_V%04d_R%s.root"

Definition at line 94 of file dqmPostProcessing_online.py.

string dqmPostProcessing_online.DIR = '/data/dqm/dropbox'

Definition at line 9 of file dqmPostProcessing_online.py.

Referenced by evf::DirManager.checkDirEmpty(), ExternalLHEProducer.closeDescriptors(), EcalLaserAnalyzerYousi.endJob(), evf::DirManager.findHighestRun(), evf::DirManager.findHighestRunDir(), evf::DirManager.findRunDir(), get_filename(), and SiStripCommissioningOfflineClient.setInputFiles().

string dqmPostProcessing_online.DONEDIR = '/data/dqm/done'

Definition at line 13 of file dqmPostProcessing_online.py.

string dqmPostProcessing_online.donedir = "%s/%s/%s"

Definition at line 81 of file dqmPostProcessing_online.py.

string dqmPostProcessing_online.donefile = "%s/%s/%s/%s"

Definition at line 59 of file dqmPostProcessing_online.py.

list dqmPostProcessing_online.existing = [long(x) for x in os.popen("sqlite3 %s 'select distinct runnr from t_data'" % TMPDB).read().split()]

Definition at line 125 of file dqmPostProcessing_online.py.

Referenced by edm::Principal.getExistingProduct().

string dqmPostProcessing_online.f = "%s/%s"

Definition at line 60 of file dqmPostProcessing_online.py.

string dqmPostProcessing_online.FILEDIR = '/data/dqm/merged'

Definition at line 12 of file dqmPostProcessing_online.py.

list dqmPostProcessing_online.files = NEW[run]

Definition at line 78 of file dqmPostProcessing_online.py.

string dqmPostProcessing_online.logfile = "%s.log"

Definition at line 95 of file dqmPostProcessing_online.py.

Referenced by L1TTwinMuxRawToDigi.processFed().

tuple dqmPostProcessing_online.LOGFILE = open(logfile, 'a')

Definition at line 99 of file dqmPostProcessing_online.py.

int dqmPostProcessing_online.MAX_RUNS = 10

Definition at line 16 of file dqmPostProcessing_online.py.

int dqmPostProcessing_online.MAX_TOTAL_RUNS = 400

Definition at line 15 of file dqmPostProcessing_online.py.

dictionary dqmPostProcessing_online.NEW = {}

Definition at line 54 of file dqmPostProcessing_online.py.

tuple dqmPostProcessing_online.newer = sorted([x for x in existing if x > runnr])

Definition at line 129 of file dqmPostProcessing_online.py.

list dqmPostProcessing_online.newFiles = []

Definition at line 71 of file dqmPostProcessing_online.py.

int dqmPostProcessing_online.NFOUND = 0

Definition at line 53 of file dqmPostProcessing_online.py.

int dqmPostProcessing_online.NRUNS = 0

search new files

Definition at line 52 of file dqmPostProcessing_online.py.

tuple dqmPostProcessing_online.older = sorted([x for x in existing if x < runnr])

Definition at line 128 of file dqmPostProcessing_online.py.

tuple dqmPostProcessing_online.oldfiles = sorted(glob.glob("%s/DQM_V????_R%s.root" % (destdir, runnr)))

Definition at line 82 of file dqmPostProcessing_online.py.

string dqmPostProcessing_online.runnr = f[-14:-5]

Definition at line 58 of file dqmPostProcessing_online.py.

string dqmPostProcessing_online.ServerMail = "dqm@srv-C2D05-19.cms"

Definition at line 19 of file dqmPostProcessing_online.py.

string dqmPostProcessing_online.TMPDB = '/home/dqm/dqm.db.tmp'

Definition at line 11 of file dqmPostProcessing_online.py.

string dqmPostProcessing_online.tmpdestfile = "%s.tmp"

Definition at line 96 of file dqmPostProcessing_online.py.

int dqmPostProcessing_online.version = int(oldfiles[0][-20:-16])

Definition at line 84 of file dqmPostProcessing_online.py.

int dqmPostProcessing_online.WAITTIME = 120

Definition at line 14 of file dqmPostProcessing_online.py.

string dqmPostProcessing_online.YourMail = "lilopera@cern.ch"

Definition at line 18 of file dqmPostProcessing_online.py.