CMS 3D CMS Logo

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

References split.

Referenced by sendmail().

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

Definition at line 31 of file fileCollector.py.

References edm.print().

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

31 def logme(msg, *args):
32  procid = "[%s/%d]" % (__file__.rsplit("/", 1)[-1], os.getpid())
33  print(datetime.now(), procid, msg % args)
34 
def logme(msg, args)
S & print(S &os, JobReport::InputFile const &f)
Definition: JobReport.cc:66
def fileCollector.sendmail (   body = "Hello from visDQMZipCastorVerifier")

Definition at line 52 of file fileCollector.py.

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

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