#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) | |
FileInPath (FileInPath const &other) | |
std::string | fullPath () const |
LocationCode | location () const |
Where was the file found? More... | |
FileInPath & | operator= (FileInPath const &other) |
void | read (std::istream &is) |
void | readFromParameterSetBlob (std::istream &is) |
std::string | relativePath () const |
void | swap (FileInPath &other) |
void | write (std::ostream &os) const |
~FileInPath () | |
Static Public Member Functions | |
static void | disableFileLookup () |
Should only be called while the edmWriteConfigs executable runs. More... | |
Private Member Functions | |
void | getEnvironment () |
void | initialize_ () |
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 64 of file FileInPath.h.
Enumerator | |
---|---|
Unknown | |
Local | |
Release | |
Data |
Definition at line 66 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 106 of file FileInPath.cc.
References getEnvironment().
|
explicit |
We throw an exception is the referenced file is not found.
Definition at line 113 of file FileInPath.cc.
References getEnvironment(), and initialize_().
|
explicit |
Definition at line 121 of file FileInPath.cc.
References Exception, edm::errors::FileInPathError, getEnvironment(), and initialize_().
edm::FileInPath::FileInPath | ( | FileInPath const & | other | ) |
Definition at line 132 of file FileInPath.cc.
edm::FileInPath::~FileInPath | ( | ) |
Definition at line 141 of file FileInPath.cc.
|
static |
Should only be called while the edmWriteConfigs executable runs.
Definition at line 436 of file FileInPath.cc.
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 163 of file FileInPath.cc.
References canonicalFilename_.
Referenced by MillePedeAlignmentAlgorithm::addPxbSurvey(), SiStripNoisesBuilder::analyze(), SiStripPedestalsBuilder::analyze(), SiStripThresholdBuilder::analyze(), SiStripApvGainBuilder::analyze(), JetCorrectorDemo::analyze(), MuonGeometrySVGTemplate::analyze(), HcalLutAnalyzer::analyze(), DetIdSelectorTest::analyze(), BeamSpotFakeConditions::BeamSpotFakeConditions(), AntiElectronIDMVA5::beginEvent(), AntiElectronIDMVA6::beginEvent(), JetCorrectorDBWriter::beginJob(), ProtonTaggerFilter::beginJob(), omtf::OmtfPacker::beginRun(), omtf::OmtfUnpacker::beginRun(), GoodSeedProducer::beginRun(), HGCalValidator::bookHistograms(), BTagSFProducer::BTagSFProducer(), HcalTPGCoderULUT::buildCoder(), SiStripDetVOffBuilder::BuildDetVOffObj(), MagGeoBuilderFromDDD::buildInterpolator(), HGCalTriggerGeometryImp1::buildMaps(), CaloMiscalibTools::CaloMiscalibTools(), CaloMiscalibToolsMC::CaloMiscalibToolsMC(), CastorTextCalibrations::CastorTextCalibrations(), GBRForestWriter::categoryEntryType::categoryEntryType(), CTPPSPixelDAQMappingESSourceXML::CompleteFileName(), TotemDAQMappingESSourceXML::CompleteFileName(), createGBRForest(), CSCMonitorModule::CSCMonitorModule(), CSCTFPtLUT::CSCTFPtLUT(), DatabasePDG::DatabasePDG(), SiStripPopConNoisesHandlerFromDQM::dqmEndJob(), SiStripPopConPedestalsHandlerFromDQM::dqmEndJob(), SiStripPopConBadComponentsHandlerFromDQM::dqmEndJob(), SiStripPopConFEDErrorsHandlerFromDQM::dqmEndJob(), DTOccupancyTestML::dqmEndLuminosityBlock(), dtCalibration::DTTTrigResidualCorrection::DTTTrigResidualCorrection(), EcalDQMonitorClient::EcalDQMonitorClient(), ElectronIdMVAProducer::ElectronIdMVAProducer(), ElectronPATIdMVAProducer::ElectronPATIdMVAProducer(), EmulateCPPF::EmulateCPPF(), OccupancyPlots::endRun(), ESDataFormatterV4::ESDataFormatterV4(), ESDigiToRaw::ESDigiToRaw(), ESElectronicsMapper::ESElectronicsMapper(), ESIntegrityClient::ESIntegrityClient(), ESPedestalClient::ESPedestalClient(), MultipleScatteringX0Data::fileName(), CSCReadoutMappingFromFile::fill(), HGCalTriggerGeometryHexImp1::fillMaps(), HGCalTriggerGeometryV9Imp2::fillMaps(), HGCalTriggerGeometryHexImp2::fillMaps(), HGCalTriggerGeometryHexLayerBasedImp1::fillMaps(), HGCalTriggerGeometryV9Imp1::fillMaps(), HGCalTriggerGeometryV9Imp1::fillNeighborMap(), HGCalTriggerGeometryHexImp2::fillNeighborMaps(), HGCalTriggerGeometryHexLayerBasedImp1::fillNeighborMaps(), SiStripGain::fillNewGain(), popcon::SiStripPopConHandlerUnitTest< T >::fillObject(), popcon::SiStripPopConHandlerUnitTestGain< T >::fillObject(), popcon::SiStripPopConHandlerUnitTestNoise< T >::fillObject(), SiStripPI::fillTotalComponents(), muonisolation::IsolatorByNominalEfficiency::findPath(), G4ProcessHelper::G4ProcessHelper(), GEMRecHitProducer::GEMRecHitProducer(), gen::BaseHadronizer::generateLHE(), GeometryConfiguration::GeometryConfiguration(), ESTrivialConditionRetriever::getChannelStatusFromConfiguration(), EcalTrivialConditionRetriever::getChannelStatusFromConfiguration(), EcalTrivialConditionRetriever::getMappingFromConfiguration(), SiStripBadStripFromASCIIFile::getNewObject(), SiStripGainFromAsciiFile::getNewObject(), SiStripBadFiberBuilder::getNewObject(), SiStripBadChannelBuilder::getNewObject(), SiStripNoisesFromDBMiscalibrator::getNewObject_withDefaults(), EcalMappingElectronicsHandler::getNewObjects(), EcalTrivialConditionRetriever::getTrgChannelStatusFromConfiguration(), ESTrivialConditionRetriever::getWeightsFromConfiguration(), EcalTrivialConditionRetriever::getWeightsFromConfiguration(), HcalHardcodeCalibrations::HcalHardcodeCalibrations(), HcalLaserEventFilter2012::HcalLaserEventFilter2012(), HcalTextCalibrations::HcalTextCalibrations(), l1t::HGC3DClusterTMVASelector::HGC3DClusterTMVASelector(), HGCalTriggerTowerGeometryHelper::HGCalTriggerTowerGeometryHelper(), HGCalValidator::HGCalValidator(), PDFWeightsHelper::Init(), gen::EvtGenInterface::init(), CandidateBoostedDoubleSecondaryVertexComputer::initialize(), CombinedMVAV2JetTagComputer::initialize(), MuonTagger::initialize(), CandidateChargeBTagComputer::initialize(), ElectronTagger::initialize(), CharmTagger::initialize(), ApeSettingAlgorithm::initialize(), deep_tau::DeepTauBase::initializeGlobalCache(), PileupJetIdProducer::initJetEnergyCorrector(), JetCalibrationParameterSetTauJet::JetCalibrationParameterSetTauJet(), JetPartonNamespace::JetPartonCalibrationParameterSet::JetPartonCalibrationParameterSet(), L1GtTriggerMenuXmlProducer::L1GtTriggerMenuXmlProducer(), L1TCaloParamsESProducer::L1TCaloParamsESProducer(), L1TCaloStage2ParamsESProducer::L1TCaloStage2ParamsESProducer(), L1TGlobalPrescalesVetosESProducer::L1TGlobalPrescalesVetosESProducer(), l1t::L1TGlobalUtil::L1TGlobalUtil(), L1TMuonBarrelKalmanLUTs::L1TMuonBarrelKalmanLUTs(), L1TMuonBarrelParamsESProducer::L1TMuonBarrelParamsESProducer(), L1TMuonGlobalParamsESProducer::L1TMuonGlobalParamsESProducer(), L1TMuonOverlapParamsESProducer::L1TMuonOverlapParamsESProducer(), CovarianceParameterization::load(), L1MuDTPhiLut::load(), L1MuDTPtaLut::load(), L1MuDTEtaPatternLut::load(), L1MuBMTEtaPatternLut::load(), L1MuDTQualPatternLut::load(), L1MuBMTQualPatternLut::load(), L1MuDTExtLut::load(), L1TMuonBarrelParamsHelper::load_ext(), EcalDeadChannelRecoveryNN< DetIdT >::load_file(), L1TMuonBarrelParamsHelper::load_phi(), L1TMuonBarrelParamsHelper::load_pt(), DTCCablingMapProducer::LoadModulesToDTCCablingMapFromCSV(), PFMETAlgorithmMVA::loadMVAfromFile(), ClusterShapeHitFilter::loadStripLimits(), SiStripFedCablingFakeESSource::make(), jpt::Map::Map(), MaterialBudgetCategorizer::MaterialBudgetCategorizer(), MultiEventFilter::MultiEventFilter(), MuonErrorMatrix::MuonErrorMatrix(), PhysicsTools::MVAComputerESSourceBase::MVAComputerESSourceBase(), MVAJetPuId::MVAJetPuId(), PhysicsTools::MVATrainer::MVATrainer(), MVAVariableManager< reco::GsfElectron >::MVAVariableManager(), fastsim::NuclearInteraction::NuclearInteraction(), NuclearInteractionSimulator::NuclearInteractionSimulator(), gen::Herwig6Instance::openParticleSpecFile(), OverlapValidation::OverlapValidation(), l1t::L1TGlobalUtil::OverridePrescalesAndMasks(), HcalTBObjectUnpacker::parseCalib(), cond::persistency::parseFipConnectionString(), DDLParser::parseOneFile(), EcalTrigPrimESProducer::parseTextFile(), EcalTrigTowerConstituentsMapBuilder::parseTextMap(), CaloTowerConstituentsMapBuilder::parseTextMap(), cms::PileupJPTJetIdAlgo::PileupJPTJetIdAlgo(), PixelTemplateSmearerBase::PixelTemplateSmearerBase(), SiPixelFakeCPEGenericErrorParmESSource::produce(), SiPixelFakeTemplateDBObjectESSource::produce(), SiPixelFakeGenErrorDBObjectESSource::produce(), LwtnnESProducer::produce(), HBHEDarkeningEP::produce(), HepPDTESSource::produce(), SiPixelFakeGainOfflineESSource::produce(), SiPixelFakeGainESSource::produce(), SiPixelFakeGainForHLTESSource::produce(), SiPixelFakeLorentzAngleESSource::produce(), CaloTPGTranscoderULUTs::produce(), MaskedRctInputDigiProducer::produce(), JetCorrectionESSource< Corrector >::produce(), gen::PtYDistributor::PtYDistributor(), SiPixelTemplate2D::pushfile(), SiPixelTemplate::pushfile(), gen::Py8InterfaceBase::Py8InterfaceBase(), PYBIND11_MODULE(), FIPConfiguration::readConfig(), CSCTFPtLUT::readLUT(), CSCSectorReceiverLUT::readLUTsFromFile(), GsfBetheHeitlerUpdator::readParameters(), gen::ReggeGribovPartonMCHadronizer::ReggeGribovPartonMCHadronizer(), RPCCalibSetUp::RPCCalibSetUp(), RPCDBSimSetUp::RPCDBSimSetUp(), RPCRecHitProducer::RPCRecHitProducer(), gen::Pythia6Service::setPYUPDAParams(), gen::Pythia6Service::setSLHAParams(), PhiSymmetryCalibration::setUp(), HcalTPGCoderULUT::setupDBRecord(), ShiftedJetProducerT< T, Textractor >::ShiftedJetProducerT(), ShiftedPFCandidateProducerForNoPileUpPFMEt::ShiftedPFCandidateProducerForNoPileUpPFMEt(), ShiftedPFCandidateProducerForPFNoPUMEt::ShiftedPFCandidateProducerForPFNoPUMEt(), SiLinearChargeDivider::SiLinearChargeDivider(), SiStripAnalyser::SiStripAnalyser(), SiStripBadModuleByHandBuilder::SiStripBadModuleByHandBuilder(), SiStripDetInfoFileReader::SiStripDetInfoFileReader(), SiStripDigitizerAlgorithm::SiStripDigitizerAlgorithm(), SiStripHitEffFromCalibTree::SiStripHitEffFromCalibTree(), SiStripQuality::SiStripQuality(), SiStripQualityHotStripIdentifier::SiStripQualityHotStripIdentifier(), SiStripQualityStatistics::SiStripQualityStatistics(), PhysicsTools::MVATrainerLooper::Trainer::Trainer(), TtSemiLepHitFitProducer< LeptonCollection >::TtSemiLepHitFitProducer(), FWRecoGeometryESProducer::writeTrackerParametersXML(), and ZSPJPTJetCorrector::ZSPJPTJetCorrector().
|
private |
Definition at line 333 of file FileInPath.cc.
References dataTop_, Exception, edm::errors::FileInPathError, localTop_, releaseTop_, searchPath_, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by FileInPath().
|
private |
Definition at line 364 of file FileInPath.cc.
References beamvalidation::br, canonicalFilename_, Data, dataTop_, Exception, edm::errors::FileInPathError, Local, localTop_, location_, callgraph::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 161 of file FileInPath.cc.
References location_.
Referenced by AntiElectronIDMVA5::beginEvent(), AntiElectronIDMVA6::beginEvent(), PFMETAlgorithmMVA::loadMVAfromFile(), edm::operator==(), ShiftedJetProducerT< T, Textractor >::ShiftedJetProducerT(), ShiftedPFCandidateProducerForNoPileUpPFMEt::ShiftedPFCandidateProducerForNoPileUpPFMEt(), and ShiftedPFCandidateProducerForPFNoPUMEt::ShiftedPFCandidateProducerForPFNoPUMEt().
FileInPath & edm::FileInPath::operator= | ( | FileInPath const & | other | ) |
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 204 of file FileInPath.cc.
References canonicalFilename_, Data, dataTop_, Exception, edm::errors::FileInPathError, create_public_lumi_plots::loc, DTRecHitClients_cfi::local, Local, localTop_, location_, relativePath_, Release, releaseTop_, AlCaHLTBitMon_QueryRunRegistry::string, Unknown, and jets_cff::version.
Referenced by edmIntegrityCheck.PublishToFileSystem::get(), and edm::operator>>().
void edm::FileInPath::readFromParameterSetBlob | ( | std::istream & | is | ) |
Definition at line 275 of file FileInPath.cc.
References canonicalFilename_, Data, dataTop_, Exception, edm::errors::FileInPathError, create_public_lumi_plots::loc, DTRecHitClients_cfi::local, Local, localTop_, location_, relativePath_, Release, releaseTop_, AlCaHLTBitMon_QueryRunRegistry::string, Unknown, and jets_cff::version.
Referenced by edm::decode().
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 159 of file FileInPath.cc.
References relativePath_.
Referenced by FWPSetTableManager::handleEntry(), PDFWeightsHelper::Init(), edm::operator==(), and PYBIND11_MODULE().
void edm::FileInPath::swap | ( | FileInPath & | other | ) |
Definition at line 149 of file FileInPath.cc.
References canonicalFilename_, dataTop_, localTop_, location_, relativePath_, releaseTop_, searchPath_, and std::swap().
Referenced by operator=(), 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 165 of file FileInPath.cc.
References canonicalFilename_, Data, dataTop_, Exception, edm::errors::FileInPathError, Local, localTop_, location_, relativePath_, Release, releaseTop_, Unknown, and jets_cff::version.
Referenced by pkg.AbstractPkg::generate(), and edm::operator<<().
|
private |
Definition at line 114 of file FileInPath.h.
Referenced by fullPath(), initialize_(), read(), readFromParameterSetBlob(), swap(), and write().
|
private |
Definition at line 118 of file FileInPath.h.
Referenced by getEnvironment(), initialize_(), read(), readFromParameterSetBlob(), 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 115 of file FileInPath.h.
Referenced by initialize_(), location(), read(), readFromParameterSetBlob(), swap(), and write().
|
private |
Definition at line 113 of file FileInPath.h.
Referenced by initialize_(), read(), readFromParameterSetBlob(), relativePath(), 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 119 of file FileInPath.h.
Referenced by getEnvironment(), initialize_(), and swap().