CMS 3D CMS Logo

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

References SiPixelLorentzAngle_cfi.read, and submitPVValidationJobs.split().

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

Definition at line 31 of file fileCollector.py.

References print().

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

31 
32 def logme(msg, *args):
33  procid = "[%s/%d]" % (__file__.rsplit("/", 1)[-1], os.getpid())
34  print(datetime.now(), procid, msg % args)
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47
def fileCollector.sendmail (   body = "Hello from visDQMZipCastorVerifier")

Definition at line 52 of file fileCollector.py.

References logme().

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

Variable Documentation

list fileCollector.COLLECTDIR = sys.argv[2]

Definition at line 14 of file fileCollector.py.

fileCollector.done = False

Definition at line 123 of file fileCollector.py.

Referenced by LMFDat.adjustParameters(), HcalIsoTrkSimAnalyzer.analyze(), HcalIsoTrkAnalyzer.analyze(), BaseParticlePropagator.backPropagate(), EcalCoder.encode(), SimG4FluxProducer.endOfEvent(), trklet::TrackletProcessor.execute(), HLTLogMonitorFilter.filter(), Thrust.finalAxis(), reco::PositiveSideGhostTrackFitter.fit(), for(), edm.loadExtraClasses(), DQMNet.onPeerData(), AlCaHcalIsotrkProducer.produce(), ParticlePropagator.propagateToBoundSurface(), BaseParticlePropagator.propagateToClosestApproach(), BaseParticlePropagator.propagateToEcalEntrance(), BaseParticlePropagator.propagateToHcalEntrance(), BaseParticlePropagator.propagateToHcalExit(), BaseParticlePropagator.propagateToHOLayer(), TrajectoryManager.propagateToLayer(), BaseParticlePropagator.propagateToPreshowerLayer1(), BaseParticlePropagator.propagateToPreshowerLayer2(), BaseParticlePropagator.propagateToVFcalEntrance(), edm::storage::DCacheFile.read(), edm::storage::DavixFile.read(), edm::storage::LStoreFile.read(), edm::storage::Storage.readv(), TPNPulse.setPulse(), TAPDPulse.setPulse(), edm::storage::LStoreFile.write(), edm::storage::DCacheFile.write(), edm::storage::Storage.writev(), edm::storage::Storage.xread(), edm::storage::Storage.xreadv(), edm::storage::Storage.xwrite(), and edm::storage::Storage.xwritev().

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

Definition at line 90 of file fileCollector.py.

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

Definition at line 162 of file fileCollector.py.

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

list fileCollector.DROPBOX = sys.argv[4]

Definition at line 16 of file fileCollector.py.

list fileCollector.EMAIL = sys.argv[1]

Definition at line 13 of file fileCollector.py.

int fileCollector.EMAILINTERVAL = 15

Definition at line 20 of file fileCollector.py.

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

Definition at line 91 of file fileCollector.py.

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

Definition at line 191 of file fileCollector.py.

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

Definition at line 131 of file fileCollector.py.

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

Definition at line 130 of file fileCollector.py.

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

Definition at line 128 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 82 of file fileCollector.py.

tuple fileCollector.HOSTNAME = socket.gethostname()

Definition at line 25 of file fileCollector.py.

int fileCollector.keeper = 0

Definition at line 124 of file fileCollector.py.

fileCollector.lastEmailSent = datetime.now()

Definition at line 28 of file fileCollector.py.

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

Definition at line 181 of file fileCollector.py.

Referenced by l1tpf::corrector.init_(), and l1tpf::corrector.writeToFile().

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

Definition at line 173 of file fileCollector.py.

dictionary fileCollector.NEW = {}

Definition at line 78 of file fileCollector.py.

int fileCollector.NFOUND = 0

Definition at line 77 of file fileCollector.py.

tuple fileCollector.now = datetime.now()

Definition at line 207 of file fileCollector.py.

int fileCollector.NRUNS = 0

Definition at line 76 of file fileCollector.py.

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

Definition at line 176 of file fileCollector.py.

string fileCollector.originFileName = "%s.origin"

Definition at line 192 of file fileCollector.py.

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

Definition at line 174 of file fileCollector.py.

string fileCollector.originTMPFile = "%s.origin"

Definition at line 175 of file fileCollector.py.

int fileCollector.RETRIES = 3

Definition at line 23 of file fileCollector.py.

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

Definition at line 87 of file fileCollector.py.

Referenced by L1MuGMTHWFileReader.readNextEvent(), and L1MuGMTInputEvent.setRunNumber().

string fileCollector.runstr = "%09d"

Definition at line 89 of file fileCollector.py.

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

Definition at line 21 of file fileCollector.py.

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

Definition at line 127 of file fileCollector.py.

Referenced by AlCaECALRecHitReducer.AddMiniRecHitCollection(), ElectronMcSignalValidator.analyze(), EgammaSuperClusters.analyze(), MuonSeedsAnalyzer.analyze(), ElectronMcFakeValidator.analyze(), PhotonMVANtuplizer.analyze(), ElectronMVANtuplizer.analyze(), GsfElectronMCFakeAnalyzer.analyze(), GsfElectronMCAnalyzer.analyze(), GsfElectronFakeAnalyzer.analyze(), GsfElectronDataAnalyzer.analyze(), SeedMultiplicityAnalyzer.analyze(), TrackAssociatorByHitsImpl.associateRecoToSim(), TrackAssociatorByHitsImpl.associateSimToReco(), edm::BeamHaloProducer.beginLuminosityBlock(), ExternalLHEProducer.beginRunProduce(), Basic2DGenericTopoClusterizer.buildClusters(), GenericSimClusterMapper.buildClusters(), PFClusterFromHGCalTrackster.buildClusters(), RealisticSimClusterMapper.buildClusters(), Phase1L1TJetProducer.buildJetFromSeed(), Phase1L1TJetProducer.buildJetsFromSeeds(), Phase1L1TJetProducer.buildJetsFromSeedsWithPUSubtraction(), MuonSeedSimpleCleaner.clean(), TrackerSeedCleaner.clean(), EcalClusterPUCleaningTools.CleanedSuperCluster(), EcalClusterSeverityLevelAlgo.closestProblematic(), HGCalHistoClusteringImplSA.clusterSeedMulticluster_SA(), HGCalHistoClusteringWrapper.convertCMSSWInputs(), MkFitSeedConverter.convertSeeds(), MuonTagger.discriminator(), OutsideInMuonSeeder.doLayer(), TICLTrackstersEdgesValidation.dqmAnalyze(), EcalClusterSeverityLevelAlgo.etaphiDistanceClosestProblematic(), big::bigEntry.fill(), TrackingNtuple.fillSeeds(), trklet::TrackDerTable.fillTable(), LeptonSkimming.filter(), HGCalImagingAlgo.findLocalMaximaInCluster(), LaserBeamsBarrel.GeneratePrimaries(), LaserBeamsTEC2.GeneratePrimaries(), LaserBeamsTEC1.GeneratePrimaries(), L1TUtmTriggerMenu.getFirmwareUuidHashed(), egamma.getRandomSeedFromObj(), egamma.getRandomSeedFromSC(), MTVHistoProducerAlgoForTracker.getSeedingLayerSetBin(), reco::GsfElectronCore.GsfElectronCore(), edm.hash_value(), SeedFinder.insertHit(), ElectronPFIsolationWithConeVeto.isInIsolationCone(), PhotonPFIsolationWithConeVeto.isInIsolationCone(), LowPtGsfElectronSeedProducer.loop(), cond::auth::KeyGenerator.make(), CalibrationTrackSelectorFromDetIdList.makeCandidate(), reco::modules::CosmicTrackSplitter.makeCandidate(), reco::modules::TrackerTrackHitFilter.makeCandidate(), SETSeedFinder.makeSeed(), TSGForOIDNN.makeSeedsFromHitDoublets(), TSGForOI.makeSeedsFromHits(), TSGForOIFromL2.makeSeedsFromHits(), TSGForOIDNN.makeSeedsFromHits(), HybridClusterAlgo.makeSuperClusters(), cond::auth::KeyGenerator.makeWithRandomSize(), EgammaHLTExtraProducer.matchingGsfTrks(), TrackMerger.merge(), l1t::Stage2Layer2TauAlgorithmFirmwareImp1.merging(), EGRegressionModifierV2.modifyObject(), trklet::Settings.NTC(), reco::tau::RecoTauPiZeroStripPlugin.operator()(), PixelHitMatcher.operator()(), TrajSeedMatcher.operator()(), CSCCrosstalkConditions.prefillCrosstalk(), CSCFakeDBCrosstalk.prefillDBCrosstalk(), CSCFakeDBGains.prefillDBGains(), CSCFakeDBNoiseMatrix.prefillDBNoiseMatrix(), CSCFakeDBPedestals.prefillDBPedestals(), CSCGainsConditions.prefillGains(), MultiVertexFitter.printWeights(), L1TMuonBarrelKalmanRegionModule.process(), EgammaHLTPixelMatchElectronAlgo.process(), l1t::Stage2Layer2EGammaAlgorithmFirmwareImp1.processEvent(), CalibratedPhotonProducerRun2T< T >.produce(), LowPtGsfElectronSeedValueMapsProducer.produce(), photonIsolationHIProducer.produce(), TSGFromL1Muon.produce(), CalibratedElectronProducerRun2T< T >.produce(), LowPtGsfElectronSCProducer.produce(), TrackProducerWithSCAssociation.produce(), MuonReSeeder.produce(), EcalBarrelClusterFastTimer.produce(), L3TkMuonProducer.produce(), MuonSeedMerger.produce(), ElectronSeedProducer.produce(), SeedClusterRemoverPhase2.produce(), SeedClusterRemover.produce(), CleanAndMergeProducer.produce(), PFTrackProducer.produce(), UncleanSCRecoveryProducer.produce(), SETMuonSeedProducer.produce(), TrackCandidateProducer.produce(), CosmicMuonSeedGenerator.produce(), TrackTimeValueMapProducer.produce(), EGMSeedGainProducer< T >.produce(), TrackCandidateTopBottomHitFilter.produce(), MuonHLTSeedMVAClassifier.produce(), HLTL1MuonNoL2Selector.produce(), SimPFProducer.produce(), HiSpikeCleaner.produce(), UnifiedSCCollectionProducer.produce(), pat::PATPhotonProducer.produce(), SeedToTrackProducer.produce(), TrackFromSeedProducer.produce(), TriggerObjectTableProducer.produce(), HLTScoutingEgammaProducer.produce(), IsolatedPixelTrackCandidateProducer.produce(), IsolatedPixelTrackCandidateL1TProducer.produce(), pat::PATElectronProducer.produce(), cms::CosmicTrackFinder.produce(), PhotonIDValueMapProducer.produce(), SmearedJetProducerT< T >.produce(), mkfit::StdSeq::Quality.quality_process(), MuonTrackFinder.reconstruct(), AdaptiveVertexFitter.reLinearizeTracks(), AdaptiveVertexFitter.reWeightTracks(), edm::RootEmbeddedFileSequence.RootEmbeddedFileSequence(), btagbtvdeep.seedingTracksToFeatures(), trklet::Settings.seedlayers(), MuonOverlapSeedFromRecHits.seeds(), MuonTrackAnalyzer.seedsAnalysis(), EcalMipGraphs.selectHits(), EcalDisplaysByEvent.selectHits(), GsfElectronAlgo.setCutBasedPreselectionFlag(), GsfElectronAlgo.setPixelMatchInfomation(), QjetsPlugin.SetRandSeed(), Qjets.SetRandSeed(), AlignableModifier.setSeed(), reco::HLTTau.setSeedEcalHitEt(), reco::HLTTau.setSeedHcalHitEt(), trigger::EgammaObject.setSeeds(), SmearedJetProducerT< T >.SmearedJetProducerT(), trklet::Track.Track(), FastTSGFromIOHit.trackerSeeds(), StandAloneMuonTrajectoryBuilder.trajectories(), GlobalCosmicMuonTrajectoryBuilder.trajectories(), TrackTransformerForGlobalCosmicMuons.transform(), TrackTransformerForCosmicMuons.transform(), TrackTransformer.transform(), GlobalMuonRefitter.transform(), CosmicMuonSeedGenerator.tsosToSeed(), MultiVertexFitter.updateSeeds(), MultiVertexFitter.updateWeights(), and AdaptiveVertexFitter.vertex().

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

Definition at line 24 of file fileCollector.py.

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

Definition at line 88 of file fileCollector.py.

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

Definition at line 110 of file fileCollector.py.

tuple fileCollector.TAGS = []

Definition at line 79 of file fileCollector.py.

fileCollector.Tfile = dqmfile

Definition at line 170 of file fileCollector.py.

list fileCollector.TFILEDONEDIR = sys.argv[3]

Definition at line 15 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 125 of file fileCollector.py.

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

Definition at line 22 of file fileCollector.py.

int fileCollector.version = 1

Definition at line 180 of file fileCollector.py.

int fileCollector.WAITTIME = 10

Definition at line 19 of file fileCollector.py.