#include <FileInPath.h>
Public Types | |
enum | LocationCode { Unknown = 0, Local = 1, Release = 2, Data = 3 } |
Public Member Functions | |
FileInPath () | |
FileInPath (const std::string &r) | |
We throw an exception is the referenced file is not found. More... | |
FileInPath (const char *r) | |
const std::string & | fullPath () const |
LocationCode | location () const |
Where was the file found? More... | |
void | read (std::istream &is) |
void | readFromParameterSetBlob (std::istream &is) |
const std::string & | relativePath () const |
void | swap (FileInPath &other) |
void | write (std::ostream &os) const |
Static Public Member Functions | |
static void | disableFileLookup () |
Should only be called while the edmWriteConfigs executable runs. More... | |
static std::string | findFile (std::string const &) |
Private Member Functions | |
void | getEnvironment () |
void | initialize_ () |
Static Private Member Functions | |
static std::string const & | searchPath () |
Private Attributes | |
std::string | canonicalFilename_ |
std::string | dataTop_ |
std::string | localTop_ |
LocationCode | location_ |
std::string | relativePath_ |
std::string | releaseTop_ |
std::string | searchPath_ |
Definition at line 61 of file FileInPath.h.
Enumerator | |
---|---|
Unknown | |
Local | |
Release | |
Data |
Definition at line 63 of file FileInPath.h.
edm::FileInPath::FileInPath | ( | ) |
Default c'tor does no file-existence check; what file would it check for existence?
Definition at line 104 of file FileInPath.cc.
References getEnvironment().
|
explicit |
We throw an exception is the referenced file is not found.
Definition at line 111 of file FileInPath.cc.
References getEnvironment(), and initialize_().
|
explicit |
Definition at line 119 of file FileInPath.cc.
References Exception, edm::errors::FileInPathError, getEnvironment(), and initialize_().
|
static |
Should only be called while the edmWriteConfigs executable runs.
Definition at line 433 of file FileInPath.cc.
|
static |
Uses the same algorithm to find the file but does not determine the location. Returns an empty string if unfound.
Definition at line 435 of file FileInPath.cc.
References EnsembleCalibrationLA_cfg::path, searchPath(), and edm::tokenize().
Referenced by magneticfield::InterpolatorBuilder::build(), and magneticfield::InterpolatorBuilder::InterpolatorBuilder().
const std::string & edm::FileInPath::fullPath | ( | ) | const |
Return a string that can be used to open the referenced file.
Note that operations on this file may fail, including testing for existence. This is because the state of a filesystem is global; other threads, processes, etc., may have removed the file since we checked on its existence at the time of construction of the FileInPath object.
Definition at line 144 of file FileInPath.cc.
References canonicalFilename_.
Referenced by Phase1PixelSummaryMap::addNamedBins(), MillePedeAlignmentAlgorithm::addPxbSurvey(), SiStripPedestalsBuilder::analyze(), SiStripThresholdBuilder::analyze(), SiStripNoisesBuilder::analyze(), SiStripApvGainBuilder::analyze(), SiStripNoisesAndBadCompsChecker::analyze(), JetCorrectorDemo::analyze(), MuonGeometrySVGTemplate::analyze(), HcalLutAnalyzer::analyze(), HGCalWaferValidation::analyze(), PixelRegions::attachedDets(), BeamSpotFakeConditions::BeamSpotFakeConditions(), JetCorrectorDBWriter::beginJob(), ProtonTaggerFilter::beginJob(), OMTFReconstruction::beginRun(), omtf::OmtfPacker::beginRun(), omtf::OmtfUnpacker::beginRun(), GoodSeedProducer::beginRun(), ExternalLHEProducer::beginRunProduce(), HGCalValidator::bookHistograms(), SiStripQualityHotStripIdentifier::bookHistos(), BTagSFProducer::BTagSFProducer(), HcalTPGCoderULUT::buildCoder(), MagGeoBuilderFromDDD::buildInterpolator(), CTPPSCompositeESSource::buildOptics(), CacheData::CacheData(), CaloMiscalibTools::CaloMiscalibTools(), CaloMiscalibToolsMC::CaloMiscalibToolsMC(), GBRForestWriter::categoryEntryType::categoryEntryType(), CTPPSPixelDAQMappingESSourceXML::CompleteFileName(), TotemDAQMappingESSourceXML::CompleteFileName(), createGBRForest(), CSCTFPtLUT::CSCTFPtLUT(), CTPPSOpticalFunctionsESSource::CTPPSOpticalFunctionsESSource(), SiStripPopConNoisesHandlerFromDQM::dqmEndJob(), SiStripPopConPedestalsHandlerFromDQM::dqmEndJob(), SiStripPopConBadComponentsHandlerFromDQM::dqmEndJob(), DTOccupancyTestML::dqmEndLuminosityBlock(), dtCalibration::DTTTrigResidualCorrection::DTTTrigResidualCorrection(), EcalEBPhase2TPParamProducer::EcalEBPhase2TPParamProducer(), ElectronPATIdMVAProducer::ElectronPATIdMVAProducer(), OccupancyPlots::endRun(), ESDataFormatterV4::ESDataFormatterV4(), ESDigiToRaw::ESDigiToRaw(), ESElectronicsMapper::ESElectronicsMapper(), ESIntegrityClient::ESIntegrityClient(), ESPedestalClient::ESPedestalClient(), ESUnpacker::ESUnpacker(), LateralityCoarsedProvider::fill_lat_combinations(), MuonPathSLFitter::fillLuts(), MuonPathCorFitter::fillLuts(), HGCalTriggerGeometryV9Imp2::fillMaps(), HGCalTriggerGeometryV9Imp3::fillMaps(), edm::service::FixMissingStreamerInfos::FixMissingStreamerInfos(), ESTrivialConditionRetriever::getChannelStatusFromConfiguration(), EcalTrivialConditionRetriever::getChannelStatusFromConfiguration(), EcalTrivialConditionRetriever::getMappingFromConfiguration(), SiStripGainFromAsciiFile::getNewObject(), SiStripBadModuleByHandBuilder::getNewObject(), SiStripBadChannelBuilder::getNewObject(), SiStripBadStripFromASCIIFile::getNewObject(), SiStripNoisesFromDBMiscalibrator::getNewObject_withDefaults(), EcalMappingElectronicsHandler::getNewObjects(), EcalTrivialConditionRetriever::getPFRecHitThresholdsFromConfiguration(), EcalTrivialConditionRetriever::getTrgChannelStatusFromConfiguration(), ESTrivialConditionRetriever::getWeightsFromConfiguration(), EcalTrivialConditionRetriever::getWeightsFromConfiguration(), HcalHardcodeCalibrations::HcalHardcodeCalibrations(), HcalLaserEventFilter2012::HcalLaserEventFilter2012(), l1t::HGC3DClusterTMVASelector::HGC3DClusterTMVASelector(), HGCalMappingESProducer::HGCalMappingESProducer(), HGCalNumberingScheme::HGCalNumberingScheme(), HGCalTriggerTowerGeometryHelper::HGCalTriggerTowerGeometryHelper(), HGCalValidator::HGCalValidator(), HGCScintSD::HGCScintSD(), PDFWeightsHelper::Init(), gen::EvtGenInterface::init(), l1tpf::corrector::init_(), CandidateBoostedDoubleSecondaryVertexComputer::initialize(), MuonTagger::initialize(), CandidateChargeBTagComputer::initialize(), CombinedMVAV2JetTagComputer::initialize(), ElectronTagger::initialize(), CharmTagger::initialize(), HeavyIonCSVTagger::initialize(), ApeSettingAlgorithm::initialize(), TritonEDFilterT< G, Capabilities >::initializeGlobalCache(), TritonEDProducerT< G, Capabilities >::initializeGlobalCache(), DeepMETProducer::initializeGlobalCache(), L1NNTauProducer::initializeGlobalCache(), TracksterLinksProducer::initializeGlobalCache(), L1NNCaloTauProducer::initializeGlobalCache(), L1NNCaloTauEmulator::initializeGlobalCache(), DeepTauId::initializeGlobalCache(), L2TauNNProducerAlpaka::initializeGlobalCache(), L2TauNNProducer::initializeGlobalCache(), metsig::SignAlgoResolutions::initializeJetResolutions(), PileupJetIdProducer::initJetEnergyCorrector(), egammaTools::EgammaDNNHelper::initScalerFiles(), reco::DeepSCGraphEvaluation::initTensorFlowGraphAndSession(), L1FPGATrackProducer::L1FPGATrackProducer(), L1TGlobalPrescalesVetosESProducer::L1TGlobalPrescalesVetosESProducer(), L1TGlobalPrescalesVetosFractESProducer::L1TGlobalPrescalesVetosFractESProducer(), L1TMuonOverlapParamsESProducer::L1TMuonOverlapParamsESProducer(), L1TrackVertexAssociationProducer::L1TrackVertexAssociationProducer(), CovarianceParameterization::load(), L1MuDTPtaLut::load(), L1MuDTPhiLut::load(), L1MuDTEtaPatternLut::load(), L1MuBMTEtaPatternLut::load(), L1MuDTQualPatternLut::load(), L1MuBMTQualPatternLut::load(), L1MuDTExtLut::load(), L1TMuonBarrelParamsHelper::load_ext(), L1TMuonBarrelParamsHelper::load_phi(), L1TMuonBarrelParamsHelper::load_pt(), DTCCablingMapProducer::LoadModulesToDTCCablingMapFromCSV(), ClusterShapeHitFilter::loadStripLimits(), main(), SiStripFedCablingFakeESSource::make(), jpt::Map::Map(), MaterialBudgetCategorizer::MaterialBudgetCategorizer(), MPFilter::MPFilter(), MuonHLTSeedMVAClassifier::MuonHLTSeedMVAClassifier(), pat::MuonMvaIDEstimator::MuonMvaIDEstimator(), MuonPathAnalyticAnalyzer::MuonPathAnalyticAnalyzer(), MuonPathAnalyzerInChamber::MuonPathAnalyzerInChamber(), MuonPathAssociator::MuonPathAssociator(), MuonPathConfirmator::MuonPathConfirmator(), MuonPathFitter::MuonPathFitter(), MuonPathSLFitter::MuonPathSLFitter(), MVAJetPuId::MVAJetPuId(), MVAVariableManager< reco::GsfElectron >::MVAVariableManager(), fastsim::NuclearInteraction::NuclearInteraction(), NuclearInteractionSimulator::NuclearInteractionSimulator(), OnlineDQMDigiAD::OnlineDQMDigiAD(), OverlapValidation::OverlapValidation(), HcalTBObjectUnpacker::parseCalib(), cond::persistency::parseFipConnectionString(), EcalEBTrigPrimPhase2ESProducer::parseTextFile(), EcalTrigPrimESProducer::parseTextFile(), EcalTrigTowerConstituentsMapBuilder::parseTextMap(), CaloTowerConstituentsMapBuilder::parseTextMap(), EcalEBTrigPrimPhase2ESProducer::parseWeightsFile(), cms::PileupJPTJetIdAlgo::PileupJPTJetIdAlgo(), PixelTemplateSmearerBase::PixelTemplateSmearerBase(), l1tpf::HGC3DClusterEgID::prepareTMVA(), LwtnnESProducer::produce(), HepPDTESSource::produce(), ALPAKA_ACCELERATOR_NAMESPACE::hgcal::HGCalMappingModuleESProducer::produce(), HcalTPGCoderULUT::produce(), ALPAKA_ACCELERATOR_NAMESPACE::hgcal::HGCalMappingCellESProducer::produce(), SiPixelFakeGainOfflineESSource::produce(), SiPixelFakeGainESSource::produce(), SiPixelFakeGainForHLTESSource::produce(), SiPixelFakeLorentzAngleESSource::produce(), CaloTPGTranscoderULUTs::produce(), MaskedRctInputDigiProducer::produce(), ecaldqm::MLClient::producePlots(), gen::PtYDistributor::PtYDistributor(), gen::Py8HMC3InterfaceBase::Py8HMC3InterfaceBase(), gen::Py8InterfaceBase::Py8InterfaceBase(), PYBIND11_MODULE(), QualityTester::QualityTester(), SiStripApvGainFromFileBuilder::read_tickmark(), reco::DeepSCGraphEvaluation::readInputFeaturesConfig(), CSCTFPtLUT::readLUT(), CSCSectorReceiverLUT::readLUTsFromFile(), GsfBetheHeitlerUpdator::readParameters(), gen::ReggeGribovPartonMCHadronizer::ReggeGribovPartonMCHadronizer(), RPCCalibSetUp::RPCCalibSetUp(), RPCDBSimSetUp::RPCDBSimSetUp(), L1TrackQuality::runEmulatedTQ(), SelectedElectronFEDListProducer< TEle, TCand >::SelectedElectronFEDListProducer(), L1TrackQuality::setL1TrackQuality(), ecaldqm::LedClient::setParams(), ShiftedJetProducerT< T, Textractor >::ShiftedJetProducerT(), ShiftedPFCandidateProducerForNoPileUpPFMEt::ShiftedPFCandidateProducerForNoPileUpPFMEt(), ShiftedPFCandidateProducerForPFNoPUMEt::ShiftedPFCandidateProducerForPFNoPUMEt(), SiLinearChargeDivider::SiLinearChargeDivider(), SiStripApvGainFakeESSource::SiStripApvGainFakeESSource(), SiStripBadModuleConfigurableFakeESSource::SiStripBadModuleConfigurableFakeESSource(), SiStripBaseDelayFakeESSource::SiStripBaseDelayFakeESSource(), SiStripClusters2ApproxClusters::SiStripClusters2ApproxClusters(), SiStripDigitizerAlgorithm::SiStripDigitizerAlgorithm(), SiStripFedCablingFakeESSource::SiStripFedCablingFakeESSource(), SiStripHitEffFromCalibTree::SiStripHitEffFromCalibTree(), SiStripHitResolFromCalibTree::SiStripHitResolFromCalibTree(), SiStripLatencyFakeESSource::SiStripLatencyFakeESSource(), SiStripNoisesFakeESSource::SiStripNoisesFakeESSource(), SiStripPedestalsFakeESSource::SiStripPedestalsFakeESSource(), SiStripThresholdFakeESSource::SiStripThresholdFakeESSource(), trends(), TritonClient::TritonClient(), TtSemiLepHitFitProducer< LeptonCollection >::TtSemiLepHitFitProducer(), emtf::phase2::EMTFContext::update(), l1tVertexFinder::AlgoSettings::vx_pattrec_graph(), l1tVertexFinder::AlgoSettings::vx_trkw_graph(), and FWRecoGeometryESProducer::writeTrackerParametersXML().
|
private |
Definition at line 329 of file FileInPath.cc.
References dataTop_, Exception, edm::errors::FileInPathError, localTop_, releaseTop_, searchPath(), searchPath_, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by FileInPath().
|
private |
Definition at line 359 of file FileInPath.cc.
References beamvalidation::br, canonicalFilename_, Data, dataTop_, Exception, edm::errors::FileInPathError, Local, localTop_, location_, EnsembleCalibrationLA_cfg::path, relativePath_, Release, releaseTop_, searchPath_, and edm::tokenize().
Referenced by FileInPath().
FileInPath::LocationCode edm::FileInPath::location | ( | ) | const |
Where was the file found?
Definition at line 142 of file FileInPath.cc.
References location_.
Referenced by ShiftedJetProducerT< T, Textractor >::ShiftedJetProducerT(), ShiftedPFCandidateProducerForNoPileUpPFMEt::ShiftedPFCandidateProducerForNoPileUpPFMEt(), and ShiftedPFCandidateProducerForPFNoPUMEt::ShiftedPFCandidateProducerForPFNoPUMEt().
void edm::FileInPath::read | ( | std::istream & | is | ) |
Read from the given istream, and set contents accordingly. Reading errors are reflected in the state of the stream.
Definition at line 189 of file FileInPath.cc.
References canonicalFilename_, Data, dataTop_, Exception, edm::errors::FileInPathError, isotrackTrainRegressor::loc, DTRecHitClients_cfi::local, Local, localTop_, location_, relativePath_, Release, releaseTop_, AlCaHLTBitMon_QueryRunRegistry::string, Unknown, and relval_steps::version.
Referenced by edmIntegrityCheck.PublishToFileSystem::get(), and edm::operator>>().
void edm::FileInPath::readFromParameterSetBlob | ( | std::istream & | is | ) |
Definition at line 263 of file FileInPath.cc.
References canonicalFilename_, Data, dataTop_, Exception, edm::errors::FileInPathError, isotrackTrainRegressor::loc, DTRecHitClients_cfi::local, Local, localTop_, location_, relativePath_, Release, releaseTop_, AlCaHLTBitMon_QueryRunRegistry::string, Unknown, and relval_steps::version.
const std::string & edm::FileInPath::relativePath | ( | ) | const |
Return a string containing the canonical form of the relative path. DO NOT USE THIS AS THE FILENAME for any file operations; use fullPath() for that purpose.
Definition at line 140 of file FileInPath.cc.
References relativePath_.
Referenced by PDFWeightsHelper::Init(), and PYBIND11_MODULE().
|
staticprivate |
Definition at line 323 of file FileInPath.cc.
References AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by findFile(), and getEnvironment().
void edm::FileInPath::swap | ( | FileInPath & | other | ) |
Definition at line 130 of file FileInPath.cc.
References canonicalFilename_, dataTop_, localTop_, location_, trackingPlots::other, relativePath_, releaseTop_, searchPath_, and edm::swap().
void edm::FileInPath::write | ( | std::ostream & | os | ) | const |
Write contents to the given ostream. Writing errors are reflected in the state of the stream.
Definition at line 146 of file FileInPath.cc.
References canonicalFilename_, Data, dataTop_, Exception, edm::errors::FileInPathError, Local, localTop_, location_, l1tGTMenu_BTagSeeds_cff::os, relativePath_, Release, releaseTop_, Unknown, and relval_steps::version.
Referenced by edm::operator<<().
|
private |
Definition at line 113 of file FileInPath.h.
Referenced by fullPath(), initialize_(), read(), readFromParameterSetBlob(), swap(), and write().
|
private |
Definition at line 117 of file FileInPath.h.
Referenced by getEnvironment(), initialize_(), read(), readFromParameterSetBlob(), swap(), and write().
|
private |
Definition at line 115 of file FileInPath.h.
Referenced by getEnvironment(), initialize_(), read(), readFromParameterSetBlob(), swap(), and write().
|
private |
Definition at line 114 of file FileInPath.h.
Referenced by initialize_(), location(), read(), readFromParameterSetBlob(), swap(), and write().
|
private |
Definition at line 112 of file FileInPath.h.
Referenced by initialize_(), read(), readFromParameterSetBlob(), relativePath(), swap(), and write().
|
private |
Definition at line 116 of file FileInPath.h.
Referenced by getEnvironment(), initialize_(), read(), readFromParameterSetBlob(), swap(), and write().
|
private |
Definition at line 118 of file FileInPath.h.
Referenced by getEnvironment(), initialize_(), and swap().