CMS 3D CMS Logo

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

Functions

def convert
 
def filecheck
 
def logme
 
def sendmail
 

Variables

list COLLECTDIR = sys.argv[2]
 
 done = False
 
string donefile = "%s/%s/%s/%s"
 
tuple dqmfile = Tfile.replace('Playback','DQM')
 
list DROPBOX = sys.argv[4]
 
list EMAIL = sys.argv[1]
 
int EMAILINTERVAL = 15
 
string f = "%s/%s"
 
string finalfile = "%s/V%04d/DQM_V0001_%s_R%09d.root"
 
string finalTdir = "%s/%s/%s"
 
string finalTfile = "%s/%s/%s/%s"
 
string finalTMPfile = "%s/DQM_V0001_%s_R%09d.root.%s"
 
tuple fMatch = re.match('^DQM_V[0-9]{4}_(?P<subsys>.*)_R(?P<runnr>[0-9]{9})(|_T[0-9]*)\.root$',f)
 
tuple HOSTNAME = socket.gethostname()
 
int keeper = 0
 
tuple lastEmailSent = datetime.now()
 
tuple lFile = open("%s/lock" % TMPDROPBOX ,"a")
 
tuple md5Digest = md5(file(Tfile).read())
 
dictionary NEW = {}
 
int NFOUND = 0
 
tuple now = datetime.now()
 
int NRUNS = 0
 
tuple originFile = open(originTMPFile,"w")
 
string originFileName = "%s.origin"
 
string originStr = "md5:%s %d %s"
 
string originTMPFile = "%s.origin"
 
int RETRIES = 3
 
tuple runnr = int(fMatch.group("runnr"))
 
string runstr = "%09d"
 
tuple SBASEDIR = os.path.abspath(__file__)
 
tuple seed = HOSTNAME.replace("-","t")
 
string SENDMAIL = "/usr/sbin/sendmail"
 
tuple subsystem = fMatch.group("subsys")
 
tuple TAGRUNEND = long(sorted(NEW.keys(),reverse=True)[1])
 
list TAGS = []
 
 Tfile = dqmfile
 
list TFILEDONEDIR = sys.argv[3]
 
tuple Tfiles = sorted(files,cmp=lambda x,y: "_T" not in x and x != y and 1 or cmp(x,y))
 
string TMPDROPBOX = "%s/.tmpdropbox"
 
int version = 1
 
int WAITTIME = 10
 

Function Documentation

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

Definition at line 33 of file fileCollector.py.

References SiPixelLorentzAngle_cfi.read, and split.

33 
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
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(), and DQMNet.updateMask().

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

Definition at line 50 of file fileCollector.py.

References logme().

50 
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 
# --------------------------------------------------------------------

Variable Documentation

list fileCollector.COLLECTDIR = sys.argv[2]

Definition at line 12 of file fileCollector.py.

fileCollector.done = False

Definition at line 121 of file fileCollector.py.

string fileCollector.donefile = "%s/%s/%s/%s"

Definition at line 88 of file fileCollector.py.

tuple fileCollector.dqmfile = Tfile.replace('Playback','DQM')

Definition at line 160 of file fileCollector.py.

Referenced by get_filename(), read_badmodlist(), and read_runflag().

list fileCollector.DROPBOX = sys.argv[4]

Definition at line 14 of file fileCollector.py.

list fileCollector.EMAIL = sys.argv[1]

Definition at line 11 of file fileCollector.py.

int fileCollector.EMAILINTERVAL = 15

Definition at line 18 of file fileCollector.py.

string fileCollector.f = "%s/%s"

Definition at line 89 of file fileCollector.py.

string fileCollector.finalfile = "%s/V%04d/DQM_V0001_%s_R%09d.root"

Definition at line 189 of file fileCollector.py.

string fileCollector.finalTdir = "%s/%s/%s"

Definition at line 129 of file fileCollector.py.

string fileCollector.finalTfile = "%s/%s/%s/%s"

Definition at line 128 of file fileCollector.py.

string fileCollector.finalTMPfile = "%s/DQM_V0001_%s_R%09d.root.%s"

Definition at line 126 of file fileCollector.py.

tuple fileCollector.fMatch = re.match('^DQM_V[0-9]{4}_(?P<subsys>.*)_R(?P<runnr>[0-9]{9})(|_T[0-9]*)\.root$',f)

Definition at line 80 of file fileCollector.py.

tuple fileCollector.HOSTNAME = socket.gethostname()

Definition at line 23 of file fileCollector.py.

int fileCollector.keeper = 0

Definition at line 122 of file fileCollector.py.

fileCollector.lastEmailSent = datetime.now()

Definition at line 26 of file fileCollector.py.

tuple fileCollector.lFile = open("%s/lock" % TMPDROPBOX ,"a")

Definition at line 179 of file fileCollector.py.

tuple fileCollector.md5Digest = md5(file(Tfile).read())

Definition at line 171 of file fileCollector.py.

dictionary fileCollector.NEW = {}

Definition at line 76 of file fileCollector.py.

int fileCollector.NFOUND = 0

Definition at line 75 of file fileCollector.py.

tuple fileCollector.now = datetime.now()

Definition at line 205 of file fileCollector.py.

Referenced by edm::CountAndLimit.add(), lumi::RevisionDML.addEntry(), lumi::RevisionDML.addRevision(), lumi::RevisionDML.addRunToCurrentHFDataTag(), dqmservices::DQMFileIterator.advanceToLumi(), evf::EvFRecordInserter.analyze(), HcalLuttoDB.beginJob(), RawEventOutputModuleForBU< Consumer >.beginLuminosityBlock(), condbon.cdbon_write(), dqmservices::DQMFileIterator.collect(), dqmservices::DQMMonitoringService.DQMMonitoringService(), DTHVStatusHandler.dumpSnapshot(), dqmservices::DQMMonitoringService.evEvent(), DaqFakeReader.fillRawData(), Fit.getFitQuality(), DTHVStatusHandler.getNewObjects(), HtrXmlPatternWriter.HtrXmlPatternWriter(), cond::persistency::IOVEditor.insert(), cond::Logger.logFailedOperationNow(), DQMNet.logme(), cond::Logger.logOperationNow(), Fit.multiplyMatrices(), operator<<(), FastTimer.pause(), FastTimerService.postStreamBeginLumi(), FastTimerService.postStreamBeginRun(), FastTimerService.postStreamEndLumi(), FastTimerService.postStreamEndRun(), Fit.PropagateErrors(), FedRawDataInputSource.readWorker(), dqmservices::DQMFileIterator.reset(), FastTimer.resume(), lumi::CMSRunSummaryDummy2DB.retrieveData(), DQMNet.run(), ALIUtils.set_time_now(), edm::TimeoutPoolOutputModule.shouldWeCloseFile(), FastTimer.start(), edm::service::ConcurrentModuleTimer.start(), FastTimer.stop(), edm::service::ConcurrentModuleTimer.stop(), FastTimer.untilNow(), and dqmservices::DQMFileIterator.update_state().

int fileCollector.NRUNS = 0

Definition at line 74 of file fileCollector.py.

tuple fileCollector.originFile = open(originTMPFile,"w")

Definition at line 174 of file fileCollector.py.

string fileCollector.originFileName = "%s.origin"

Definition at line 190 of file fileCollector.py.

string fileCollector.originStr = "md5:%s %d %s"

Definition at line 172 of file fileCollector.py.

string fileCollector.originTMPFile = "%s.origin"

Definition at line 173 of file fileCollector.py.

int fileCollector.RETRIES = 3

Definition at line 21 of file fileCollector.py.

tuple fileCollector.runnr = int(fMatch.group("runnr"))

Definition at line 85 of file fileCollector.py.

string fileCollector.runstr = "%09d"

Definition at line 87 of file fileCollector.py.

Referenced by get_filename().

tuple fileCollector.SBASEDIR = os.path.abspath(__file__)

Definition at line 19 of file fileCollector.py.

tuple fileCollector.seed = HOSTNAME.replace("-","t")

Definition at line 125 of file fileCollector.py.

Referenced by ElectronMcSignalValidator.analyze(), TrackerSeedValidator.analyze(), EgammaSuperClusters.analyze(), ElectronMcFakeValidator.analyze(), MuonSeedsAnalyzer.analyze(), GsfElectronDataAnalyzer.analyze(), GsfElectronMCFakeAnalyzer.analyze(), GsfElectronFakeAnalyzer.analyze(), GsfElectronMCAnalyzer.analyze(), TrackingMonitor.analyze(), SeedMultiplicityAnalyzer.analyze(), ArrayPayload.ArrayPayload(), edm::BeamHaloProducer.beginLuminosityBlock(), Basic2DGenericTopoClusterizer.buildClusters(), SeedFromConsecutiveHitsCreator.buildSeed(), MuonSeedSimpleCleaner.clean(), TrajectoryCleanerBySharedSeeds.clean(), TrackerSeedCleaner.clean(), EcalClusterPUCleaningTools.CleanedSuperCluster(), EcalClusterSeverityLevelAlgo.closestProblematic(), JetCombinatorics.Combinatorics(), PixelHitMatcher.compatibleSeeds(), Data.Data(), OutsideInMuonSeeder.doLayer(), EcalClusterSeverityLevelAlgo.etaphiDistanceClosestProblematic(), big::bigEntry.fill(), SiStripElectronSeedGenerator.findSeedsFromCluster(), LaserBeamsTEC1.GeneratePrimaries(), LaserBeamsBarrel.GeneratePrimaries(), LaserBeamsTEC2.GeneratePrimaries(), RegressionHelper.getEcalRegression(), reco::GsfElectronCore.GsfElectronCore(), KalmanAlignmentAlgorithm.initializeAlignmentParameters(), ElectronPFIsolationWithConeVeto.isInIsolationCone(), cond::KeyGenerator.make(), reco::modules::CosmicTrackSplitter.makeCandidate(), reco::modules::TrackerTrackHitFilter.makeCandidate(), CosmicSeedCreator.makeSeed(), SETSeedFinder.makeSeed(), HybridClusterAlgo.makeSuperClusters(), cond::KeyGenerator.makeWithRandomSize(), TrackMerger.merge(), reco::tau::RecoTauPiZeroStripPlugin.operator()(), Param.Param(), CSCCrosstalkConditions.prefillCrosstalk(), CSCFakeDBCrosstalk.prefillDBCrosstalk(), CSCFakeDBGains.prefillDBGains(), CSCFakeDBNoiseMatrix.prefillDBNoiseMatrix(), CSCFakeDBPedestals.prefillDBPedestals(), CSCGainsConditions.prefillGains(), PrimitivePayload.PrimitivePayload(), MultiVertexFitter.printWeights(), EgammaHLTPixelMatchElectronAlgo.process(), UnifiedSCCollectionProducer.produce(), UncleanSCRecoveryProducer.produce(), TrackProducerWithSCAssociation.produce(), CleanAndMergeProducer.produce(), TSGFromL1Muon.produce(), MuonSeedMerger.produce(), L3TkMuonProducer.produce(), MuonReSeeder.produce(), PiZeroDiscriminatorProducer.produce(), CosmicMuonSeedGenerator.produce(), SeedClusterRemover.produce(), SETMuonSeedProducer.produce(), TrackCandidateTopBottomHitFilter.produce(), ReducedEGProducer.produce(), HiSpikeCleaner.produce(), AlCaECALRecHitReducer.produce(), pat::PATPhotonProducer.produce(), pat::PATElectronProducer.produce(), SeedToTrackProducer.produce(), EgammaHLTGsfTrackVarProducer.produce(), cms::CosmicTrackFinder.produce(), cms::CkfTrackCandidateMakerBase.produceBase(), GsfElectronCoreEcalDrivenProducer.produceEcalDrivenCore(), MuonTrackFinder.reconstruct(), KalmanAlignmentTrackRefitter.refitSingleTracklet(), AdaptiveVertexFitter.reLinearizeTracks(), AdaptiveVertexFitter.reWeightTracks(), MuonOverlapSeedFromRecHits.seeds(), MuonTrackAnalyzer.seedsAnalysis(), ElectronSeedGenerator.seedsFromRecHits(), ElectronSeedGenerator.seedsFromTrajectorySeeds(), EcalMipGraphs.selectHits(), EcalDisplaysByEvent.selectHits(), BaselinePFSCRegression.set(), GsfElectronAlgo.setCutBasedPreselectionFlag(), PhysicsTools::MVATrainer.setRandomSeed(), QjetsPlugin.SetRandSeed(), Qjets.SetRandSeed(), AlignableModifier.setSeed(), reco::HLTTau.setSeedEcalHitEt(), reco::HLTTau.setSeedHcalHitEt(), StandAloneMuonTrajectoryBuilder.trajectories(), GlobalCosmicMuonTrajectoryBuilder.trajectories(), TrackTransformerForGlobalCosmicMuons.transform(), TrackTransformer.transform(), TrackTransformerForCosmicMuons.transform(), GlobalMuonRefitter.transform(), CosmicMuonSeedGenerator.tsosToSeed(), MultiVertexFitter.updateSeeds(), MultiVertexFitter.updateWeights(), and AdaptiveVertexFitter.vertex().

string fileCollector.SENDMAIL = "/usr/sbin/sendmail"

Definition at line 22 of file fileCollector.py.

tuple fileCollector.subsystem = fMatch.group("subsys")

Definition at line 86 of file fileCollector.py.

tuple fileCollector.TAGRUNEND = long(sorted(NEW.keys(),reverse=True)[1])

Definition at line 108 of file fileCollector.py.

tuple fileCollector.TAGS = []

Definition at line 77 of file fileCollector.py.

fileCollector.Tfile = dqmfile

Definition at line 168 of file fileCollector.py.

list fileCollector.TFILEDONEDIR = sys.argv[3]

Definition at line 13 of file fileCollector.py.

tuple fileCollector.Tfiles = sorted(files,cmp=lambda x,y: "_T" not in x and x != y and 1 or cmp(x,y))

Definition at line 123 of file fileCollector.py.

string fileCollector.TMPDROPBOX = "%s/.tmpdropbox"

Definition at line 20 of file fileCollector.py.

int fileCollector.version = 1

Definition at line 178 of file fileCollector.py.

int fileCollector.WAITTIME = 10

Definition at line 17 of file fileCollector.py.