CMS 3D CMS Logo

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

Functions

def filecheck
 
def sendmail
 

Variables

list allOldFiles = []
 
string destdir = "%s/%s/%s/%s"
 
string destfile = "%s/DQM_V%04d_R%s.root"
 
string logfile = "%s.log"
 
tuple LOGFILE = file(logfile, 'a')
 
dictionary NEW = {}
 
list newFiles = []
 loop for runs More...
 
int NFOUND = 0
 search new files More...
 
int ntries = 0
 
list oldfiles = []
 
list paths = ["%s/%s" % (dir, x) for x in files]
 
string runnr = "%09d"
 
tuple TAG = os.stat(TimeTag)
 
string TempTag = TimeTag+'-tmp'
 
string tmpdestfile = "%s.tmp"
 
int version = 1
 

Function Documentation

def mergeAndRegister.filecheck (   rootfile)

Definition at line 21 of file mergeAndRegister.py.

21 
22 def filecheck(rootfile):
23  f = TFile(rootfile)
24  if (f.IsZombie()):
25  #print "File corrupted"
26  f.Close()
27  return 0
28  else:
29  hist = f.FindObjectAny("reportSummaryContents")
30  #(skip filecheck for HcalTiming files!!)
31  if (hist == None and rootfile.rfind('HcalTiming') == -1):
32  #print "File is incomplete"
33  f.Close()
34  return 0
35  else:
36  #print "File is OK"
37  f.Close()
38  return 1
39 
40 
def mergeAndRegister.sendmail (   EmailAddress,
  run 
)

Definition at line 10 of file mergeAndRegister.py.

10 
11 def sendmail(EmailAddress,run):
12  s=smtplib.SMTP("localhost")
13  tolist=[EmailAddress]
14  body="File merge failed by unknown reason for run"+run
15  msg = MIMEText(body)
16  msg['Subject'] = "File merge failed."
17  msg['From'] = ServerMail
18  msg['To'] = EmailAddress
19  s.sendmail(ServerMail,tolist,msg.as_string())
20  s.quit()

Variable Documentation

mergeAndRegister.allOldFiles = []

Definition at line 68 of file mergeAndRegister.py.

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

Definition at line 71 of file mergeAndRegister.py.

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

Definition at line 75 of file mergeAndRegister.py.

string mergeAndRegister.logfile = "%s.log"

Definition at line 83 of file mergeAndRegister.py.

tuple mergeAndRegister.LOGFILE = file(logfile, 'a')

Definition at line 93 of file mergeAndRegister.py.

dictionary mergeAndRegister.NEW = {}

Definition at line 48 of file mergeAndRegister.py.

list mergeAndRegister.newFiles = []

loop for runs

Definition at line 67 of file mergeAndRegister.py.

int mergeAndRegister.NFOUND = 0

search new files

Definition at line 47 of file mergeAndRegister.py.

int mergeAndRegister.ntries = 0

Definition at line 91 of file mergeAndRegister.py.

Referenced by FFTJetPileupProcessor.mixExtraGrid().

list mergeAndRegister.oldfiles = []

Definition at line 72 of file mergeAndRegister.py.

list mergeAndRegister.paths = ["%s/%s" % (dir, x) for x in files]

Definition at line 51 of file mergeAndRegister.py.

Referenced by RPCLinkSynchroStat.add(), AlCaRecoTriggerBitsRcdUpdate.addTriggerLists(), SiPixelFrameReverter.buildStructure(), edmplugin::standard.config(), TriggerRatesMonitor.dqmBeginRun(), RPCLinkSynchroStat.dumpDelays(), edm::EventSelector.EventSelector(), FastTimerServiceClient.fillPathSummaryPlots(), FWGeometry.findFile(), ecaldqm::MESetEcal.generatePaths(), SiPixelFrameConverter.hasDetUnit(), RPCLinkSynchroStat.init(), JetMETHLTOfflineSource.JetMETHLTOfflineSource(), pat::TriggerObjectStandAlone.pathsOrAlgorithms(), edm::service::Tracer.preBeginJob(), AlCaRecoTriggerBitsRcdRead.printMap(), pat::PATTriggerProducer.produce(), edm::detail::TriggerResultsBasedEventSelector.setupDefault(), dqmservices::TriggerSelector.TriggerSelector(), and pat::TriggerObjectStandAlone.unpackPathNames().

string mergeAndRegister.runnr = "%09d"

Definition at line 70 of file mergeAndRegister.py.

tuple mergeAndRegister.TAG = os.stat(TimeTag)

Definition at line 49 of file mergeAndRegister.py.

string mergeAndRegister.TempTag = TimeTag+'-tmp'

Definition at line 41 of file mergeAndRegister.py.

string mergeAndRegister.tmpdestfile = "%s.tmp"

Definition at line 84 of file mergeAndRegister.py.

int mergeAndRegister.version = 1

Definition at line 73 of file mergeAndRegister.py.