#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 () | |
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 68 of file FileInPath.h.
Enumerator | |
---|---|
Unknown | |
Local | |
Release | |
Data |
Definition at line 72 of file FileInPath.h.
FileInPath::FileInPath | ( | ) |
Default c'tor does no file-existence check; what file would it check for existence?
Definition at line 109 of file FileInPath.cc.
References getEnvironment().
|
explicit |
We throw an exception is the referenced file is not found.
Definition at line 117 of file FileInPath.cc.
References getEnvironment(), and initialize_().
|
explicit |
Definition at line 126 of file FileInPath.cc.
References Exception, edm::errors::FileInPathError, getEnvironment(), and initialize_().
FileInPath::FileInPath | ( | FileInPath const & | other | ) |
Definition at line 138 of file FileInPath.cc.
FileInPath::~FileInPath | ( | ) |
Definition at line 148 of file FileInPath.cc.
std::string 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 184 of file FileInPath.cc.
References canonicalFilename_.
Referenced by MillePedeAlignmentAlgorithm::addPxbSurvey(), SiStripBadFiberBuilder::algoAnalyze(), SiStripBadChannelBuilder::algoAnalyze(), SiStripNoisesBuilder::analyze(), SiStripPedestalsBuilder::analyze(), SiStripThresholdBuilder::analyze(), SiStripApvGainBuilder::analyze(), SiStripNoiseNormalizedWithApvGainBuilder::analyze(), JetCorrectorDemo::analyze(), SiStripApvGainBuilderFromTag::analyze(), MuonGeometrySVGTemplate::analyze(), cms::HcalConstantsASCIIWriter::analyze(), DetIdSelectorTest::analyze(), BeamSpotFakeConditions::BeamSpotFakeConditions(), AntiElectronIDMVA5::beginEvent(), AntiElectronIDMVA6::beginEvent(), METCorrectorDBWriter::beginJob(), JetCorrectorDBWriter::beginJob(), ProtonTaggerFilter::beginJob(), cms::HcalConstantsASCIIWriter::beginJob(), GoodSeedProducer::beginRun(), BOOST_PYTHON_MODULE(), HcalTPGCoderULUT::buildCoder(), SiStripDetVOffBuilder::BuildDetVOffObj(), MagGeoBuilderFromDDD::buildInterpolator(), MaterialBudgetCategorizer::buildMaps(), CaloMiscalibTools::CaloMiscalibTools(), CaloMiscalibToolsMC::CaloMiscalibToolsMC(), CastorTextCalibrations::CastorTextCalibrations(), GBRForestWriter::categoryEntryType::categoryEntryType(), SiStripThresholdGenerator::createObject(), SiStripBadModuleGenerator::createObject(), SiStripNoisesGenerator::createObject(), SiStripLatencyGenerator::createObject(), SiStripBaseDelayGenerator::createObject(), SiStripBackPlaneCorrectionGenerator::createObject(), SiStripLorentzAngleGenerator::createObject(), PhotonMVAEstimatorRun2Phys14NonTrig::createSingleReader(), PhotonMVAEstimatorRun2Spring15NonTrig::createSingleReader(), ElectronMVAEstimatorRun2Phys14NonTrig::createSingleReader(), ElectronMVAEstimatorRun2Spring15Trig::createSingleReader(), ElectronMVAEstimatorRun2Spring15NonTrig::createSingleReader(), CSCMonitorModule::CSCMonitorModule(), CSCTFPtLUT::CSCTFPtLUT(), CustomPhysicsList::CustomPhysicsList(), CustomPhysicsListSS::CustomPhysicsListSS(), DatabasePDG::DatabasePDG(), HcalTPGCoderULUT::dbRecordCallback(), dtCalibration::DTTTrigResidualCorrection::DTTTrigResidualCorrection(), EcalDQMonitorClient::EcalDQMonitorClient(), ElectronIdMVAProducer::ElectronIdMVAProducer(), ElectronPATIdMVAProducer::ElectronPATIdMVAProducer(), OccupancyPlots::endRun(), ESDataFormatterV4::ESDataFormatterV4(), ESElectronicsMapper::ESElectronicsMapper(), ESIntegrityClient::ESIntegrityClient(), ESPedestalClient::ESPedestalClient(), MultipleScatteringX0Data::fileName(), CSCReadoutMappingFromFile::fill(), SiStripGain::fillNewGain(), popcon::SiStripPopConHandlerUnitTest< T >::fillObject(), popcon::SiStripPopConHandlerUnitTestGain< T >::fillObject(), popcon::SiStripPopConHandlerUnitTestNoise< T >::fillObject(), muonisolation::IsolatorByNominalEfficiency::findPath(), gen::BaseHadronizer::generateLHE(), GeometryConfiguration::GeometryConfiguration(), ESTrivialConditionRetriever::getChannelStatusFromConfiguration(), EcalTrivialConditionRetriever::getChannelStatusFromConfiguration(), getfullpathfromfip_(), EcalTrivialConditionRetriever::getMappingFromConfiguration(), SiStripGainFromAsciiFile::getNewObject(), SiStripBadStripFromASCIIFile::getNewObject(), EcalMappingElectronicsHandler::getNewObjects(), EcalTrivialConditionRetriever::getTrgChannelStatusFromConfiguration(), ESTrivialConditionRetriever::getWeightsFromConfiguration(), EcalTrivialConditionRetriever::getWeightsFromConfiguration(), HcalLaserEventFilter2012::HcalLaserEventFilter2012(), HcalTextCalibrations::HcalTextCalibrations(), pfEGHelpers::HeavyObjectCache::HeavyObjectCache(), PDFWeightsHelper::Init(), gen::EvtGenInterface::init(), CombinedMVAV2JetTagComputer::initialize(), MuonTagger::initialize(), CandidateChargeBTagComputer::initialize(), ElectronTagger::initialize(), CandidateBoostedDoubleSecondaryVertexComputer::initialize(), CharmTagger::initialize(), ApeSettingAlgorithm::initialize(), PileupJetIdProducer::initJetEnergyCorrector(), JetCalibrationParameterSetTauJet::JetCalibrationParameterSetTauJet(), JetPartonNamespace::JetPartonCalibrationParameterSet::JetPartonCalibrationParameterSet(), L1GtTriggerMenuXmlProducer::L1GtTriggerMenuXmlProducer(), L1TCaloParamsESProducer::L1TCaloParamsESProducer(), l1t::L1TGlobalUtil::L1TGlobalUtil(), L1TMuonOverlapParamsESProducer::L1TMuonOverlapParamsESProducer(), L1MuDTPtaLut::load(), L1MuDTPhiLut::load(), L1MuDTEtaPatternLut::load(), L1MuDTQualPatternLut::load(), L1MuDTExtLut::load(), L1TMuonBarrelParamsESProducer::load_ext(), EcalDeadChannelRecoveryNN< DetIdT >::load_file(), L1TMuonBarrelParamsESProducer::load_phi(), L1TMuonBarrelParamsESProducer::load_pt(), PFMETAlgorithmMVA::loadMVAfromFile(), ClusterShapeHitFilter::loadStripLimits(), SiStripFedCablingFakeESSource::make(), SiStripHashedDetIdFakeESSource::make(), jpt::Map::Map(), MultiEventFilter::MultiEventFilter(), MuonErrorMatrix::MuonErrorMatrix(), PhysicsTools::MVAComputerESSourceBase::MVAComputerESSourceBase(), MVAJetPuId::MVAJetPuId(), PhysicsTools::MVATrainer::MVATrainer(), NuclearInteractionSimulator::NuclearInteractionSimulator(), OMTFProcessor::OMTFProcessor(), gen::Herwig6Instance::openParticleSpecFile(), l1t::L1TGlobalUtil::OverridePrescalesAndMasks(), HcalTBObjectUnpacker::parseCalib(), cond::persistency::parseFipConnectionString(), DDLParser::parseOneFile(), EcalTrigPrimESProducer::parseTextFile(), EcalTrigTowerConstituentsMapBuilder::parseTextMap(), CaloTowerConstituentsMapBuilder::parseTextMap(), PileupJetIdAlgo::PileupJetIdAlgo(), cms::PileupJPTJetIdAlgo::PileupJPTJetIdAlgo(), SiPixelFakeCPEGenericErrorParmESSource::produce(), SiPixelFakeGenErrorDBObjectESSource::produce(), SiPixelFakeTemplateDBObjectESSource::produce(), HepPDTESSource::produce(), SiPixelFakeGainOfflineESSource::produce(), SiPixelFakeGainForHLTESSource::produce(), SiPixelFakeGainESSource::produce(), SiPixelFakeLorentzAngleESSource::produce(), CaloTPGTranscoderULUTs::produce(), MaskedRctInputDigiProducer::produce(), JetCorrectionESSource< Corrector >::produce(), gen::PtYDistributor::PtYDistributor(), SiStripFEDErrorsDQM::readBadAPVs(), SiStripBadComponentsDQMService::readBadComponents(), FIPConfiguration::readConfig(), CSCTFPtLUT::readLUT(), CSCSectorReceiverLUT::readLUTsFromFile(), SiStripNoisesDQMService::readNoises(), GsfBetheHeitlerUpdator::readParameters(), SiStripPedestalsDQMService::readPedestals(), gen::ReggeGribovPartonMCHadronizer::ReggeGribovPartonMCHadronizer(), RPCCalibSetUp::RPCCalibSetUp(), RPCDBSimSetUp::RPCDBSimSetUp(), RPCRecHitProducer::RPCRecHitProducer(), gen::Pythia6Service::setPYUPDAParams(), gen::Pythia6Service::setSLHAParams(), PhiSymmetryCalibration::setUp(), ShiftedJetProducerT< T, Textractor >::ShiftedJetProducerT(), ShiftedPFCandidateProducerForNoPileUpPFMEt::ShiftedPFCandidateProducerForNoPileUpPFMEt(), ShiftedPFCandidateProducerForPFNoPUMEt::ShiftedPFCandidateProducerForPFNoPUMEt(), SiStripBadModuleByHandBuilder::SiStripBadModuleByHandBuilder(), SiStripDetInfoFileReader::SiStripDetInfoFileReader(), SiStripHitEffFromCalibTree::SiStripHitEffFromCalibTree(), SiStripQuality::SiStripQuality(), SiStripQualityHotStripIdentifier::SiStripQualityHotStripIdentifier(), SiStripQualityHotStripIdentifierRoot::SiStripQualityHotStripIdentifierRoot(), SiStripQualityStatistics::SiStripQualityStatistics(), PhysicsTools::MVATrainerLooper::Trainer::Trainer(), TtSemiLepHitFitProducer< LeptonCollection >::TtSemiLepHitFitProducer(), and ZSPJPTJetCorrector::ZSPJPTJetCorrector().
|
private |
Definition at line 393 of file FileInPath.cc.
References dataTop_, Exception, edm::errors::FileInPathError, localTop_, releaseTop_, searchPath_, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by FileInPath().
|
private |
Definition at line 427 of file FileInPath.cc.
References beamvalidation::br, canonicalFilename_, Data, dataTop_, Exception, edm::errors::FileInPathError, Local, localTop_, location_, fed_dqm_sourceclient-live_cfg::path, relativePath_, Release, releaseTop_, searchPath_, and edm::tokenize().
Referenced by FileInPath().
FileInPath::LocationCode FileInPath::location | ( | ) | const |
Where was the file found?
Definition at line 178 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 & FileInPath::operator= | ( | FileInPath const & | other | ) |
Definition at line 151 of file FileInPath.cc.
References swap(), and groupFilesInBlocks::temp.
void 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 253 of file FileInPath.cc.
References canonicalFilename_, Data, dataTop_, Exception, edm::errors::FileInPathError, Local, localTop_, location_, relativePath_, Release, releaseTop_, AlCaHLTBitMon_QueryRunRegistry::string, Unknown, and relval_steps::version.
Referenced by edmIntegrityCheck.PublishToFileSystem::get(), and edm::operator>>().
void FileInPath::readFromParameterSetBlob | ( | std::istream & | is | ) |
Definition at line 332 of file FileInPath.cc.
References canonicalFilename_, Data, dataTop_, Exception, edm::errors::FileInPathError, Local, localTop_, location_, relativePath_, Release, releaseTop_, AlCaHLTBitMon_QueryRunRegistry::string, Unknown, and relval_steps::version.
Referenced by edm::decode().
std::string 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 171 of file FileInPath.cc.
References relativePath_.
Referenced by BOOST_PYTHON_MODULE(), FWPSetTableManager::handleEntry(), PDFWeightsHelper::Init(), and edm::operator==().
void FileInPath::swap | ( | FileInPath & | other | ) |
Definition at line 159 of file FileInPath.cc.
References canonicalFilename_, dataTop_, localTop_, location_, relativePath_, releaseTop_, searchPath_, and std::swap().
Referenced by operator=(), and edm::swap().
void 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 190 of file FileInPath.cc.
References canonicalFilename_, Data, dataTop_, Exception, edm::errors::FileInPathError, Local, localTop_, location_, relativePath_, Release, releaseTop_, Unknown, and relval_steps::version.
Referenced by pkg.AbstractPkg::generate(), and edm::operator<<().
|
private |
Definition at line 121 of file FileInPath.h.
Referenced by fullPath(), initialize_(), read(), readFromParameterSetBlob(), swap(), and write().
|
private |
Definition at line 125 of file FileInPath.h.
Referenced by getEnvironment(), initialize_(), read(), readFromParameterSetBlob(), swap(), and write().
|
private |
Definition at line 123 of file FileInPath.h.
Referenced by getEnvironment(), initialize_(), read(), readFromParameterSetBlob(), swap(), and write().
|
private |
Definition at line 122 of file FileInPath.h.
Referenced by initialize_(), location(), read(), readFromParameterSetBlob(), swap(), and write().
|
private |
Definition at line 120 of file FileInPath.h.
Referenced by initialize_(), read(), readFromParameterSetBlob(), relativePath(), swap(), and write().
|
private |
Definition at line 124 of file FileInPath.h.
Referenced by getEnvironment(), initialize_(), read(), readFromParameterSetBlob(), swap(), and write().
|
private |
Definition at line 126 of file FileInPath.h.
Referenced by getEnvironment(), initialize_(), and swap().