test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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__
 
def copy
 
def dumpPythonAs
 
def moduleLabel_
 
def nameInProcessDesc_
 
def targetLabel_
 
- Public Member Functions inherited from Mixins._TypedParameterizable
def __init__
 
def clone
 
def copy
 
def dumpConfig
 
def dumpPython
 
def dumpPythonAttributes
 
def insertInto
 
def moduleLabel_
 
def nameInProcessDesc_
 
def type_
 
- Public Member Functions inherited from Mixins._Parameterizable
def __delattr__
 
def __init__
 
def __repr__
 
def __setattr__
 
def dumpPython
 
def getParameter
 
def hasParameter
 
def insertContentsInto
 
def isFrozen
 
def isModified
 
def parameterNames_
 
def parameters_
 
def setIsFrozen
 
- Public Member Functions inherited from Mixins._Labelable
def __str__
 
def dumpSequenceConfig
 
def dumpSequencePython
 
def hasLabel_
 
def label
 
def label_
 
def setLabel
 

Private Member Functions

def _placeImpl
 

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 55 of file Modules.py.

Constructor & Destructor Documentation

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

Definition at line 72 of file Modules.py.

72 
73  def __init__(self,type_,targetLabel='',*arg,**kargs):
74  super(ESPrefer,self).__init__(type_,*arg,**kargs)
75  self._targetLabel = targetLabel
76  if targetLabel is None:
77  self._targetLabel = str('')
78  if kargs:
79  for k,v in kargs.iteritems():
80  if not isinstance(v,vstring):
raise RuntimeError('ESPrefer only allows vstring attributes. "'+k+'" is a '+str(type(v)))

Member Function Documentation

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

Definition at line 81 of file Modules.py.

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

81 
82  def _placeImpl(self,name,proc):
proc._placeESPrefer(name,self)
def Modules.ESPrefer.copy (   self)

Definition at line 86 of file Modules.py.

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

86 
87  def copy(self):
88  returnValue = ESPrefer.__new__(type(self))
89  returnValue.__init__(self.type_(), self._targetLabel)
return returnValue
def Modules.ESPrefer.dumpPythonAs (   self,
  label,
  options = PrintOptions() 
)

Definition at line 94 of file Modules.py.

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

94 
95  def dumpPythonAs(self, label, options=PrintOptions()):
96  result = options.indentation()
97  basename = self._targetLabel
98  if basename == '':
99  basename = self.type_()
100  if options.isCfg:
101  # do either type or label
102  result += 'process.prefer("'+basename+'"'
103  if self.parameterNames_():
104  result += ",\n"+_Parameterizable.dumpPython(self,options)+options.indentation()
105  result +=')\n'
106  else:
107  # use the base class Module
108  result += 'es_prefer_'+basename+' = cms.ESPrefer("'+self.type_()+'"'
109  if self._targetLabel != '':
110  result += ',"'+self._targetLabel+'"'
111  if self.parameterNames_():
112  result += ",\n"+_Parameterizable.dumpPython(self,options)+options.indentation()
113  result += ')\n'
114  return result
def dumpPythonAs
Definition: Modules.py:94
def Modules.ESPrefer.moduleLabel_ (   self,
  myname 
)

Definition at line 90 of file Modules.py.

References Modules.ESPrefer._targetLabel.

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

Definition at line 83 of file Modules.py.

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

Referenced by Types.EDAlias.insertInto().

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

Definition at line 92 of file Modules.py.

References Modules.ESPrefer._targetLabel.

92 
93  def targetLabel_(self):
return self._targetLabel
def targetLabel_
Definition: Modules.py:92

Member Data Documentation

Modules.ESPrefer._targetLabel
private

Definition at line 74 of file Modules.py.

Referenced by Modules.ESPrefer.copy(), Modules.ESPrefer.dumpPythonAs(), Modules.ESPrefer.moduleLabel_(), Modules.ESPrefer.nameInProcessDesc_(), and Modules.ESPrefer.targetLabel_().