Variables | |
castorToLFN = eosToLFN | |
createCastorDir = createEOSDir | |
isCastorDir = isEOSDir | |
isCastorFile = isEOSFile | |
lfnToCastor = lfnToEOS | |
|
private |
def eostools.cat | ( | path | ) |
cat, works on EOS and locally
Definition at line 398 of file eostools.py.
Referenced by MVAJetTagPlotter.analyzeTag(), CSCStripAmpResponse.calculateAmpResponse(), CutBasedElectronID.cicSelection(), CutBasedElectronID.classify(), fwlite::Scanner< Collection >.fillDataSet(), edm::service::ELstatistics.formSummary(), GsfEleMVACut.operator()(), PhoMVACut.operator()(), DDStreamer.parts_read(), DDLLogicalPart.processElement(), AlgorithmCalibration< T, CO >.readCategories(), edm::service::ELstatistics.summaryForJobReport(), and TagProbeFitTreeAnalyzer.TagProbeFitTreeAnalyzer().
def eostools.chmod | ( | path, | |
mode | |||
) |
Does chmod on a file or directory
Definition at line 291 of file eostools.py.
Referenced by evf::EvFDaqDirector.EvFDaqDirector(), L1GtVhdlWriterCore.makeFirmware(), evf::EvFDaqDirector.openFULockfileStream(), L1GtVhdlWriterCore.writeAlgoSetup(), L1GtVhdlWriterCore.writeCond2intMap2File(), L1GtVhdlWriterCore.writeCondChipPkg(), L1GtVhdlWriterCore.writeConditionChipSetup(), L1GtVhdlWriterCore.writeDefValPkg(), L1GtVhdlWriterCore.writeEtmSetup(), L1GtVhdlWriterCore.writeMuonSetupVhdl(), and L1GtVhdlWriterCore.writeQsfSetupFiles().
def eostools.cmsStage | ( | absDestDir, | |
files, | |||
force | |||
) |
def eostools.createEOSDir | ( | path | ) |
Makes a directory in EOS ???Will, I'm quite worried by the fact that if this path already exists, and is a file, everything will 'work'. But then we have a file, and not a directory, while we expect a dir...
Definition at line 227 of file eostools.py.
Referenced by cmsStage().
def eostools.datasetNotEmpty | ( | path, | |
regexp | |||
) |
Definition at line 526 of file eostools.py.
def eostools.eosDirSize | ( | path | ) |
def eostools.eosToLFN | ( | path | ) |
Converts a EOS PFN to an LFN. Just strip out /eos/cms from path. If this string is not found, return path. ??? Shouldn't we raise an exception instead?
Definition at line 63 of file eostools.py.
References python.rootplot.root2matplotlib.replace().
Referenced by cmsStage(), createEOSDir(), eosDirSize(), isEOSDir(), runEOSCommand(), and runXRDCommand().
def eostools.fileExists | ( | path | ) |
Returns true if path is a file or directory stored locally, or on EOS. This function checks for the file or directory existence.
Definition at line 195 of file eostools.py.
def eostools.isDirectory | ( | path | ) |
Returns True if path is a directory on EOS. Tests for file existence. This function returns False for EOS files, and crashes with local paths ???Will, this function also seems to work for paths like: /eos/cms/... ??? I think that it should work also for local files, see isFile.
Definition at line 258 of file eostools.py.
Referenced by createEOSDir().
def eostools.isEOS | ( | path | ) |
Tests whether this path is a CMS EOS (name starts with /eos...)
Definition at line 59 of file eostools.py.
Referenced by cat().
def eostools.isEOSDir | ( | path | ) |
Returns True if path is either: /store/... or /eos/cms/store/... or root://eoscms.cern.ch//eos/cms/ Otherwise, returns False. WARNING!! This function does not check for path existence, and returns true also for plain files. !!! Will, is my summary correct?
Definition at line 119 of file eostools.py.
References eosToLFN(), and lfnToPFN().
Referenced by cmsStage(), and fileExists().
def eostools.isEOSFile | ( | path, | |
tfcProt = 'rfio' |
|||
) |
Returns True if path is a file or directory stored on EOS (checks for path existence) ??? This function does not behave well if passed a non EOS path... returns lots of error messages like: >>> eostools.isEOSFile('/store/asdfasfd') Command (['ls', '/', 's', 't', 'o', 'r', 'e', '/', 'a', 's', 'd', 'f', 'a', 's', 'f', 'd', '/store']) failed with return code: 2 ls: s: No such file or directory ls: t: No such file or directory ls: o: No such file or directory ls: r: No such file or directory ls: e: No such file or directory ls: a: No such file or directory ls: s: No such file or directory ls: d: No such file or directory ls: f: No such file or directory ls: a: No such file or directory ls: s: No such file or directory ls: f: No such file or directory ls: d: No such file or directory ls: /store: No such file or directory ls: s: No such file or directory ls: t: No such file or directory ls: o: No such file or directory ls: r: No such file or directory ls: e: No such file or directory ls: a: No such file or directory ls: s: No such file or directory ls: d: No such file or directory ls: f: No such file or directory ls: a: No such file or directory ls: s: No such file or directory ls: f: No such file or directory ls: d: No such file or directory ls: /store: No such file or directory False
Definition at line 150 of file eostools.py.
Referenced by createEOSDir(), and fileExists().
def eostools.isFile | ( | path | ) |
Returns True if a path is a file. Tests for file existence. Returns False for directories. Works on EOS and local paths. ???This function works with local files, so not the same as isDirectory... isFile and isDirectory should behave the same.
Definition at line 271 of file eostools.py.
def eostools.isLFN | ( | path | ) |
Tests whether this path is a CMS LFN (name starts with /store...)
Definition at line 54 of file eostools.py.
Referenced by lfnToEOS().
def eostools.lfnToEOS | ( | path | ) |
Converts LFN to EOS. If path is not an LFN in the first place, return path. ??? shouldn't we raise an exception?
Definition at line 105 of file eostools.py.
References isLFN().
Referenced by cat().
def eostools.lfnToPFN | ( | path, | |
tfcProt = 'rfio' |
|||
) |
Converts an LFN to a PFN. For example: /store/cmst3/user/cbern/CMG/TauPlusX/Run2011A-03Oct2011-v1/AOD/V2/PAT_CMG_V2_4_0/H2TAUTAU_Nov21 -> root://eoscms//eos/cms/store/cmst3/user/cbern/CMG/TauPlusX/Run2011A-03Oct2011-v1/AOD/V2/PAT_CMG_V2_4_0/H2TAUTAU_Nov21?svcClass=cmst3&stageHost=castorcms This function only checks path, and does not access the storage system. If the path is in /store/cmst3, it assumes that the CMST3 svcClass is to be used. Otherwise, is uses the default one. ??? what is tfcprot?
Definition at line 74 of file eostools.py.
Referenced by isEOSDir(), runEOSCommand(), and runXRDCommand().
Provides a simple list of the specified directory, works on EOS and locally
Definition at line 346 of file eostools.py.
Referenced by FWPFCandidateDetailView.addClusters(), HcalLaserEventFilter2012.addEventString(), DisplayGeom.analyze(), PixelLumiDQM.beginLuminosityBlock(), FWBeamSpotProxyBuilder.build(), FWPFClusterRPZProxyBuilder.build(), FWPFClusterRPZUtils.buildRhoPhiClusterLineSet(), FWPFClusterRPZUtils.buildRhoZClusterLineSet(), evf::EvFDaqDirector.bumpFile(), L1TSync.certifyLSBlock(), CompositeLogicalTrajectoryFilter.CompositeLogicalTrajectoryFilter(), L1TSync.doFractionInSync(), L1TRate.endLuminosityBlock(), PixelLumiDQM.endLuminosityBlock(), RawEventFileWriterForBU.endOfLS(), RateBuffer.fill(), EcalDeadCellTriggerPrimitiveFilter.filter(), RawEventFileWriterForBU.finishFileWrite(), RateBuffer.getLSAlgoRate(), RateBuffer.getLSRate(), RateBuffer.getLSTechRate(), BeamSpotWorkflow.getNewRunList(), IdealZDCTrapezoid.initCorners(), IdealCastorTrapezoid.initCorners(), EcalDeadCellTriggerPrimitiveFilter.loadEventInfo(), FWBeamSpotProxyBuilder.localModelChanges(), ls_cert_type(), lsbs_cert(), copyAndRename.main(), copyFromCastor.main(), rename.main(), copyFiles.main(), main(), splitter.main(), checkRuns.main(), nlumis(), evf::EvFDaqDirector.preGlobalEndLumi(), AlpgenSource.readAlpgenEvent(), FedRawDataInputSource.readSupervisor(), evf::FastMonitoringService.reportLockWait(), lumi::TRGScalers2DB.retrieveData(), GenericTripletGenerator.run(), GenericPairGenerator.run(), BeamHaloPairGenerator.run(), fffnaming.runLumiPrefix(), fffnaming.runLumiPrefixFill(), MonitorElement.setLumi(), DIPLumiDetail.setOrigin(), DIPLumiSummary.setOrigin(), FWPFClusterRPZProxyBuilder.sharedBuild(), TT6CMNSubtractor.subtract_(), IteratedMedianCMNSubtractor.subtract_(), SimpleCosmicBONSeeder.triplets(), evf::EvFDaqDirector.updateFuLock(), DTTimeEvolutionHisto.updateTimeSlot(), and RawEventOutputModuleForBU< Consumer >.write().
Provides a simple list of the specified directory, works on EOS only, but is faster than the xrd version
Definition at line 350 of file eostools.py.
Referenced by datasetNotEmpty().
def eostools.matchingFiles | ( | path, | |
regexp | |||
) |
def eostools.mkdir | ( | path | ) |
Create a directory, either on EOS or locally
Definition at line 248 of file eostools.py.
Referenced by L1GtVhdlWriter.analyze(), spu.create_dir(), dd_to_html(), evf::EvFDaqDirector.EvFDaqDirector(), MillePedeMonitor.init(), LaserSorter.LaserSorter(), L1GtVhdlWriterCore.makeFirmware(), pos::PixelConfigFile.makeNewVersion(), L1MuGlobalMuonTrigger.produce(), EgammaObjects.saveHistos(), VariablePlotter.setDir(), LaserSorter.streamFileName(), WatcherStreamFileReader.WatcherStreamFileReader(), and RawEventFileWriterForBU.writeJsds().
def eostools.move | ( | src, | |
dest | |||
) |
Move filename1 to filename2 locally to the same server
Definition at line 508 of file eostools.py.
Referenced by CompatibleDetToGroupAdder.add(), tracking::TempMeasurements.add(), TkGluedMeasurementDet::HitCollectorForFastMeasurements.add(), TrajectorySegmentBuilder.addGroup(), CosmicTrajectoryBuilder.AddHit(), TkGluedMeasurementDet::HitCollectorForRecHits.addProjected(), BaseCkfTrajectoryBuilder.addToResult(), GroupedCkfTrajectoryBuilder.advanceOneLayer(), MultiTrackValidator.analyze(), DTCCBConfig.appendConfigKey(), LHESource.beginRun(), DQMStore.book(), Basic2DGenericPFlowClusterizer.buildClusters(), PFlow2DClusterizerWithTime.buildClusters(), DetIdAssociator.buildMap(), SeedFromConsecutiveHitsCreator.buildSeed(), TrackProducerAlgorithm< reco::Track >.buildTrack(), TrackProducerAlgorithm< reco::GsfTrack >.buildTrack(), DTReadOutMapping.cacheMap(), XrdAdaptor::RequestManager.checkSourcesImpl(), DAClusterizerInZ_vect.clusterize(), PixelThresholdClusterizer.clusterizeDetUnit(), edm::LuminosityBlock.commit_(), edm::Run.commit_(), edm::Event.commit_aux(), CaloTowersCreationAlgo.convert(), edm.convert_handle(), edm::SharedResourcesRegistry.createAcquirer(), edm::SharedResourcesRegistry.createAcquirerForSourceDelayedReader(), edm::impl.createCommunicatorIfNeeded(), StandAloneMuonFilter.createDefaultTrajectory(), edm::OutputModuleCommunicatorT< T >.createIfNeeded(), ESDigitizer.createNoisyList(), edm::maker::ModuleHolderT< T >.createOutputModuleCommunicator(), CosmicTrajectoryBuilder.createStartingTrajectory(), CRackTrajectoryBuilder.createStartingTrajectory(), KinematicTree.currentProductionVertex(), edm::RecordInParentless< PROD >.do_it(), edm::RecordInParentfull< PROD >.do_it(), OutsideInMuonSeeder.doLayer(), EcalTBDigiProducer.EcalTBDigiProducer(), LHESource.endRun(), MeasurementDet.fastMeasurements(), edm::detail::NamedEventSelector.fill(), edm::RootOutputFile.fillBranches(), HcalGeometry.fillDetIds(), edm::RootFile.fillIndexIntoFile(), HPDNoiseGenerator.fillNoiseSignals(), TkStripMeasurementDet.filteredRecHits(), cms::SiPixelDigitizer.finalizeEvent(), LocalFileSystem.findCachePath(), V0Fitter.fitAll(), KFFittingSmoother.fitOne(), edm::ProvenanceAdaptor.fixProcessHistory(), edm::EventBase.get(), edm::eventsetup::EventSetupRecord.get(), edm::Event.get(), edm.getAnyPtr(), PileUpEventPrincipal.getByLabel(), edm::EventBase.getByLabel(), edm::RunBase.getByLabel(), edm::LuminosityBlock.getByLabel(), edm::LuminosityBlockBase.getByLabel(), edm::Run.getByLabel(), edm::Event.getByLabel(), edm::LuminosityBlock.getByToken(), edm::Run.getByToken(), edm::Event.getByToken(), edm::PrincipalGetAdapter.getManyByType(), edm.getWrapperBasePtr(), PixelForwardLayer.groupedCompatibleDetsV(), PixelForwardLayerPhase1.groupedCompatibleDetsV(), TECLayer.groupedCompatibleDetsV(), CompositeTECWedge.groupedCompatibleDetsV(), Phase2OTECRingedLayer.groupedCompatibleDetsV(), TIDRing.groupedCompatibleDetsV(), TIBRing.groupedCompatibleDetsV(), TBLayer.groupedCompatibleDetsV(), Phase2OTECRing.groupedCompatibleDetsV(), PixelBlade.groupedCompatibleDetsV(), TOBRod.groupedCompatibleDetsV(), Phase1PixelBlade.groupedCompatibleDetsV(), Phase2OTBarrelRod.groupedCompatibleDetsV(), CompositeTECPetal.groupedCompatibleDetsV(), LayerMeasurements.groupedMeasurements(), XrdAdaptor::RequestManager.handle(), XrdAdaptor::RequestManager::OpenHandler.HandleResponseWithHosts(), SeedingLayerSetsBuilder.hits(), RectangularEtaPhiTrackingRegion.hits(), MultiHitGeneratorFromChi2.hitSets(), edm::EventProcessor.init(), DTCCBConfig.initialize(), XrdAdaptor::RequestManager.initialize(), initializeDummyPSet(), PFEGammaAlgo.initializeProtoCands(), TransientInitialStateEstimator.innerState(), GeomDetCompatibilityChecker.isCompatible(), SeedingLayerSetsBuilder::LayerSpec.LayerSpec(), CkfTrajectoryBuilder.limitedCandidates(), edm.makeESHandleExceptionFactory(), edm.makeHandleExceptionFactory(), edm::RootFile.makeProvenanceReaderMaker(), TrajectoryFitter.makeVect(), TkPixelMeasurementDet.measurements(), DQMStore.mergeAndResetMEsLuminositySummaryCache(), DQMStore.mergeAndResetMEsRunSummaryCache(), edm::ProductHolderBase.mergeProduct(), edm::InputProductHolder.mergeProduct_(), edm::ProducedProductHolder.mergeProduct_(), edm::AliasProductHolder.mergeProduct_(), DetGroupMerger.mergeTwoLevels(), KinematicTree.movePointerToTheTop(), edm::soahelper::SoATupleHelper< I, Args >.moveToNew(), BaseCkfTrajectoryBuilder.moveToResult(), MuonAssociatorByHits.MuonAssociatorByHits(), MuonToSimAssociatorByHits.MuonToSimAssociatorByHits(), extstd::clone_ptr< T >.operator=(), edm::InputTag.operator=(), DetGroupMerger.orderAndMergeTwoLevels(), PixelTrackReconstruction.PixelTrackReconstruction(), TFWLiteSelectorBasic.Process(), edm::SubProcess.process(), edm::EventAuxiliaryHistoryProducer.produce(), SeedCombiner.produce(), evf::EvFFEDSelector.produce(), MuonReSeeder.produce(), edm::LogErrorHarvester.produce(), edm::TriggerResultInserter.produce(), JetCorrectorProducer< T >.produce(), TrackMCQuality.produce(), TrackAssociatorByPositionProducer.produce(), TrackAssociatorByChi2Producer.produce(), QuickTrackAssociatorByHitsProducer.produce(), PFEGammaProducer.produce(), TcdsRawToDigi.produce(), TrackAssociatorByHitsProducer.produce(), TrajectorySeedProducer.produce(), ChainedJetCorrectorProducer.produce(), MuonToTrackingParticleAssociatorEDProducer.produce(), cms::CkfTrackCandidateMakerBase.produceBase(), TkGluedMeasurementDet.projectOnGluedDet(), TempTrajectory.push(), edm::RunPrincipal.put(), edm::LuminosityBlockPrincipal.put(), edm::Run.put(), edm::Event.put(), edm::LuminosityBlock.put(), edm::EventPrincipal.put(), KfTrackProducerBase.putInEvt(), edm::EventPrincipal.putOnRead(), edm::Principal.putOrMerge(), edm::ProductHolderBase.putProduct(), edm::InputProductHolder.putProduct_(), edm::ProducedProductHolder.putProduct_(), edm::AliasProductHolder.putProduct_(), FedRawDataInputSource.read(), edm::StreamerInputSource.read(), edm::RootFile.readCurrentEvent(), LHESource.readEvent_(), edm::PoolSource.readFile_(), edm::EventPrincipal.readFromSource_(), GroupedCkfTrajectoryBuilder.rebuildSeedingRegion(), GroupedCkfTrajectoryBuilder.rebuildTrajectories(), TkStripMeasurementDet.recHits(), RecoTauDiscriminantCutMultiplexer.RecoTauDiscriminantCutMultiplexer(), TrajectorySegmentBuilder.redoMeasurements(), VertexFitterManager.registerFitter(), edm::RunPrincipal.resolveProductImmediate(), edm::LuminosityBlockPrincipal.resolveProductImmediate(), ESDigitizer.run(), CaloTDigitizer< Traits >.run(), PixelForwardLayer.searchNeighbors(), PixelForwardLayerPhase1.searchNeighbors(), TIBRing.searchNeighbors(), CRackTrajectoryBuilder.seedMeasurements(), edm::InputProductHolder.setProduct(), PFECALSuperClusterAlgo.setTokens(), HLTJets.setup(), edm::service::SiteLocalConfigService.SiteLocalConfigService(), DDValue::StringHolder.StringHolder(), edm::SubProcess.SubProcess(), TempTrajectory.TempTrajectory(), TrackingLayer.toIdString(), TrackingLayer.toString(), edm::service::Tracer.Tracer(), TrajectorySmoother.trajectories(), TrajectoryBuilder.trajectories(), TrajectorySeedProducer.TrajectorySeedProducer(), MuonTrajectoryUpdator.update(), TrajectorySegmentBuilder.updateCandidatesWithBestHit(), TrajectorySegmentBuilder.updateTrajectory(), and CkfTrajectoryBuilder.updateTrajectory().
Remove a list of files and directories, possibly recursively Colin: Is that obsolete? why not use rm?
Definition at line 379 of file eostools.py.
rm, works on EOS and locally. Colin: should implement a -f mode and a confirmation when deleting dirs recursively.
Definition at line 360 of file eostools.py.
Referenced by remove().
def eostools.runEOSCommand | ( | path, | |
cmd, | |||
args | |||
) |
Run an eos command. !!! Will, when the EOS command fails, it passes silently... I think we should really try and raise an exception in case of problems. should be possible as the return code is provided in the tuple returned by runner.
Definition at line 36 of file eostools.py.
References eosToLFN(), and lfnToPFN().
Referenced by chmod(), createEOSDir(), eosDirSize(), ls_EOS(), and rm().
def eostools.runXRDCommand | ( | path, | |
cmd, | |||
args | |||
) |
Run an xrd command. !!! Will, what is happening in case of problem? ??? At some point, should return a list of lines instead of a string.
Definition at line 20 of file eostools.py.
References eosToLFN(), and lfnToPFN().
Referenced by cat(), isDirectory(), isFile(), listFiles(), and move().
def eostools.setCAFPath | ( | ) |
Hack to get the CAF scripts on the PYTHONPATH
Definition at line 11 of file eostools.py.
def eostools.which | ( | cmd | ) |
Definition at line 333 of file eostools.py.
Referenced by OOTPileupCorrData.apply(), MuonResidualsFitter.computeHistogramRangeAndBinning(), gen::EvtGenLHCInterface.decay(), condPython.defineWhat< cond::ecalcond::Container >(), condPython.defineWhat< EcalDAQTowerStatus >(), condPython.defineWhat< EcalDCSTowerStatus >(), condPython.defineWhat< EcalDQMChannelStatus >(), condPython.defineWhat< EcalDQMTowerStatus >(), condPython.defineWhat< EcalPedestals >(), condPython.defineWhat< EcalPulseCovariances >(), condPython.defineWhat< EcalPulseShapes >(), condPython.defineWhat< Pedestals >(), condPython.defineWhat< RPCObGas >(), condPython.defineWhat< RPCObImon >(), condPython.defineWhat< RPCObTemp >(), condPython.defineWhat< RPCObVmon >(), pat::PATSingleVertexSelector.filter_(), ConstantStepOdeSolver.getCoordinate(), OOTPileupCorrData.getCorrectionByID(), HBHENegativeEFilter.getEtaIndex(), LMFDat.getNeighbour(), AbsElectronicODERHS.getParameter(), ConstantStepOdeSolver.getPeakTime(), ConstantStepOdeSolver.integrateCoordinate(), ConstantStepOdeSolver.interpolateCoordinate(), MuonResidualsTwoBin.mean(), PiecewiseScalingPolynomial.operator()(), MuonResidualsTwoBin.read(), InputTagDistributorService.retrieve(), TrackMultiSelector.select(), MuonResidualsFitter.selectPeakResiduals_simple(), AbsElectronicODERHS.setParameter(), MuonResidualsTwoBin.stdev(), ConstantStepOdeSolver.truncateCoordinate(), MuonResidualsTwoBin.wmean(), MuonResidualsTwoBin.write(), MuonResidualsFitter.write(), and ConstantStepOdeSolver.writeHistory().
def eostools.xrdcp | ( | src, | |
dest | |||
) |
Does a copy of files using xrd. Colin: implement a generic cp interface as done for rm, ls, etc?
Definition at line 427 of file eostools.py.
eostools.castorToLFN = eosToLFN |
Definition at line 72 of file eostools.py.
eostools.createCastorDir = createEOSDir |
Definition at line 246 of file eostools.py.
eostools.isCastorDir = isEOSDir |
Definition at line 147 of file eostools.py.
eostools.isCastorFile = isEOSFile |
Definition at line 192 of file eostools.py.
eostools.lfnToCastor = lfnToEOS |
Definition at line 117 of file eostools.py.