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 34 of file fileCollector.py.

References split.

Referenced by sendmail().

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

Definition at line 30 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().

30 def logme(msg, *args):
31  procid = "[%s/%d]" % (__file__.rsplit("/", 1)[-1], os.getpid())
32  print(datetime.now(), procid, msg % args)
33 
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 51 of file fileCollector.py.

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

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