CMS 3D CMS Logo

List of all members | Public Member Functions
ExternalGeneratorFilter.ExternalGeneratorFilter Class Reference
Inheritance diagram for ExternalGeneratorFilter.ExternalGeneratorFilter:

Public Member Functions

def __getattr__ (self, name)
 
def __getstate__ (self)
 
def __init__ (self, prod, _external_process_waitTime_=cms.untracked.uint32(300), _external_process_verbose_=cms.untracked.bool(False), _external_process_components_=cms.vstring())
 
def __setattr__ (self, name, value)
 
def __setstate__ (self, d)
 
def clone (self, params)
 
def dumpPython (self, options=cms.PrintOptions())
 
def insertInto (self, parameterSet, myname)
 

Detailed Description

Definition at line 3 of file ExternalGeneratorFilter.py.

Constructor & Destructor Documentation

def ExternalGeneratorFilter.ExternalGeneratorFilter.__init__ (   self,
  prod,
  _external_process_waitTime_ = cms.untracked.uint32(300),
  _external_process_verbose_ = cms.untracked.bool(False),
  _external_process_components_ = cms.vstring() 
)

Definition at line 5 of file ExternalGeneratorFilter.py.

5  _external_process_components_ = cms.vstring()):
6  self.__dict__['_external_process_verbose_']=_external_process_verbose_
7  self.__dict__['_external_process_waitTime_']=_external_process_waitTime_
8  self.__dict__['_external_process_components_'] = _external_process_components_
9  self.__dict__['_prod'] = prod
10  super(cms.EDFilter,self).__init__('ExternalGeneratorFilter')
def __init__(self, prod, _external_process_waitTime_=cms.untracked.uint32(300), _external_process_verbose_=cms.untracked.bool(False), _external_process_components_=cms.vstring())

Member Function Documentation

def ExternalGeneratorFilter.ExternalGeneratorFilter.__getattr__ (   self,
  name 
)

Definition at line 15 of file ExternalGeneratorFilter.py.

15  def __getattr__(self, name):
16  if name =='_prod':
17  return self.__dict__['_prod']
18  if name == '_external_process_verbose_':
19  return self.__dict__['_external_process_verbose_']
20  return getattr(self._prod, name)
def ExternalGeneratorFilter.ExternalGeneratorFilter.__getstate__ (   self)

Definition at line 21 of file ExternalGeneratorFilter.py.

21  def __getstate__(self): return self.__dict__
def ExternalGeneratorFilter.ExternalGeneratorFilter.__setattr__ (   self,
  name,
  value 
)

Definition at line 11 of file ExternalGeneratorFilter.py.

Referenced by GenObject.GenObject.setValue().

11  def __setattr__(self, name, value):
12  if name =='_external_process_verbose_':
13  return self.__dict__['_external_process_verbose_']
14  setattr(self._prod, name, value)
def ExternalGeneratorFilter.ExternalGeneratorFilter.__setstate__ (   self,
  d 
)

Definition at line 22 of file ExternalGeneratorFilter.py.

22  def __setstate__(self, d): self.__dict__.update(d)
def ExternalGeneratorFilter.ExternalGeneratorFilter.clone (   self,
  params 
)

Definition at line 23 of file ExternalGeneratorFilter.py.

23  def clone(self, **params):
24  returnValue = ExternalGeneratorFilter.__new__(type(self))
25  returnValue.__init__(self._prod.clone())
26  return returnValue
def ExternalGeneratorFilter.ExternalGeneratorFilter.dumpPython (   self,
  options = cms.PrintOptions() 
)

Definition at line 45 of file ExternalGeneratorFilter.py.

Referenced by ExternalGeneratorFilter.ExternalGeneratorFilter.insertInto().

45  def dumpPython(self, options=cms.PrintOptions()):
46  cms.specialImportRegistry.registerUse(self)
47  result = "%s(" % self.__class__.__name__ # not including cms. since the deriving classes are not in cms "namespace"
48  options.indent()
49  result += "\n"+options.indentation() + self._prod.dumpPython(options)
50  result +=options.indentation()+",\n"
51  result += options.indentation() + "_external_process_waitTime_ = " + self._external_process_waitTime_.dumpPython(options) + ',\n'
52  result += options.indentation() + "_external_process_verbose_ = " + self._external_process_verbose_.dumpPython(options) + ',\n'
53  result += options.indentation() + "_external_process_components_ =" + self._external_process_components_.dumpPython(options) + ','
54  options.unindent()
55  result += "\n)\n"
56  return result
57 
58 cms.specialImportRegistry.registerSpecialImportForType(ExternalGeneratorFilter, "from GeneratorInterface.Core.ExternalGeneratorFilter import ExternalGeneratorFilter")
59 
def dumpPython(self, options=cms.PrintOptions())
def ExternalGeneratorFilter.ExternalGeneratorFilter.insertInto (   self,
  parameterSet,
  myname 
)

Definition at line 27 of file ExternalGeneratorFilter.py.

References ExternalGeneratorFilter.ExternalGeneratorFilter.dumpPython(), FWJobMetadataManager::Data.moduleLabel_, PFMatchedCandidateRefExtractor.moduleLabel_, edm::ModuleLabelMatch.moduleLabel_, GBRForestWriter.moduleLabel_, MuonMETcorrInputProducer.moduleLabel_, SysShiftMETcorrInputProducer.moduleLabel_, ShiftedJetProducerByMatchedObjectT< T >.moduleLabel_, edm::BranchKey.moduleLabel_, Type0PFMETcorrInputProducer.moduleLabel_, PFCandMETcorrInputProducer.moduleLabel_, Modules.ESSource.moduleLabel_(), NoPileUpPFMEtProducer.moduleLabel_, PFchsMETcorrInputProducer.moduleLabel_, ShiftedPFCandidateProducerForPFMVAMEt.moduleLabel_, MultShiftMETcorrInputProducer.moduleLabel_, MultShiftMETcorrDBInputProducer.moduleLabel_, ShiftedParticleProducer.moduleLabel_, RecoTauDiscriminantCutMultiplexer.moduleLabel_, PATTauDiscriminantCutMultiplexer.moduleLabel_, NoPileUpPFMEtDataProducer.moduleLabel_, BoostedTauSeedsProducer.moduleLabel_, RecoTauGenericJetRegionProducer< JetType, CandType >.moduleLabel_, ShiftedPFCandidateProducerForPFNoPUMEt.moduleLabel_, PATTauDiscriminationAgainstElectronMVA6.moduleLabel_, TauDiscriminationAgainstElectronDeadECAL< TauType, TauDiscriminator >.moduleLabel_, SubjetFilterAlgorithm.moduleLabel_, Modules.ESProducer.moduleLabel_(), pat::TauJetCorrFactorsProducer.moduleLabel_, PFRecoTauDiscriminationAgainstElectronMVA6.moduleLabel_, PFRecoTauDiscriminationAgainstElectronMVA5.moduleLabel_, ObjectViewMatcher< T1, T2 >.moduleLabel_, ObjectViewCleaner< T >.moduleLabel_, PFRecoTauDiscriminationAgainstMuonSimple.moduleLabel_, JetIdSelector< T >.moduleLabel_, PFRecoTauChargedHadronProducer.moduleLabel_, edm::ProductSelectorRules::Rule.moduleLabel_, PFRecoTauDiscriminationAgainstMuon2.moduleLabel_, TauTagValidation.moduleLabel_, MinMETProducerT< T >.moduleLabel_, edm::ModuleDescription.moduleLabel_, ShiftedParticleProducerT< T >.moduleLabel_, TauDiscriminationProducerBase< TauType, TauDiscriminator >.moduleLabel_, Modules.ESPrefer.moduleLabel_(), PFRecoTauDiscriminationAgainstMuonMVA.moduleLabel_, HLTMuonMatchAndPlot.moduleLabel_, CorrectedMETProducerT< T >.moduleLabel_, PFRecoTauDiscriminationByIsolationMVA2.moduleLabel_, edm::test::TestProcessorConfig::ProduceEntry.moduleLabel_, reco::tau::PFRecoTauDiscriminationByMVAIsolationRun2.moduleLabel_, reco::tau::PATTauDiscriminationByMVAIsolationRun2.moduleLabel_, VirtualJetProducer.moduleLabel_, ShiftedJetProducerT< T, Textractor >.moduleLabel_, edm::PoolOutputModule.moduleLabel_, CaloJetMETcorrInputProducerT< T, Textractor >.moduleLabel_, Modules.Source.moduleLabel_(), PFRecoTauDiscriminationByIsolation.moduleLabel_, edm::BranchDescription.moduleLabel_, JetCleanerForType1METT< T, Textractor >.moduleLabel_, Modules.Looper.moduleLabel_(), PFJetMETcorrInputProducerT< T, Textractor >.moduleLabel_, edm::ProductResolverIndexHelper::Item.moduleLabel_, Modules.SwitchProducer.moduleLabel_(), Mixins._TypedParameterizable.moduleLabel_(), Modules.ESSource.nameInProcessDesc_(), Modules.ESProducer.nameInProcessDesc_(), Modules.ESPrefer.nameInProcessDesc_(), Modules.Source.nameInProcessDesc_(), Modules.Looper.nameInProcessDesc_(), Modules.SwitchProducer.nameInProcessDesc_(), SequenceTypes._ModuleSequenceType.nameInProcessDesc_(), Mixins._TypedParameterizable.nameInProcessDesc_(), Types.EDAlias.nameInProcessDesc_(), Config.SubProcess.nameInProcessDesc_(), python.rootplot.root2matplotlib.replace(), MuonTypeByOrCut.type_, edm::ObjectWithDict.type_, L1TMuonOverlapParams::Node.type_, FWJobMetadataManager::Data.type_, L1TTwinMuxParams::Node.type_, FastTimeParametersESModule.type_, L1TMuonGlobalParams_PUBLIC::Node.type_, reco::MuonMETCorrectionData.type_, L1TMuonGlobalParams::Node.type_, CutBasedElectronID.type_, L1TMuonBarrelParams::Node.type_, OpticalAlignMeasurementInfo.type_, ProcessCallGraph::NodeType.type_, edm::eventsetup::ComponentDescription.type_, HcalSiPMCharacteristics::PrecisionItem.type_, HcalSiPMParameter.type_, l1t::CaloParams::Node.type_, omtf::RpcDataWord64.type_, omtf::RpcDataWord64::.type_, StringCutObjectSelector< reco::MET, true >.type_, StringCutObjectSelector< reco::PFJet, true >.type_, StringObjectFunction< std::vector< TOutputCandidateType > >.type_, StringCutObjectSelector< reco::PFMET >.type_, StringCutObjectSelector< reco::MET >.type_, StringCutObjectSelector< reco::Photon >.type_, StringCutObjectSelector< pat::pat::IsolatedTrack >.type_, StringCutObjectSelector< pat::PackedCandidate, false >.type_, StringCutObjectSelector< reco::reco::Vertex >.type_, StringCutObjectSelector< reco::Track >.type_, StringCutObjectSelector< T, DefaultLazyness >.type_, StringObjectFunction< T, DefaultLazyness >.type_, StringCutObjectSelector< TriggerObject >.type_, StringCutObjectSelector< reco::PFCandidate >.type_, StringCutObjectSelector< reco::TrackRef, false >.type_, StringCutObjectSelector< reco::Track, true >.type_, vector< TOutputCandidateType >.type_, EleEnergyRetriever.type_, StringCutObjectSelector< typename Classifier::Categories >.type_, StringCutObjectSelector< reco::Muon, false >.type_, StringCutObjectSelector< T1, true >.type_, StringCutObjectSelector< reco::Candidate::LorentzVector, true >.type_, StringCutObjectSelector< reco::Track, false >.type_, StringCutObjectSelector< reco::Vertex, true >.type_, StringCutObjectSelector< pat::Jet >.type_, StringCutObjectSelector< reco::Jet >.type_, StringCutObjectSelector< reco::CaloTau >.type_, StringCutObjectSelector< reco::JetID >.type_, StringCutObjectSelector< reco::GenJet >.type_, StringCutObjectSelector< std::vector< TOutputCandidateType > >.type_, StringCutObjectSelector< ObjType, true >.type_, StringCutObjectSelector< T2 >.type_, StringCutObjectSelector< pat::pat::Jet >.type_, StringCutObjectSelector< T2, true >.type_, StringCutObjectSelector< pat::Tau >.type_, StringObjectFunction< Object >.type_, StringCutObjectSelector< reco::GenParticle >.type_, StringCutObjectSelector< pat::TriggerObjectStandAlone >.type_, StringObjectFunction< reco::RecoTauPiZero >.type_, StringCutObjectSelector< pat::pat::Photon >.type_, StringCutObjectSelector< pat::Muon, false >.type_, StringCutObjectSelector< T, Lazy >.type_, StringObjectFunction< T, true >.type_, StringCutObjectSelector< reco::Jet, true >.type_, StringCutObjectSelector< reco::RecoTauPiZero >.type_, StringCutObjectSelector< reco::Candidate::LorentzVector >.type_, StringCutObjectSelector< reco::PFRecoTauChargedHadron >.type_, StringObjectFunction< TInputCandidateType >.type_, StringCutObjectSelector< T1 >.type_, StringObjectFunction< l1t::l1t::HGCalMulticluster >.type_, StringCutObjectSelector< l1extra::L1EtMissParticle >.type_, StringObjectFunction< reco::Photon >.type_, StringCutObjectSelector< reco::GenMET >.type_, StringCutObjectSelector< pat::Muon >.type_, StringObjectFunction< reco::Candidate >.type_, StringObjectFunction< pat::TriggerObjectStandAlone >.type_, StringCutObjectSelector< l1extra::L1MuonParticle >.type_, StringCutObjectSelector< reco::CaloMuon, false >.type_, StringCutObjectSelector< reco::CaloMET, true >.type_, StringCutObjectSelector< l1t::l1t::HGCalMulticluster >.type_, StringCutObjectSelector< pat::DiObjectProxy, true >.type_, StringCutObjectSelector< reco::utils::ClusterTotals >.type_, StringCutObjectSelector< T >.type_, StringCutObjectSelector< pat::pat::DiObjectProxy >.type_, StringCutObjectSelector< reco::GsfElectron >.type_, StringCutObjectSelector< TInputCandidateType >.type_, StringCutObjectSelector< MuonPointerPair, true >.type_, StringCutObjectSelector< reco::GsfElectron, true >.type_, StringCutObjectSelector< trigger::TriggerObject >.type_, StringCutObjectSelector< pat::Photon >.type_, StringCutObjectSelector< pat::pat::Electron >.type_, StringCutObjectSelector< Object >.type_, StringCutObjectSelector< reco::CaloJet >.type_, StringCutObjectSelector< reco::CaloMET >.type_, StringCutObjectSelector< PFTau >.type_, StringCutObjectSelector< pat::Electron >.type_, StringCutObjectSelector< reco::Vertex >.type_, StringCutObjectSelector< reco::Candidate >.type_, StringCutObjectSelector< pat::pat::Muon >.type_, StringCutObjectSelector< T2 > nDau.type_, StringCutObjectSelector< reco::PFTau >.type_, StringCutObjectSelector< T, true >.type_, StringObjectFunction< reco::PFTau >.type_, StringCutObjectSelector< reco::Muon, true >.type_, StringCutObjectSelector< reco::Photon, true >.type_, StringObjectFunction< T >.type_, StringCutObjectSelector< reco::PFJet >.type_, StringCutObjectSelector< reco::Muon >.type_, StringObjectFunction< reco::Jet >.type_, StringCutObjectSelector< pat::IsolatedTrack >.type_, StringObjectFunction< reco::PFRecoTauChargedHadron >.type_, StringCutObjectSelector< reco::CaloJet, true >.type_, StringObjectFunction< PFTau >.type_, StringObjectFunction< reco::Candidate, true >.type_, StringObjectFunction< reco::reco::PFTau >.type_, StringCutObjectSelector< reco::Candidate, true >.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_, FastTimeTopologyBuilder.type_, edm::ConsumesInfo.type_, GlobalVariablesTableProducer::Variable.type_, edm::AllowedLabelsDescriptionBase.type_, DQMHcalIsoTrackAlCaReco.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_, OpticalAlignInfo.type_, l1extra::L1EmParticle.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_().

27  def insertInto(self, parameterSet, myname):
28  newpset = parameterSet.newPSet()
29  newpset.addString(True, "@module_label", self.moduleLabel_(myname))
30  newpset.addString(True, "@module_type", self.type_())
31  newpset.addString(True, "@module_edm_type", cms.EDFilter.__name__)
32  newpset.addString(True, "@external_type", self._prod.type_())
33  newpset.addString(False,"@python_config", self._prod.dumpPython().replace(R"\n", R"\\n"))
34  newpset.addBool(False,"_external_process_verbose_", self._external_process_verbose_.value())
35  newpset.addUInt32(False,"_external_process_waitTime_", self._external_process_waitTime_.value())
36  newpset.addVString(True, "_external_process_components_", self._external_process_components_.value())
37 
38  extraConfig =''
39  for x in self._external_process_components_.value():
40  extraConfig += "process."+x+"="+parameterSet.getTopPSet_(x).dumpPython()
41  extraConfig += '\n'
42  newpset.addString(False, "_external_process_extraConfig_", extraConfig)
43  self._prod.insertContentsInto(newpset)
44  parameterSet.addPSet(True, self.nameInProcessDesc_(myname), newpset)
def replace(string, replacements)
def dumpPython(self, options=cms.PrintOptions())