CMS 3D CMS Logo

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

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

Definition at line 11 of file mergeAndRegister.py.

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

Variable Documentation

mergeAndRegister.allOldFiles = []

Definition at line 69 of file mergeAndRegister.py.

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

Definition at line 72 of file mergeAndRegister.py.

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

Definition at line 76 of file mergeAndRegister.py.

string mergeAndRegister.logfile = "%s.log"

Definition at line 84 of file mergeAndRegister.py.

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

Definition at line 94 of file mergeAndRegister.py.

dictionary mergeAndRegister.NEW = {}

Definition at line 49 of file mergeAndRegister.py.

list mergeAndRegister.newFiles = []

loop for runs

Definition at line 68 of file mergeAndRegister.py.

int mergeAndRegister.NFOUND = 0

search new files

Definition at line 48 of file mergeAndRegister.py.

int mergeAndRegister.ntries = 0

Definition at line 92 of file mergeAndRegister.py.

Referenced by FFTJetPileupProcessor.mixExtraGrid().

list mergeAndRegister.oldfiles = []

Definition at line 73 of file mergeAndRegister.py.

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

Definition at line 52 of file mergeAndRegister.py.

Referenced by RPCLinkSynchroStat.add(), AlCaRecoTriggerBitsRcdUpdate.addTriggerLists(), BTVHLTOfflineSource.BTVHLTOfflineSource(), SiPixelFrameReverter.buildStructure(), edm.checkForModuleDependencyCorrectness(), cms::DDFilteredView.children(), edmplugin::standard.config(), L1TMuonBarrelParamsHelper.configFromDB(), TriggerRatesMonitor.dqmBeginRun(), RPCLinkSynchroStat.dumpDelays(), FWGeometry.findFile(), ecaldqm::MESetEcal.generatePaths(), HLTriggerJSONMonitoring.globalBeginRun(), RPCLinkSynchroStat.init(), JetMETHLTOfflineSource.JetMETHLTOfflineSource(), FastTimerService::ResourcesPerProcess.operator+=(), pat::TriggerObjectStandAlone.pathsOrAlgorithms(), DependencyGraph.preBeginJob(), edm::service::Tracer.preBeginJob(), ProcessCallGraph.preBeginJob(), AlCaRecoTriggerBitsRcdRead.printMap(), pat::PATTriggerProducer.produce(), FastTimerService::ResourcesPerProcess.reset(), dqmservices::TriggerSelector.TriggerSelector(), and pat::TriggerObjectStandAlone.unpackPathNames().

string mergeAndRegister.runnr = "%09d"

Definition at line 71 of file mergeAndRegister.py.

tuple mergeAndRegister.TAG = os.stat(TimeTag)

Definition at line 50 of file mergeAndRegister.py.

string mergeAndRegister.TempTag = TimeTag+'-tmp'

Definition at line 42 of file mergeAndRegister.py.

string mergeAndRegister.tmpdestfile = "%s.tmp"

Definition at line 85 of file mergeAndRegister.py.

int mergeAndRegister.version = 1

Definition at line 74 of file mergeAndRegister.py.