CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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 33 of file dqmPostProcessing_online.py.

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

Definition at line 22 of file dqmPostProcessing_online.py.

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

Variable Documentation

list dqmPostProcessing_online.allOldFiles = []

Definition at line 73 of file dqmPostProcessing_online.py.

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

Definition at line 11 of file dqmPostProcessing_online.py.

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

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

Definition at line 81 of file dqmPostProcessing_online.py.

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

Definition at line 95 of file dqmPostProcessing_online.py.

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

Definition at line 10 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 14 of file dqmPostProcessing_online.py.

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

Definition at line 82 of file dqmPostProcessing_online.py.

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

Definition at line 60 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 126 of file dqmPostProcessing_online.py.

Referenced by dqm::implementation::DQMStore.findOrRecycle(), edm::Principal.getExistingProduct(), dqm::implementation::DQMStore.putME(), DQMTTreeIO::TreeObjectReader< T >.read(), DQMTTreeIO::TreeStringReader.read(), DQMTTreeIO::TreeSimpleReader< T >.read(), EventStringOutputBranches.updateEventStringNames(), and TriggerOutputBranches.updateTriggerNames().

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

Definition at line 61 of file dqmPostProcessing_online.py.

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

Definition at line 13 of file dqmPostProcessing_online.py.

list dqmPostProcessing_online.files = NEW[run]

Definition at line 79 of file dqmPostProcessing_online.py.

string dqmPostProcessing_online.logfile = "%s.log"

Definition at line 96 of file dqmPostProcessing_online.py.

Referenced by L1TTwinMuxRawToDigi.processFed(), and BeamSpotDipServer.tkStatus().

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

Definition at line 100 of file dqmPostProcessing_online.py.

int dqmPostProcessing_online.MAX_RUNS = 10

Definition at line 17 of file dqmPostProcessing_online.py.

int dqmPostProcessing_online.MAX_TOTAL_RUNS = 400

Definition at line 16 of file dqmPostProcessing_online.py.

dictionary dqmPostProcessing_online.NEW = {}

Definition at line 55 of file dqmPostProcessing_online.py.

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

Definition at line 130 of file dqmPostProcessing_online.py.

list dqmPostProcessing_online.newFiles = []

Definition at line 72 of file dqmPostProcessing_online.py.

int dqmPostProcessing_online.NFOUND = 0

Definition at line 54 of file dqmPostProcessing_online.py.

int dqmPostProcessing_online.NRUNS = 0

search new files

Definition at line 53 of file dqmPostProcessing_online.py.

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

Definition at line 129 of file dqmPostProcessing_online.py.

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

Definition at line 83 of file dqmPostProcessing_online.py.

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

Definition at line 59 of file dqmPostProcessing_online.py.

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

Definition at line 20 of file dqmPostProcessing_online.py.

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

Definition at line 12 of file dqmPostProcessing_online.py.

string dqmPostProcessing_online.tmpdestfile = "%s.tmp"

Definition at line 97 of file dqmPostProcessing_online.py.

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

Definition at line 85 of file dqmPostProcessing_online.py.

int dqmPostProcessing_online.WAITTIME = 120

Definition at line 15 of file dqmPostProcessing_online.py.

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

Definition at line 19 of file dqmPostProcessing_online.py.