CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Private Attributes
edm::ESHandleBase Class Reference

#include <ESHandle.h>

Inheritance diagram for edm::ESHandleBase:
edm::ESHandle< T > edm::ESHandle< fwliteeswriter::DummyType > edm::ESTransientHandle< T > edm::ESHandle< Alignments > edm::ESHandle< CaloGeometry > edm::ESHandle< CaloSubdetectorGeometry > edm::ESHandle< CaloTopology > edm::ESHandle< CaloTowerConstituentsMap > edm::ESHandle< CentralityTable > edm::ESHandle< ClusterShapeHitFilter > edm::ESHandle< CSCBadChambers > edm::ESHandle< CSCBadStrips > edm::ESHandle< CSCBadWires > edm::ESHandle< CSCChamberTimeCorrections > edm::ESHandle< CSCChannelMapperBase > edm::ESHandle< CSCDBChipSpeedCorrection > edm::ESHandle< CSCDBCrosstalk > edm::ESHandle< CSCDBGains > edm::ESHandle< CSCDBGasGainCorrection > edm::ESHandle< CSCDBNoiseMatrix > edm::ESHandle< CSCDBPedestals > edm::ESHandle< CSCGeometry > edm::ESHandle< CSCIndexerBase > edm::ESHandle< CTPPSGeometry > edm::ESHandle< DTGeometry > edm::ESHandle< DTTtrig > edm::ESHandle< EcalADCToGeVConstant > edm::ESHandle< EcalCondObjectContainer > edm::ESHandle< EcalElectronicsMapping > edm::ESHandle< EcalIntercalibConstantsGPU > edm::ESHandle< EcalLaserDbService > edm::ESHandle< EcalRecHitParametersGPU > edm::ESHandle< EcalSampleMask > edm::ESHandle< EcalSamplesCorrelation > edm::ESHandle< EcalSeverityLevelAlgo > edm::ESHandle< EcalTBWeights > edm::ESHandle< EcalTimeBiasCorrections > edm::ESHandle< EcalTimeOffsetConstant > edm::ESHandle< EcalTrigTowerConstituentsMap > edm::ESHandle< ESCondObjectContainer > edm::ESHandle< ESEEIntercalibConstants > edm::ESHandle< ESGain > edm::ESHandle< ESMIPToGeVConstant > edm::ESHandle< ESMissingEnergyCalibration > edm::ESHandle< ESRecHitRatioCuts > edm::ESHandle< ESTimeSampleWeights > edm::ESHandle< GEMGeometry > edm::ESHandle< GeometricDet > edm::ESHandle< GeometricSearchTracker > edm::ESHandle< GlobalTrackingGeometry > edm::ESHandle< HcalChannelQuality > edm::ESHandle< HcalDbService > edm::ESHandle< HepPDT::ParticleDataTable > edm::ESHandle< HGCalDDDConstants > edm::ESHandle< HGCalTriggerGeometryBase > edm::ESHandle< L1MuDTEtaPatternLut > edm::ESHandle< L1MuDTPhiLut > edm::ESHandle< L1MuDTPtaLut > edm::ESHandle< L1MuDTQualPatternLut > edm::ESHandle< L1MuDTTFMasks > edm::ESHandle< L1MuDTTFParameters > edm::ESHandle< L1TMuonEndCapForest > edm::ESHandle< L1TMuonEndCapParams > edm::ESHandle< MagneticField > edm::ESHandle< ME0Geometry > edm::ESHandle< MuonDetLayerGeometry > edm::ESHandle< MuScleFitDBobject > edm::ESHandle< NavigationSchool > edm::ESHandle< ParticleDataTable > edm::ESHandle< PPSTimingCalibration > edm::ESHandle< Propagator > edm::ESHandle< RPCAMCLinkMap > edm::ESHandle< RPCGeometry > edm::ESHandle< RPCLBLinkMap > edm::ESHandle< SiPixelCalibConfiguration > edm::ESHandle< SiPixelFedCablingMap > edm::ESHandle< SiStripDetCabling > edm::ESHandle< SiStripLorentzAngle > edm::ESHandle< SiStripNoises > edm::ESHandle< TrackerGeometry > edm::ESHandle< TrackerTopology > edm::ESHandle< TrajectoryFitter > edm::ESHandle< TrajectorySmoother > edm::ESHandle< TrajectoryStateUpdator > edm::ESHandle< TransientTrackBuilder > edm::ESHandle< TransientTrackingRecHitBuilder > edm::ESHandle< TTStubAlgorithm< T > >

Public Member Functions

edm::eventsetup::ComponentDescription const * description () const
 
 ESHandleBase ()=default
 
 ESHandleBase (void const *iData, edm::eventsetup::ComponentDescription const *desc)
 
 ESHandleBase (std::shared_ptr< ESHandleExceptionFactory > &&iWhyFailed)
 Used when the attempt to get the data failed. More...
 
bool failedToGet () const
 
bool isValid () const
 
 operator bool () const
 
bool operator! () const
 
void swap (ESHandleBase &iOther)
 
std::shared_ptr< ESHandleExceptionFactory > const & whyFailedFactory () const
 

Protected Member Functions

void const * productStorage () const
 

Private Attributes

void const * data_ {nullptr}
 
edm::eventsetup::ComponentDescription const * description_ {nullptr}
 
std::shared_ptr< ESHandleExceptionFactorywhyFailedFactory_ {nullptr}
 

Detailed Description

Definition at line 33 of file ESHandle.h.

Constructor & Destructor Documentation

◆ ESHandleBase() [1/3]

edm::ESHandleBase::ESHandleBase ( )
default

◆ ESHandleBase() [2/3]

edm::ESHandleBase::ESHandleBase ( void const *  iData,
edm::eventsetup::ComponentDescription const *  desc 
)
inline

Definition at line 36 of file ESHandle.h.

37  : data_(iData), description_(desc) {}
edm::eventsetup::ComponentDescription const * description_
Definition: ESHandle.h:71
void const * data_
Definition: ESHandle.h:70

◆ ESHandleBase() [3/3]

edm::ESHandleBase::ESHandleBase ( std::shared_ptr< ESHandleExceptionFactory > &&  iWhyFailed)
inline

Used when the attempt to get the data failed.

Definition at line 40 of file ESHandle.h.

40 : whyFailedFactory_(std::move(iWhyFailed)) {}
std::shared_ptr< ESHandleExceptionFactory > whyFailedFactory_
Definition: ESHandle.h:72
def move(src, dest)
Definition: eostools.py:511

Member Function Documentation

◆ description()

eventsetup::ComponentDescription const * edm::ESHandleBase::description ( ) const

Definition at line 9 of file ESHandle.cc.

References description_, Exception, and edm::errors::InvalidReference.

Referenced by tmtt::TMTrackProducer::beginRun(), and tt::ProducerSetup::produce().

9  {
10  if (!description_) {
11  throw edm::Exception(edm::errors::InvalidReference, "NullPointer");
12  }
13  return description_;
14  }
edm::eventsetup::ComponentDescription const * description_
Definition: ESHandle.h:71

◆ failedToGet()

bool edm::ESHandleBase::failedToGet ( ) const
inline

Definition at line 46 of file ESHandle.h.

References electrons_cff::bool, and whyFailedFactory_.

46 { return bool(whyFailedFactory_); }
std::shared_ptr< ESHandleExceptionFactory > whyFailedFactory_
Definition: ESHandle.h:72

◆ isValid()

bool edm::ESHandleBase::isValid ( void  ) const
inline

Definition at line 44 of file ESHandle.h.

References data_, and description_.

Referenced by ntupleDataFormat._Object::_checkIsValid(), SiStripDigitizerAlgorithm::accumulateSimHits(), DTGeometryTest::analyze(), edmtest::AlignPCLThresholdsReader< T, R >::analyze(), EcalSRCondTools::analyze(), DTGeometryValidate::analyze(), HGCalRecHitValidation::analyze(), SiPixelHitEfficiencySource::analyze(), ValidateGeometry::analyze(), GlobalTrackerMuonAlignment::analyzeTrackTrajectory(), CSCConditions::anodeBXoffset(), SiStripFedCablingReader::beginRun(), edmtest::L1TriggerScalerESAnalyzer::beginRun(), MuonSensitiveDetectorBuilder::beginRun(), HcalSensitiveDetectorBuilder::beginRun(), SimG4HGCalValidation::beginRun(), TrackingCertificationInfo::beginRun(), TrackingOfflineDQM::beginRun(), RPCTechnicalTrigger::beginRun(), MTDTransientTrackingRecHitBuilder::build(), MuonTransientTrackingRecHitBuilder::build(), CSCConditions::chamberTimingCorrection(), CSCConditions::chipCorrection(), CSCConditions::crossTalk(), CSCConditions::crosstalkIntercept(), CSCConditions::crosstalkSlope(), Phase2TrackerValidateDigi::dqmBeginRun(), SiStripMonitorDigi::dqmBeginRun(), HGCalRecHitValidation::dqmBeginRun(), HGCalHitValidation::dqmBeginRun(), PropagateToMuon::extrapolate(), MuonSimHitsValidAnalyzer::fillDT(), CSCConditions::gain(), CSCConditions::gasGainCorrection(), CastorDigiMonitor::getDbData(), L1RCTProducer::getFedVectorFromOmds(), L1TCaloLayer1FetchLUTs(), HGCScintillatorSensitiveDetectorBuilder::make(), HFNoseSensitiveDetectorBuilder::make(), HGCalSensitiveDetectorBuilder::make(), CSCConditions::noiseMatrix(), operator bool(), operator!(), CSCConditions::pedestal(), CSCConditions::pedestalSigma(), edmtest::SlimmingThingSelector::preChoose(), edmtest::ThinningThingSelector::preChoose(), MFProducer::produce(), photonIsolationHIProducer::produce(), CastorSimpleReconstructor::produce(), TGeoMgrFromDdd::produce(), CSCTriggerPrimitivesProducer::produce(), ShallowGainCalibration::produce(), reco::GlobalHaloDataProducer::produce(), KfTrackProducerBase::putInEvt(), GsfTrackProducerBase::putInEvt(), TrackProducerWithSCAssociation::putInEvt(), core.AutoHandle.AutoHandle::ReallyLoad(), TrackTransformer::setServices(), PropagateToMuon::startingState(), and ThrParameters::ThrParameters().

44 { return nullptr != data_ && nullptr != description_; }
edm::eventsetup::ComponentDescription const * description_
Definition: ESHandle.h:71
void const * data_
Definition: ESHandle.h:70

◆ operator bool()

edm::ESHandleBase::operator bool ( ) const
inlineexplicit

Definition at line 48 of file ESHandle.h.

References isValid().

48 { return isValid(); }
bool isValid() const
Definition: ESHandle.h:44

◆ operator!()

bool edm::ESHandleBase::operator! ( ) const
inline

Definition at line 50 of file ESHandle.h.

References isValid().

50 { return not isValid(); }
bool isValid() const
Definition: ESHandle.h:44

◆ productStorage()

void const* edm::ESHandleBase::productStorage ( ) const
inlineprotected

Definition at line 61 of file ESHandle.h.

References data_, and whyFailedFactory_.

Referenced by edm::ESTransientHandle< T >::product(), edm::ESHandle< MuonDetLayerGeometry >::product(), and edm::ESHandle< fwliteeswriter::DummyType >::product().

61  {
62  if (whyFailedFactory_) {
63  std::rethrow_exception(whyFailedFactory_->make());
64  }
65  return data_;
66  }
std::shared_ptr< ESHandleExceptionFactory > whyFailedFactory_
Definition: ESHandle.h:72
void const * data_
Definition: ESHandle.h:70

◆ swap()

void edm::ESHandleBase::swap ( ESHandleBase iOther)
inline

Definition at line 52 of file ESHandle.h.

References data_, description_, std::swap(), and whyFailedFactory_.

Referenced by HcalLutGenerator::analyze().

52  {
53  std::swap(data_, iOther.data_);
54  std::swap(description_, iOther.description_);
55  std::swap(whyFailedFactory_, iOther.whyFailedFactory_);
56  }
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
std::shared_ptr< ESHandleExceptionFactory > whyFailedFactory_
Definition: ESHandle.h:72
edm::eventsetup::ComponentDescription const * description_
Definition: ESHandle.h:71
void const * data_
Definition: ESHandle.h:70

◆ whyFailedFactory()

std::shared_ptr<ESHandleExceptionFactory> const& edm::ESHandleBase::whyFailedFactory ( ) const
inline

Definition at line 58 of file ESHandle.h.

References whyFailedFactory_.

58 { return whyFailedFactory_; }
std::shared_ptr< ESHandleExceptionFactory > whyFailedFactory_
Definition: ESHandle.h:72

Member Data Documentation

◆ data_

void const* edm::ESHandleBase::data_ {nullptr}
private

Definition at line 70 of file ESHandle.h.

Referenced by isValid(), productStorage(), and swap().

◆ description_

edm::eventsetup::ComponentDescription const* edm::ESHandleBase::description_ {nullptr}
private

Definition at line 71 of file ESHandle.h.

Referenced by description(), isValid(), and swap().

◆ whyFailedFactory_

std::shared_ptr<ESHandleExceptionFactory> edm::ESHandleBase::whyFailedFactory_ {nullptr}
private

Definition at line 72 of file ESHandle.h.

Referenced by failedToGet(), productStorage(), swap(), and whyFailedFactory().