CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
Modules.ESPrefer Class Reference
Inheritance diagram for Modules.ESPrefer:
Mixins._ConfigureComponent Mixins._TypedParameterizable Mixins._Unlabelable Mixins._Labelable Mixins._Parameterizable

Public Member Functions

def __init__ (self, type_, targetLabel='', arg, kargs)
 
def copy (self)
 
def dumpPythonAs (self, label, options=PrintOptions())
 
def moduleLabel_ (self, myname)
 
def nameInProcessDesc_ (self, myname)
 
def targetLabel_ (self)
 
- Public Member Functions inherited from Mixins._TypedParameterizable
def __init__ (self, type_, arg, kargs)
 
def appendToProcessDescList_ (self, lst, myname)
 
def clone (self, args, params)
 
def copy (self)
 
def dumpConfig (self, options=PrintOptions())
 
def dumpPython (self, options=PrintOptions())
 
def dumpPythonAttributes (self, myname, options)
 
def insertInto (self, parameterSet, myname)
 
def moduleLabel_ (self, myname)
 
def nameInProcessDesc_ (self, myname)
 
def type_ (self)
 
- Public Member Functions inherited from Mixins._Parameterizable
def __delattr__ (self, name)
 
def __init__ (self, arg, kargs)
 
def __repr__ (self)
 
def __setattr__ (self, name, value)
 
def dumpPython (self, options=PrintOptions())
 
def getParameter (self, params)
 
def hasParameter (self, params)
 
def insertContentsInto (self, parameterSet)
 
def isFrozen (self)
 
def isModified (self)
 
def parameterNames_ (self)
 
def parameters_ (self)
 
def setIsFrozen (self)
 
- Public Member Functions inherited from Mixins._Labelable
def __str__ (self)
 
def dumpSequenceConfig (self)
 
def dumpSequencePython (self, options=PrintOptions())
 
def hasLabel_ (self)
 
def label (self)
 
def label_ (self)
 
def setLabel (self, label)
 

Private Member Functions

def _placeImpl (self, name, proc)
 

Private Attributes

 _targetLabel
 

Detailed Description

Used to set which EventSetup provider should provide a particular data item
in the case where multiple providers are capable of delivering the data.
The first argument specifies the C++ class type of the prodiver.
If the provider has been given a label, you must specify that label as the second argument.
Additional 'vstring' arguments maybe used to specify exactly which EventSetup Records
are being preferred and optionally which data items within that Record.
E.g.,
    #prefer all data in record 'OrangeRecord' from 'juicer'
    ESPrefer("ESJuicerProd", OrangeRecord=cms.vstring())
or
    #prefer only "Orange" data in "OrangeRecord" from "juicer" 
    ESPrefer("ESJuicerProd", OrangeRecord=cms.vstring("ExtraPulp"))
or 
    #prefer only "Orange" data with label "ExtraPulp" in "OrangeRecord" from "juicer" 
    ESPrefer("ESJuicerProd", OrangeRecord=cms.vstring("Orange/ExtraPulp"))

Definition at line 74 of file Modules.py.

Constructor & Destructor Documentation

def Modules.ESPrefer.__init__ (   self,
  type_,
  targetLabel = '',
  arg,
  kargs 
)

Definition at line 91 of file Modules.py.

91  def __init__(self,type_,targetLabel='',*arg,**kargs):
92  super(ESPrefer,self).__init__(type_,*arg,**kargs)
93  self._targetLabel = targetLabel
94  if targetLabel is None:
95  self._targetLabel = str('')
96  if kargs:
97  for k,v in six.iteritems(kargs):
98  if not isinstance(v,vstring):
99  raise RuntimeError('ESPrefer only allows vstring attributes. "'+k+'" is a '+str(type(v)))
def __init__(self, type_, targetLabel='', arg, kargs)
Definition: Modules.py:91
#define str(s)

Member Function Documentation

def Modules.ESPrefer._placeImpl (   self,
  name,
  proc 
)
private

Definition at line 100 of file Modules.py.

Referenced by SequenceTypes._ModuleSequenceType._place(), and Mixins._TypedParameterizable._place().

100  def _placeImpl(self,name,proc):
101  proc._placeESPrefer(name,self)
def _placeImpl(self, name, proc)
Definition: Modules.py:100
def Modules.ESPrefer.copy (   self)

Definition at line 105 of file Modules.py.

References Modules.ESPrefer._targetLabel, MuonTypeByOrCut.type_, edm::ObjectWithDict.type_, L1TMuonOverlapParams::Node.type_, FWJobMetadataManager::Data.type_, L1TTwinMuxParams::Node.type_, reco::MuonMETCorrectionData.type_, FastTimeParametersESModule.type_, L1TMuonGlobalParams_PUBLIC::Node.type_, CutBasedElectronID.type_, L1TMuonGlobalParams::Node.type_, OpticalAlignMeasurementInfo.type_, L1TMuonBarrelParams::Node.type_, ProcessCallGraph::NodeType.type_, edm::eventsetup::ComponentDescription.type_, HcalSiPMParameter.type_, HcalSiPMCharacteristics::PrecisionItem.type_, l1t::CaloParams::Node.type_, omtf::RpcDataWord64.type_, omtf::RpcDataWord64::.type_, StringCutObjectSelector< T, DefaultLazyness >.type_, EleEnergyRetriever.type_, StringObjectFunction< T, DefaultLazyness >.type_, MuonIDFilterProducerForHLT.type_, MuonRefProducer.type_, omtf::MuonDataWord64.type_, omtf::MuonDataWord64::.type_, PGeometricTimingDet::Item.type_, TauDQMHistPlotter::cfgEntryProcess.type_, reco::TrackingRecHitInfo.type_, pftools::ParticleFiltrationDecision.type_, pos::PixelTKFECParameters.type_, pat::TriggerFilter.type_, NoProductErrorThrower.type_, FastTimerSD.type_, l1t::BlockHeader.type_, pat::TriggerCondition.type_, edm::ParentContext.type_, edm::ParameterWildcardBase.type_, omtf::DtDataWord64.type_, omtf::DtDataWord64::.type_, MultShiftMETcorrInputProducer.type_, l1t::CaloSpare.type_, edm::ConsumesInfo.type_, FastTimeTopologyBuilder.type_, GlobalVariablesTableProducer::Variable.type_, DQMHcalIsoTrackAlCaReco.type_, edm::AllowedLabelsDescriptionBase.type_, pat::helper::AnyNumberAssociationAdaptor.type_, omtf::CscDataWord64.type_, omtf::CscDataWord64::.type_, DBReader.type_, edm::eventsetup::EventSetupRecordKey.type_, GsfElectronDataAnalyzer.type_, NoBranchErrorThrower.type_, L1TUtmCondition.type_, SimpleFlatTableProducerBase< T, TProd >::VariableBase.type_, reco::PUSubMETCandInfo.type_, fwlite::internal::DataKey.type_, L1TUtmScale.type_, edm::eventsetup::DataKey.type_, l1t::EtSum.type_, edm::ParameterDescriptionBase.type_, BinomialInterval.type_, pftools::CandidateWrapper.type_, ScoutingMuon.type_, l1extra::L1EmParticle.type_, OpticalAlignInfo.type_, l1extra::L1JetParticle.type_, Json::Reader::Token.type_, edm::PileUp.type_, L1TUtmObject.type_, pat::JetCorrFactorsProducer.type_, Entry.type_, pos::PixelPortCardConfig.type_, edm::Handle< GenericObject >.type_, FastTimeTopology.type_, BeamSpotObjects.type_, L1GctInternHFData.type_, edm::test::TestProcessorConfig::ProduceEntry.type_, l1extra::L1EtMissParticle.type_, edm::Handle< FWGenericObject >.type_, funct::RootIntegrator.type_, reco::PFBlockElement.type_, CSCCorrelatedLCTDigi.type_, L1GctInternHtMiss.type_, reco::BeamSpot.type_, L1GctInternEtSum.type_, L1GctInternJetData.type_, TrackerDpgAnalysis.type_, SiStripConfigDb::Run.type_, ConfigurableHisto.type_, GeometricTimingDet.type_, CandMCMatchTableProducer.type_, reco::Muon.type_, GsfElectronFakeAnalyzer.type_, Mixins._TypedParameterizable.type_(), Json::Value.type_, edm::IndexIntoFile::IndexIntoFileItrImpl.type_, and Config.SubProcess.type_().

105  def copy(self):
106  returnValue = ESPrefer.__new__(type(self))
107  returnValue.__init__(self.type_(), self._targetLabel)
108  return returnValue
def copy(self)
Definition: Modules.py:105
def Modules.ESPrefer.dumpPythonAs (   self,
  label,
  options = PrintOptions() 
)

Definition at line 113 of file Modules.py.

References Modules.ESPrefer._targetLabel, Mixins._Parameterizable.parameterNames_(), MuonTypeByOrCut.type_, edm::ObjectWithDict.type_, L1TMuonOverlapParams::Node.type_, FWJobMetadataManager::Data.type_, L1TTwinMuxParams::Node.type_, FastTimeParametersESModule.type_, L1TMuonGlobalParams_PUBLIC::Node.type_, reco::MuonMETCorrectionData.type_, CutBasedElectronID.type_, L1TMuonGlobalParams::Node.type_, OpticalAlignMeasurementInfo.type_, L1TMuonBarrelParams::Node.type_, ProcessCallGraph::NodeType.type_, edm::eventsetup::ComponentDescription.type_, HcalSiPMCharacteristics::PrecisionItem.type_, HcalSiPMParameter.type_, l1t::CaloParams::Node.type_, omtf::RpcDataWord64.type_, omtf::RpcDataWord64::.type_, EleEnergyRetriever.type_, StringCutObjectSelector< T, DefaultLazyness >.type_, StringObjectFunction< T, DefaultLazyness >.type_, MuonIDFilterProducerForHLT.type_, MuonRefProducer.type_, omtf::MuonDataWord64.type_, omtf::MuonDataWord64::.type_, PGeometricTimingDet::Item.type_, TauDQMHistPlotter::cfgEntryProcess.type_, pftools::ParticleFiltrationDecision.type_, reco::TrackingRecHitInfo.type_, pos::PixelTKFECParameters.type_, pat::TriggerFilter.type_, NoProductErrorThrower.type_, FastTimerSD.type_, l1t::BlockHeader.type_, pat::TriggerCondition.type_, edm::ParentContext.type_, edm::ParameterWildcardBase.type_, omtf::DtDataWord64.type_, omtf::DtDataWord64::.type_, MultShiftMETcorrInputProducer.type_, l1t::CaloSpare.type_, edm::ConsumesInfo.type_, FastTimeTopologyBuilder.type_, GlobalVariablesTableProducer::Variable.type_, edm::AllowedLabelsDescriptionBase.type_, DQMHcalIsoTrackAlCaReco.type_, omtf::CscDataWord64::.type_, pat::helper::AnyNumberAssociationAdaptor.type_, omtf::CscDataWord64.type_, DBReader.type_, edm::eventsetup::EventSetupRecordKey.type_, GsfElectronDataAnalyzer.type_, NoBranchErrorThrower.type_, L1TUtmCondition.type_, SimpleFlatTableProducerBase< T, TProd >::VariableBase.type_, reco::PUSubMETCandInfo.type_, fwlite::internal::DataKey.type_, L1TUtmScale.type_, edm::eventsetup::DataKey.type_, l1t::EtSum.type_, pftools::CandidateWrapper.type_, edm::ParameterDescriptionBase.type_, BinomialInterval.type_, ScoutingMuon.type_, l1extra::L1EmParticle.type_, OpticalAlignInfo.type_, l1extra::L1JetParticle.type_, Json::Reader::Token.type_, edm::PileUp.type_, pat::JetCorrFactorsProducer.type_, L1TUtmObject.type_, Entry.type_, pos::PixelPortCardConfig.type_, edm::Handle< GenericObject >.type_, FastTimeTopology.type_, L1GctInternHFData.type_, BeamSpotObjects.type_, edm::test::TestProcessorConfig::ProduceEntry.type_, l1extra::L1EtMissParticle.type_, edm::Handle< FWGenericObject >.type_, funct::RootIntegrator.type_, reco::PFBlockElement.type_, CSCCorrelatedLCTDigi.type_, L1GctInternHtMiss.type_, reco::BeamSpot.type_, L1GctInternEtSum.type_, L1GctInternJetData.type_, TrackerDpgAnalysis.type_, SiStripConfigDb::Run.type_, ConfigurableHisto.type_, GeometricTimingDet.type_, CandMCMatchTableProducer.type_, reco::Muon.type_, GsfElectronFakeAnalyzer.type_, Mixins._TypedParameterizable.type_(), Json::Value.type_, edm::IndexIntoFile::IndexIntoFileItrImpl.type_, and Config.SubProcess.type_().

113  def dumpPythonAs(self, label, options=PrintOptions()):
114  result = options.indentation()
115  basename = self._targetLabel
116  if basename == '':
117  basename = self.type_()
118  if options.isCfg:
119  # do either type or label
120  result += 'process.prefer("'+basename+'"'
121  if self.parameterNames_():
122  result += ",\n"+_Parameterizable.dumpPython(self,options)+options.indentation()
123  result +=')\n'
124  else:
125  # use the base class Module
126  result += 'es_prefer_'+basename+' = cms.ESPrefer("'+self.type_()+'"'
127  if self._targetLabel != '':
128  result += ',"'+self._targetLabel+'"'
129  if self.parameterNames_():
130  result += ",\n"+_Parameterizable.dumpPython(self,options)+options.indentation()
131  result += ')\n'
132  return result
133 
def parameterNames_(self)
Definition: Mixins.py:175
def dumpPythonAs(self, label, options=PrintOptions())
Definition: Modules.py:113
def Modules.ESPrefer.moduleLabel_ (   self,
  myname 
)

Definition at line 109 of file Modules.py.

References Modules.ESPrefer._targetLabel.

Referenced by ExternalGeneratorFilter.ExternalGeneratorFilter.insertInto().

109  def moduleLabel_(self, myname):
110  return self._targetLabel
def moduleLabel_(self, myname)
Definition: Modules.py:109
def Modules.ESPrefer.nameInProcessDesc_ (   self,
  myname 
)

Definition at line 102 of file Modules.py.

References Modules.ESPrefer._targetLabel, MuonTypeByOrCut.type_, edm::ObjectWithDict.type_, L1TMuonOverlapParams::Node.type_, FWJobMetadataManager::Data.type_, L1TTwinMuxParams::Node.type_, reco::MuonMETCorrectionData.type_, FastTimeParametersESModule.type_, L1TMuonGlobalParams_PUBLIC::Node.type_, CutBasedElectronID.type_, L1TMuonGlobalParams::Node.type_, OpticalAlignMeasurementInfo.type_, L1TMuonBarrelParams::Node.type_, ProcessCallGraph::NodeType.type_, edm::eventsetup::ComponentDescription.type_, HcalSiPMParameter.type_, HcalSiPMCharacteristics::PrecisionItem.type_, l1t::CaloParams::Node.type_, omtf::RpcDataWord64.type_, omtf::RpcDataWord64::.type_, StringCutObjectSelector< T, DefaultLazyness >.type_, EleEnergyRetriever.type_, StringObjectFunction< T, DefaultLazyness >.type_, MuonIDFilterProducerForHLT.type_, MuonRefProducer.type_, omtf::MuonDataWord64.type_, omtf::MuonDataWord64::.type_, PGeometricTimingDet::Item.type_, TauDQMHistPlotter::cfgEntryProcess.type_, reco::TrackingRecHitInfo.type_, pftools::ParticleFiltrationDecision.type_, pos::PixelTKFECParameters.type_, pat::TriggerFilter.type_, NoProductErrorThrower.type_, FastTimerSD.type_, l1t::BlockHeader.type_, pat::TriggerCondition.type_, edm::ParentContext.type_, edm::ParameterWildcardBase.type_, omtf::DtDataWord64.type_, omtf::DtDataWord64::.type_, MultShiftMETcorrInputProducer.type_, l1t::CaloSpare.type_, edm::ConsumesInfo.type_, FastTimeTopologyBuilder.type_, GlobalVariablesTableProducer::Variable.type_, DQMHcalIsoTrackAlCaReco.type_, edm::AllowedLabelsDescriptionBase.type_, pat::helper::AnyNumberAssociationAdaptor.type_, omtf::CscDataWord64.type_, omtf::CscDataWord64::.type_, DBReader.type_, edm::eventsetup::EventSetupRecordKey.type_, GsfElectronDataAnalyzer.type_, NoBranchErrorThrower.type_, L1TUtmCondition.type_, SimpleFlatTableProducerBase< T, TProd >::VariableBase.type_, reco::PUSubMETCandInfo.type_, fwlite::internal::DataKey.type_, L1TUtmScale.type_, edm::eventsetup::DataKey.type_, l1t::EtSum.type_, edm::ParameterDescriptionBase.type_, BinomialInterval.type_, pftools::CandidateWrapper.type_, ScoutingMuon.type_, l1extra::L1EmParticle.type_, OpticalAlignInfo.type_, l1extra::L1JetParticle.type_, Json::Reader::Token.type_, edm::PileUp.type_, L1TUtmObject.type_, pat::JetCorrFactorsProducer.type_, Entry.type_, pos::PixelPortCardConfig.type_, edm::Handle< GenericObject >.type_, FastTimeTopology.type_, BeamSpotObjects.type_, L1GctInternHFData.type_, edm::test::TestProcessorConfig::ProduceEntry.type_, l1extra::L1EtMissParticle.type_, edm::Handle< FWGenericObject >.type_, funct::RootIntegrator.type_, reco::PFBlockElement.type_, CSCCorrelatedLCTDigi.type_, L1GctInternHtMiss.type_, reco::BeamSpot.type_, L1GctInternEtSum.type_, L1GctInternJetData.type_, TrackerDpgAnalysis.type_, SiStripConfigDb::Run.type_, ConfigurableHisto.type_, GeometricTimingDet.type_, CandMCMatchTableProducer.type_, reco::Muon.type_, GsfElectronFakeAnalyzer.type_, Mixins._TypedParameterizable.type_(), Json::Value.type_, edm::IndexIntoFile::IndexIntoFileItrImpl.type_, and Config.SubProcess.type_().

Referenced by Types.EDAlias.appendToProcessDescList_(), ExternalGeneratorFilter.ExternalGeneratorFilter.insertInto(), and Types.EDAlias.insertInto().

102  def nameInProcessDesc_(self, myname):
103  # the C++ parser can give it a name like "label@prefer". Get rid of that.
104  return "esprefer_" + self.type_() + "@" + self._targetLabel
def nameInProcessDesc_(self, myname)
Definition: Modules.py:102
def Modules.ESPrefer.targetLabel_ (   self)

Definition at line 111 of file Modules.py.

References Modules.ESPrefer._targetLabel.

111  def targetLabel_(self):
112  return self._targetLabel
def targetLabel_(self)
Definition: Modules.py:111

Member Data Documentation

Modules.ESPrefer._targetLabel
private