CMS 3D CMS Logo

Functions
fileCollector Namespace Reference

Functions

def convert (infile, ofile)
 
def filecheck (rootfile)
 
def logme (msg, args)
 
def sendmail (body="Hello from visDQMZipCastorVerifier")
 

Function Documentation

def fileCollector.convert (   infile,
  ofile 
)
def fileCollector.filecheck (   rootfile)

Definition at line 33 of file fileCollector.py.

References split.

Referenced by sendmail().

33 def filecheck(rootfile):
34  cmd = 'root -l -b -q %s/filechk.C"(\\"%s\\")"' % (SBASEDIR,rootfile)
35  a = os.popen(cmd).read().split()
36  tag=a.pop()
37  if tag == '(int)(-1)' or tag == '(int)0':
38  return 0
39 
40  if tag == '(int)1':
41  return 1
42 
43  return 0
44 
def filecheck(rootfile)
double split
Definition: MVATrainer.cc:139
def fileCollector.logme (   msg,
  args 
)

Definition at line 29 of file fileCollector.py.

Referenced by DQMNet.losePeer(), DQMNet.onLocalNotify(), DQMNet.onMessage(), DQMNet.onPeerConnect(), DQMNet.onPeerData(), sendmail(), DQMNet.unpackQualityData(), and DQMNet.updateMask().

29 def logme(msg, *args):
30  procid = "[%s/%d]" % (__file__.rsplit("/", 1)[-1], os.getpid())
31  print datetime.now(), procid, msg % args
32 
def logme(msg, args)
def fileCollector.sendmail (   body = "Hello from visDQMZipCastorVerifier")

Definition at line 50 of file fileCollector.py.

References mps_setup.append, convert(), FrontierConditions_GlobalTag_cff.file, filecheck(), createfilelist.int, logme(), and split.

50 def sendmail(body="Hello from visDQMZipCastorVerifier"):
51  scall = Popen("%s -t" % SENDMAIL, shell=True, stdin=PIPE)
52  scall.stdin.write("To: %s\n" % EMAIL)
53  scall.stdin.write("Subject: File Collector on server %s has a Critical Error\n" %
54  HOSTNAME)
55  scall.stdin.write("\n") # blank line separating headers from body
56  scall.stdin.write("%s\n" % body)
57  scall.stdin.close()
58  rc = scall.wait()
59  if rc != 0:
60  logme("ERROR: Sendmail exit with status %s", rc)
61 
62 # --------------------------------------------------------------------
def logme(msg, args)
def sendmail(body="Hello from visDQMZipCastorVerifier")