CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
edm::eventsetup::DataProxyProvider Class Referenceabstract

#include <DataProxyProvider.h>

Inheritance diagram for edm::eventsetup::DataProxyProvider:
CondDBESSource edm::ESProxyFactoryProducer FWLiteESSource PoolDBESSource edm::ESProducer AnalyticalPropagatorESProducer BeamHaloPropagatorESProducer BeamSpotFakeConditions BtagPerformanceESProducer CaloGeometryBuilder CaloGeometryDBEP< T, U > CaloGeometryEP< T > CaloMiscalibTools CaloMiscalibToolsMC CaloTopologyBuilder CaloTowerConstituentsMapBuilder CaloTowerHardcodeGeometryEP CaloTPGTranscoderULUTs CastorDbProducer CastorHardcodeCalibrations CastorHardcodeGeometryEP CastorTextCalibrations Chi2MeasurementEstimatorESProducer CkfDebugTrajectoryBuilderESProducer CkfTrajectoryBuilderESProducer CloseComponentsMergerESProducer< N > ClusterShapeHitFilterESProducer ClusterShapeTrajectoryFilterESProducer CompositeTrajectoryFilterESProducer CosmicParametersDefinerForTPESProducer CSCBadChambersConditions CSCBadStripsConditions CSCBadWiresConditions CSCChamberIndexValues CSCChamberMapValues CSCChamberTimeCorrectionsValues CSCChipSpeedCorrectionDBConditions CSCCrateMapValues CSCCrosstalkConditions CSCCrosstalkDBConditions CSCDBL1TPParametersConditions CSCDDUMapValues CSCFakeCrosstalkConditions CSCFakeDBCrosstalk CSCFakeDBCrosstalkPopCon CSCFakeDBGains CSCFakeDBGainsPopCon CSCFakeDBNoiseMatrix CSCFakeDBPedestals CSCFakeGainsConditions CSCFakeNoiseMatrixConditions CSCFakePedestalsConditions CSCGainsConditions CSCGainsDBConditions CSCGasGainCorrectionDBConditions CSCGeometryESModule CSCL1TPParametersConditions CSCNoiseMatrixConditions CSCNoiseMatrixDBConditions CSCPedestalsDBConditions CSCTFConfigProducer DetIdAssociatorESProducer DetLayerGeometryESProducer DIPLumiProducer DistanceBetweenComponentsESProducer< N > DTConfigDBProducer DTConfigTrivialProducer DTFakeT0ESProducer DTFakeTTrigESProducer DTFakeVDriftESProducer DTGeometryESModule DTTrackFinderConfig EcalBasicClusterLocalContCorrectionsESProducer EcalElectronicsMappingBuilder EcalGlobalShowerContainmentCorrectionsVsEtaESProducer EcalLaserCorrectionService EcalNextToDeadChannelESProducer EcalRegionCablingESProducer EcalSeverityLevelESProducer EcalShowerContainmentCorrectionsESProducer EcalTBGeometryBuilder EcalTBHodoscopeGeometryEP EcalTrigPrimESProducer EcalTrigPrimSpikeESProducer EcalTrigTowerConstituentsMapBuilder EcalTrivialConditionRetriever EcalUnpackerWorkerESProducer edm::ESProducerLooper ElectronLikelihoodESSource ESTrivialConditionRetriever ESUnpackerWorkerESProducer FakeAlignmentProducer FakeAlignmentSource FakeCaloAlignmentEP FastPixelCPEESProducer FastStripCPEESProducer FlexibleKFFittingSmootherESProducer FWRecoGeometryESProducer FWTGeoRecoGeometryESProducer GeantPropagatorESProducer GlobalDetLayerGeometryESProducer GlobalTrackingGeometryESProducer GroupedCkfTrajectoryBuilderESProducer GsfMaterialEffectsESProducer GsfTrajectoryFitterESProducer GsfTrajectorySmootherESProducer HcalAlignmentEP HcalDbProducer HcalDDDGeometryEP HcalHardcodeCalibrations HcalHardcodeGeometryEP HcalOmdsCalibrations HcalRecAlgoESProducer HcalTextCalibrations HcalTopologyIdealEP HcalTPGCoderULUT HepPDTESSource HiTrivialConditionRetriever JetCorrectionESChain JetCorrectionESProducer< Corrector > JetCorrectionESSource< Corrector > JetTagComputerESProducer< ConcreteJetTagComputer > KFFittingSmootherESProducer KFSwitching1DUpdatorESProducer KFTrajectoryFitterESProducer KFTrajectorySmootherESProducer KFUpdatorESProducer L1CaloGeometryProd L1CaloInputScalesProducer L1ConfigOnlineProdBase< TRcd, TData > L1ConfigOnlineProdBase< L1CaloEcalScaleRcd, L1CaloEcalScale > L1ConfigOnlineProdBase< L1CaloHcalScaleRcd, L1CaloHcalScale > L1ConfigOnlineProdBase< L1EmEtScaleRcd, L1CaloEtScale > L1ConfigOnlineProdBase< L1GctChannelMaskRcd, L1GctChannelMask > L1ConfigOnlineProdBase< L1GctJetFinderParamsRcd, L1GctJetFinderParams > L1ConfigOnlineProdBase< L1GtParametersRcd, L1GtParameters > L1ConfigOnlineProdBase< L1GtPrescaleFactorsAlgoTrigRcd, L1GtPrescaleFactors > L1ConfigOnlineProdBase< L1GtPrescaleFactorsTechTrigRcd, L1GtPrescaleFactors > L1ConfigOnlineProdBase< L1GtPsbSetupRcd, L1GtPsbSetup > L1ConfigOnlineProdBase< L1GtTriggerMaskAlgoTrigRcd, L1GtTriggerMask > L1ConfigOnlineProdBase< L1GtTriggerMaskTechTrigRcd, L1GtTriggerMask > L1ConfigOnlineProdBase< L1GtTriggerMaskVetoTechTrigRcd, L1GtTriggerMask > L1ConfigOnlineProdBase< L1GtTriggerMenuRcd, L1GtTriggerMenu > L1ConfigOnlineProdBase< L1HfRingEtScaleRcd, L1CaloEtScale > L1ConfigOnlineProdBase< L1HtMissScaleRcd, L1CaloEtScale > L1ConfigOnlineProdBase< L1JetEtScaleRcd, L1CaloEtScale > L1ConfigOnlineProdBase< L1MuCSCPtLutRcd, L1MuCSCPtLut > L1ConfigOnlineProdBase< L1MuCSCTFAlignmentRcd, L1MuCSCTFAlignment > L1ConfigOnlineProdBase< L1MuCSCTFConfigurationRcd, L1MuCSCTFConfiguration > L1ConfigOnlineProdBase< L1MuDTEtaPatternLutRcd, L1MuDTEtaPatternLut > L1ConfigOnlineProdBase< L1MuDTExtLutRcd, L1MuDTExtLut > L1ConfigOnlineProdBase< L1MuDTPhiLutRcd, L1MuDTPhiLut > L1ConfigOnlineProdBase< L1MuDTPtaLutRcd, L1MuDTPtaLut > L1ConfigOnlineProdBase< L1MuDTQualPatternLutRcd, L1MuDTQualPatternLut > L1ConfigOnlineProdBase< L1MuDTTFMasksRcd, L1MuDTTFMasks > L1ConfigOnlineProdBase< L1MuDTTFParametersRcd, L1MuDTTFParameters > L1ConfigOnlineProdBase< L1MuGMTChannelMaskRcd, L1MuGMTChannelMask > L1ConfigOnlineProdBase< L1MuGMTParametersRcd, L1MuGMTParameters > L1ConfigOnlineProdBase< L1MuTriggerPtScaleRcd, L1MuTriggerPtScale > L1ConfigOnlineProdBase< L1MuTriggerScalesRcd, L1MuTriggerScales > L1ConfigOnlineProdBase< L1RCTChannelMaskRcd, L1RCTChannelMask > L1ConfigOnlineProdBase< L1RCTParametersRcd, L1RCTParameters > L1ConfigOnlineProdBase< L1RPCBxOrConfigRcd, L1RPCBxOrConfig > L1ConfigOnlineProdBase< L1RPCConeDefinitionRcd, L1RPCConeDefinition > L1ConfigOnlineProdBase< L1RPCConfigRcd, L1RPCConfig > L1ConfigOnlineProdBase< L1RPCHsbConfigRcd, L1RPCHsbConfig > L1CSCTriggerPrimitivesConfigProducer L1GctConfigProducers L1GtBoardMapsTrivialProducer L1GtParametersTrivialProducer L1GtPrescaleFactorsAlgoTrigTrivialProducer L1GtPrescaleFactorsTechTrigTrivialProducer L1GtPsbSetupTrivialProducer L1GtStableParametersTrivialProducer L1GtTriggerMaskAlgoTrigTrivialProducer L1GtTriggerMaskTechTrigTrivialProducer L1GtTriggerMaskVetoAlgoTrigTrivialProducer L1GtTriggerMaskVetoTechTrigTrivialProducer L1GtTriggerMenuXmlProducer L1MuGMTParametersProducer L1MuGMTScalesProducer L1MuTriggerPtScaleProducer L1MuTriggerScalesProducer L1ObjectKeysOnlineProdBase L1RCTOmdsFedVectorProducer L1RPCConeDefinitionProducer L1ScalesTrivialProducer L1SubsystemKeysOnlineProd L1TriggerKeyDummyProd L1TriggerKeyListDummyProd L1TriggerKeyOnlineProd magneticfield::AutoMagneticFieldESProducer magneticfield::ParametrizedMagneticFieldProducer magneticfield::UniformMagneticFieldESProducer magneticfield::VolumeBasedMagneticFieldESProducer MagneticFieldMapESProducer MeasurementTrackerESProducer MisalignedMuonESProducer MisalignedTrackerESProducer MRHChi2MeasurementEstimatorESProducer MuonAssociatorESProducer MuonCkfTrajectoryBuilderESProducer MuonDetLayerGeometryESProducer MuonNumberingInitialization MuonRoadTrajectoryBuilderESProducer MuonTransientTrackingRecHitBuilderESProducer NavigationSchoolESProducer ParametersDefinerForTPESProducer PhysicsTools::MVAComputerESSourceBase PixelCPEGenericESProducer PixelCPETemplateRecoESProducer PixelToFEDAssociateFromAsciiESProducer PixelToLNKAssociateFromAsciiESProducer prodname PropagatorWithMaterialESProducer RCTConfigProducers RingESSource RingMakerESProducer RoadMapESSource RoadMapMakerESProducer RPCConeBuilder RPCGeometryESModule RPCPerformanceESSource RPCTriggerBxOrConfig RPCTriggerConfig RPCTriggerHsbConfig RPCTriggerHwConfig SeedingLayersESProducer SiPixelFakeCPEGenericErrorParmESSource SiPixelFakeGainESSource SiPixelFakeGainForHLTESSource SiPixelFakeGainOfflineESSource SiPixelFakeLorentzAngleESSource SiPixelFakeQualityESSource SiPixelFakeTemplateDBObjectESSource SiPixelQualityESProducer SiPixelTemplateDBObjectESProducer sistrip::MeasureLA SiStripConnectivity SiStripDelayESProducer SiStripFedCablingESProducer SiStripGainESProducerTemplate< TDependentRecord, TInputRecord > SiStripGainESSource SiStripHashedDetIdESProducer SiStripHashedDetIdESProducer SiStripLorentzAngleDepESProducer SiStripNoiseESSource SiStripPedestalsESSource SiStripQualityESProducer SiStripQualityFakeESSource SiStripRecHitMatcherESProducer SiStripRegionConnectivity SiStripTemplateEmptyFakeESSource< TObject, TRecord > SiStripTemplateFakeESSource< TObject, TRecord, TService > SmartPropagatorESProducer SteppingHelixPropagatorESProducer StraightLinePropagatorESProducer StringResolutionProviderESProducer StripCPEESProducer TestCaloAlignmentEP TGeoMgrFromDdd TkTransientTrackingRecHitBuilderESProducer TrackerDigiGeometryESModule TrackerGeometricDetESModule TrackerGeometricDetExtraESModule TrackerInteractionGeometryESProducer TrackerRecoGeometryESProducer TrackingRecHitPropagatorESProducer TrajectoryCleanerESProducer TrajectoryFilterESProducer TransientTrackBuilderESProducer TSCBLBuilderNoMaterialESProducer TSCBLBuilderWithPropagatorESProducer XMLIdealGeometryESProducer XMLIdealGeometryESSource ZdcHardcodeGeometryEP

Public Types

typedef std::vector< std::pair
< DataKey, boost::shared_ptr
< DataProxy > > > 
KeyedProxies
 
typedef std::vector
< EventSetupRecordKey
Keys
 
typedef std::map
< EventSetupRecordKey,
KeyedProxies
RecordProxies
 

Public Member Functions

 DataProxyProvider ()
 
const ComponentDescriptiondescription () const
 
bool isUsingRecord (const EventSetupRecordKey &) const
 
const KeyedProxieskeyedProxies (const EventSetupRecordKey &iRecordKey) const
 
virtual void newInterval (const EventSetupRecordKey &iRecordType, const ValidityInterval &iInterval)=0
 called when a new interval of validity occurs for iRecordType More...
 
void resetProxies (const EventSetupRecordKey &iRecordType)
 
void resetProxiesIfTransient (const EventSetupRecordKey &iRecordType)
 
void setAppendToDataLabel (const edm::ParameterSet &)
 
void setDescription (const ComponentDescription &iDescription)
 
std::set< EventSetupRecordKeyusingRecords () const
 
virtual ~DataProxyProvider ()
 

Static Public Member Functions

static void prevalidate (ConfigurationDescriptions &)
 

Protected Member Functions

void eraseAll (const EventSetupRecordKey &iRecordKey)
 deletes all the Proxies in aStream More...
 
void invalidateProxies (const EventSetupRecordKey &iRecordKey)
 
virtual void registerProxies (const EventSetupRecordKey &iRecordKey, KeyedProxies &aProxyList)=0
 
template<class T >
void usingRecord ()
 
void usingRecordWithKey (const EventSetupRecordKey &)
 

Private Member Functions

 DataProxyProvider (const DataProxyProvider &)
 
const DataProxyProvideroperator= (const DataProxyProvider &)
 

Private Attributes

std::string appendToDataLabel_
 
ComponentDescription description_
 
RecordProxies recordProxies_
 

Detailed Description

Definition at line 42 of file DataProxyProvider.h.

Member Typedef Documentation

typedef std::vector<std::pair<DataKey, boost::shared_ptr<DataProxy> > > edm::eventsetup::DataProxyProvider::KeyedProxies

Definition at line 48 of file DataProxyProvider.h.

Definition at line 46 of file DataProxyProvider.h.

Definition at line 49 of file DataProxyProvider.h.

Constructor & Destructor Documentation

DataProxyProvider::DataProxyProvider ( )

Definition at line 35 of file DataProxyProvider.cc.

36 {
37 }
DataProxyProvider::~DataProxyProvider ( )
virtual

Definition at line 44 of file DataProxyProvider.cc.

45 {
46 }
edm::eventsetup::DataProxyProvider::DataProxyProvider ( const DataProxyProvider )
private

Member Function Documentation

const ComponentDescription& edm::eventsetup::DataProxyProvider::description ( ) const
inline
void edm::eventsetup::DataProxyProvider::eraseAll ( const EventSetupRecordKey iRecordKey)
protected

deletes all the Proxies in aStream

void DataProxyProvider::invalidateProxies ( const EventSetupRecordKey iRecordKey)
protected

Definition at line 71 of file DataProxyProvider.cc.

References recordProxies_.

Referenced by CondDBESSource::newInterval(), edm::ESProxyFactoryProducer::newInterval(), FWLiteESSource::newInterval(), and resetProxies().

72 {
73  KeyedProxies& proxyList((*(recordProxies_.find(iRecordKey))).second) ;
74  KeyedProxies::iterator finished(proxyList.end()) ;
75  for (KeyedProxies::iterator keyedProxy(proxyList.begin()) ;
76  keyedProxy != finished ;
77  ++keyedProxy) {
78  (*((*keyedProxy).second)).invalidate() ;
79  }
80 
81 }
std::vector< std::pair< DataKey, boost::shared_ptr< DataProxy > > > KeyedProxies
bool DataProxyProvider::isUsingRecord ( const EventSetupRecordKey iKey) const

Definition at line 118 of file DataProxyProvider.cc.

References recordProxies_.

119 {
120  return recordProxies_.end() != recordProxies_.find(iKey);
121 }
const DataProxyProvider::KeyedProxies & DataProxyProvider::keyedProxies ( const EventSetupRecordKey iRecordKey) const

Definition at line 138 of file DataProxyProvider.cc.

References appendToDataLabel_, description(), recordProxies_, registerProxies(), edm::eventsetup::swap(), and groupFilesInBlocks::temp.

139 {
140  RecordProxies::const_iterator itFind = recordProxies_.find(iRecordKey);
141  assert(itFind != recordProxies_.end());
142 
143  if(itFind->second.empty()) {
144  //delayed registration
145  KeyedProxies& proxies = const_cast<KeyedProxies&>(itFind->second);
146  const_cast<DataProxyProvider*>(this)->registerProxies(iRecordKey,
147  proxies);
148 
149  bool mustChangeLabels = (0 != appendToDataLabel_.size());
150  for(KeyedProxies::iterator itProxy = proxies.begin(), itProxyEnd = proxies.end();
151  itProxy != itProxyEnd;
152  ++itProxy) {
153  itProxy->second->setProviderDescription(&description());
154  if( mustChangeLabels ) {
155  //Using swap is fine since
156  // 1) the data structure is not a map and so we have not sorted on the keys
157  // 2) this is the first time filling this so no outside agency has yet seen
158  // the label and therefore can not be dependent upon its value
159  std::string temp(std::string(itProxy->first.name().value())+appendToDataLabel_);
160  DataKey newKey(itProxy->first.type(),temp.c_str());
161  swap(itProxy->first,newKey);
162  }
163  }
164  }
165 
166  return itFind->second;
167 }
virtual void registerProxies(const EventSetupRecordKey &iRecordKey, KeyedProxies &aProxyList)=0
std::vector< std::pair< DataKey, boost::shared_ptr< DataProxy > > > KeyedProxies
const ComponentDescription & description() const
void swap(DataKey &a, DataKey &b)
Definition: DataKey.h:99
virtual void edm::eventsetup::DataProxyProvider::newInterval ( const EventSetupRecordKey iRecordType,
const ValidityInterval iInterval 
)
pure virtual

called when a new interval of validity occurs for iRecordType

Implemented in FWLiteESSource, edm::ESProxyFactoryProducer, and CondDBESSource.

const DataProxyProvider& edm::eventsetup::DataProxyProvider::operator= ( const DataProxyProvider )
private
void DataProxyProvider::prevalidate ( ConfigurationDescriptions iDesc)
static

Used to add parameters available to all inheriting classes

Definition at line 175 of file DataProxyProvider.cc.

References edm::ParameterSetDescription::add(), edm::ConfigurationDescriptions::defaultDescription(), edm::ParameterSetDescription::isLabelUnused(), edm::eventsetup::kAppendToDataLabel(), and v.

176 {
177  if(iDesc.defaultDescription()) {
178  if (iDesc.defaultDescription()->isLabelUnused(kAppendToDataLabel)) {
179  iDesc.defaultDescription()->add<std::string>(kAppendToDataLabel, std::string(""));
180  }
181  }
182  for(auto& v: iDesc) {
183  if (v.second.isLabelUnused(kAppendToDataLabel)) {
184  v.second.add<std::string>(kAppendToDataLabel, std::string(""));
185  }
186  }
187 }
static const std::string kAppendToDataLabel("appendToDataLabel")
mathSSE::Vec4< T > v
virtual void edm::eventsetup::DataProxyProvider::registerProxies ( const EventSetupRecordKey iRecordKey,
KeyedProxies aProxyList 
)
protectedpure virtual
void DataProxyProvider::resetProxies ( const EventSetupRecordKey iRecordType)

Definition at line 84 of file DataProxyProvider.cc.

References invalidateProxies().

Referenced by edm::eventsetup::EventSetupRecordProvider::resetProxies().

85 {
86  invalidateProxies(iRecordKey);
87 }
void invalidateProxies(const EventSetupRecordKey &iRecordKey)
void DataProxyProvider::resetProxiesIfTransient ( const EventSetupRecordKey iRecordType)

Definition at line 90 of file DataProxyProvider.cc.

References recordProxies_.

Referenced by edm::eventsetup::EventSetupRecordProvider::resetProxies(), and edm::eventsetup::EventSetupRecordProvider::resetTransients().

91 {
92  KeyedProxies& proxyList((*(recordProxies_.find(iRecordKey))).second) ;
93  KeyedProxies::iterator finished(proxyList.end()) ;
94  for (KeyedProxies::iterator keyedProxy(proxyList.begin()) ;
95  keyedProxy != finished ;
96  ++keyedProxy) {
97  (*((*keyedProxy).second)).resetIfTransient() ;
98  }
99 
100 }
std::vector< std::pair< DataKey, boost::shared_ptr< DataProxy > > > KeyedProxies
void DataProxyProvider::setAppendToDataLabel ( const edm::ParameterSet iToAppend)

This method is only to be called by the framework, it sets the string which will be appended to the labels of all data products being produced

Definition at line 103 of file DataProxyProvider.cc.

References appendToDataLabel_, edm::ParameterSet::exists(), and edm::ParameterSet::getParameter().

Referenced by edm::eventsetup::ComponentMaker< edm::eventsetup::LooperMakerTraits, TType >::setPostConstruction().

104 {
105  std::string oldValue( appendToDataLabel_);
106  //this can only be changed once and the default value is the empty string
107  assert(0 == oldValue.size());
108 
109  const std::string kParamName("appendToDataLabel");
110  if(iToAppend.exists(kParamName) ) {
111  appendToDataLabel_ = iToAppend.getParameter<std::string>(kParamName);
112  }
113 }
T getParameter(std::string const &) const
bool exists(std::string const &parameterName) const
checks if a parameter exists
void edm::eventsetup::DataProxyProvider::setDescription ( const ComponentDescription iDescription)
inline

Definition at line 73 of file DataProxyProvider.h.

References description_.

Referenced by edm::eventsetup::ComponentMaker< edm::eventsetup::LooperMakerTraits, TType >::setDescription().

73  {
74  description_ = iDescription;
75  }
template<class T >
void edm::eventsetup::DataProxyProvider::usingRecord ( )
inlineprotected

Definition at line 87 of file DataProxyProvider.h.

References usingRecordWithKey().

87  {
88  usingRecordWithKey(EventSetupRecordKey::makeKey<T>());
89  }
void usingRecordWithKey(const EventSetupRecordKey &)
std::set< EventSetupRecordKey > DataProxyProvider::usingRecords ( ) const

Definition at line 124 of file DataProxyProvider.cc.

References recordProxies_.

125 {
126  std::set<EventSetupRecordKey> returnValue;
127  for(RecordProxies::const_iterator itRecProxies = recordProxies_.begin(),
128  itRecProxiesEnd = recordProxies_.end();
129  itRecProxies != itRecProxiesEnd;
130  ++itRecProxies) {
131  returnValue.insert(returnValue.end(), itRecProxies->first);
132  }
133  //copy_all(keys_, std::inserter(returnValue, returnValue.end()));
134  return returnValue;
135 }
void DataProxyProvider::usingRecordWithKey ( const EventSetupRecordKey iKey)
protected

Member Data Documentation

std::string edm::eventsetup::DataProxyProvider::appendToDataLabel_
private

Definition at line 109 of file DataProxyProvider.h.

Referenced by keyedProxies(), and setAppendToDataLabel().

ComponentDescription edm::eventsetup::DataProxyProvider::description_
private

Definition at line 108 of file DataProxyProvider.h.

Referenced by description(), and setDescription().

RecordProxies edm::eventsetup::DataProxyProvider::recordProxies_
private