CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
Mixins._Labelable Class Reference
Inheritance diagram for Mixins._Labelable:

Public Member Functions

def __str__
 
def dumpSequenceConfig
 
def dumpSequencePython
 
def hasLabel_
 
def label
 
def label_
 
def setLabel
 

Private Member Functions

def _findDependencies
 

Private Attributes

 __label
 

Detailed Description

A 'mixin' used to denote that the class can be paired with a label (e.g. an EDProducer)

Definition at line 517 of file Mixins.py.

Member Function Documentation

def Mixins._Labelable.__str__ (   self)

Definition at line 546 of file Mixins.py.

References Mixins._Labelable.__label, and str.

547  def __str__(self):
548  #this is probably a bad idea
549  # I added this so that when we ask a path to print
550  # we will see the label that has been assigned
return str(self.__label)
#define str(s)
def Mixins._Labelable._findDependencies (   self,
  knownDeps,
  presentDeps 
)
private

Definition at line 558 of file Mixins.py.

References CTPPSPixelDAQMappingAnalyzer.label_, TestCUDAProducerCPU.label_, TestCUDAProducerGPU.label_, TestCUDAProducerGPUFirst.label_, SiPhase2OuterTrackerLorentzAngleReader.label_, TestCUDAAnalyzerGPU.label_, SiStripLorentzAngleReader.label_, TestCUDAProducerGPUtoCPU.label_, edm::eventsetup::ComponentDescription.label_, TestCUDAProducerGPUEW.label_, pat::TriggerFilter.label_, XMLIdealMagneticFieldGeometryESProducer.label_, ESDigiToRaw.label_, PythiaFilterHT.label_, TestCUDAProducerGPUEWTask.label_, CTPPSPixelRawToDigi.label_, VertexCompositeCandidateCollectionSelector.label_, RetrieveCTPPSBeamParameters.label_, WriteCTPPSPixelAnalysisMask.label_, WriteCTPPSPixelDAQMapping.label_, HistoProviderDQM.label_, SiStripDelayESProducer::TokenSign.label_, RandomEngineState.label_, PythiaMomDauFilter.label_, StripSubClusterShapeFilterBase.label_, VertexMonitor.label_, edm::ConsumesInfo.label_, edm::test::ProcessBlock.label_, SiPixelStatusManager.label_, edm::SecSourceAnalyzer.label_, edm::InputTag.label_, TPGCheck.label_, SiPixelStatusHarvester.label_, reco::Centrality.label_, DDDetectorESProducer.label_, L1TkEmParticleProducer.label_, edm::test::Run.label_, PPSPixelDigiAnalyzer.label_, edm::test::LuminosityBlock.label_, pat::TauJetCorrFactors.label_, EcalTrigPrimAnalyzer.label_, edm::test::Event.label_, EffPurFromHistos2D.label_, edm::DataMixingSiStripWorker.label_, StallStatistics.label_, edm::DataMixingSiPixelWorker.label_, edm::DataMixingPileupCopy.label_, SiPixelCalibDigiProducer.label_, EffPurFromHistos.label_, edm::DataMixingSiStripRawWorker.label_, edm::HiMixingWorkerBase.label_, SingleTopTChannelLepton_miniAOD::MonitorEnsemble.label_, TopSingleLepton_miniAOD::MonitorEnsemble.label_, npstat::UniformAxis.label_, edm::ParameterDescriptionBase.label_, PileupJetIdAlgo::AlgoGBRForestsAndConstants.label_, edm::messagedrop::StringProducerWithPhase.label_, edm::DataMixingEMWorker.label_, fwlite::ObjectCountSelector< Collection >.label_, edm::DataMixingHcalWorker.label_, pat::JetCorrFactors.label_, edm::DataMixingHcalDigiWorkerProd.label_, pat::JetCorrFactorsProducer.label_, TopSingleLepton::MonitorEnsemble.label_, edm::DataMixingMuonWorker.label_, npstat::NUHistoAxis.label_, pat::helper::AnyNumberAssociationAdaptor.label_, SingleTopTChannelLepton::MonitorEnsemble.label_, edm::DataMixingEMDigiWorker.label_, TopDiLeptonOffline::MonitorEnsemble.label_, edm::DataMixingHcalDigiWorker.label_, HLTObjectsMonitor.label_, npstat::GridAxis.label_, SummaryGenerator.label_, npstat::HistoAxis.label_, edm::service::RandomNumberGeneratorService::LabelAndEngine.label_, templateHelper::SiPixelTitles_Display< PayloadType, StoreType, TransientType >.label_, edm::MixingWorker< T >.label_, edm::DataMixingModule.label_, templateHelper::SiPixelHeaderTable< PayloadType, StoreType, TransientType >.label_, gainCalibHelper::SiPixelGainCalibrationValues< myType, PayloadType >.label_, templateHelper::SiPixelIDs< PayloadType, myType >.label_, templateHelper::SiPixelFullPixelIDMap< PayloadType, StoreType, TransientType >.label_, Mixins._Labelable.label_(), gainCalibHelper::SiPixelGainCalibrationValuesPerRegion< isBarrel, myType, PayloadType >.label_, fwlite::Scanner< Collection >.label_, gainCalibHelper::SiPixelGainCalibrationValuesComparisonPerRegion< isBarrel, myType, nIOVs, ntags, PayloadType >.label_, gainCalibHelper::SiPixelGainCalibrationCorrelations< PayloadType >.label_, SiPixelLorentzAngleFullPixelMap.label_, gainCalibHelper::SiPixelGainCalibrationValuesByPart< myType, PayloadType >.label_, gainCalibHelper::SiPixelGainCalibrationValueComparisonBase< myType, PayloadType >.label_, gainCalibHelper::SiPixelGainCalibDiffAndRatioBase< myType, nIOVs, ntags, PayloadType >.label_, gainCalibHelper::SiPixelGainCalibrationMap< myType, PayloadType, myDetType >.label_, gainCalibHelper::SiPixelGainCalibrationByRegionComparisonBase< myType, PayloadType, nIOVs, ntags >.label_, and str.

559  def _findDependencies(self,knownDeps,presentDeps):
560  #print 'in labelled'
561  myDeps=knownDeps.get(self.label_(),None)
562  if myDeps!=None:
563  if presentDeps != myDeps:
564  raise RuntimeError("the module "+self.label_()+" has two dependencies \n"
565  +str(presentDeps)+"\n"
566  +str(myDeps)+"\n"
567  +"Please modify sequences to rectify this inconsistency")
568  else:
569  myDeps=set(presentDeps)
570  knownDeps[self.label_()]=myDeps
571  presentDeps.add(self.label_())
572 
def _findDependencies
Definition: Mixins.py:558
#define str(s)
def Mixins._Labelable.dumpSequenceConfig (   self)

Definition at line 551 of file Mixins.py.

References Mixins._Labelable.__label, and str.

552  def dumpSequenceConfig(self):
return str(self.__label)
def dumpSequenceConfig
Definition: Mixins.py:551
#define str(s)
def Mixins._Labelable.dumpSequencePython (   self,
  options = PrintOptions() 
)

Definition at line 553 of file Mixins.py.

References Mixins._Labelable.__label, and str.

554  def dumpSequencePython(self, options=PrintOptions()):
555  if options.isCfg:
556  return 'process.'+str(self.__label)
557  else:
return str(self.__label)
def dumpSequencePython
Definition: Mixins.py:553
#define str(s)
def Mixins._Labelable.hasLabel_ (   self)

Definition at line 523 of file Mixins.py.

References Mixins._Labelable.__label.

Referenced by SequenceTypes._ModuleSequenceType.dumpSequenceConfig(), SequenceTypes._ModuleSequenceType.dumpSequencePython(), SequenceTypes.Task.fillContents(), and Mixins._Labelable.setLabel().

524  def hasLabel_(self):
return hasattr(self, "_Labelable__label") and self.__label is not None
def Mixins._Labelable.label (   self)

Definition at line 543 of file Mixins.py.

References Mixins._Labelable.__label.

544  def label(self):
545  #print "WARNING: _Labelable::label() needs to be changed to label_()"
return self.__label
def Mixins._Labelable.label_ (   self)

Definition at line 519 of file Mixins.py.

References Mixins._Labelable.__label.

Referenced by SequenceTypes.DummyModule.__repr__(), Mixins._Labelable._findDependencies(), and Mixins._Labelable.setLabel().

520  def label_(self):
521  if not hasattr(self, "_Labelable__label"):
522  raise RuntimeError("module has no label. Perhaps it wasn't inserted into the process?")
return self.__label
def Mixins._Labelable.setLabel (   self,
  label 
)

Definition at line 525 of file Mixins.py.

References Mixins._Labelable.hasLabel_(), CTPPSPixelDAQMappingAnalyzer.label_, TestCUDAProducerCPU.label_, TestCUDAProducerGPU.label_, TestCUDAProducerGPUFirst.label_, SiPhase2OuterTrackerLorentzAngleReader.label_, TestCUDAAnalyzerGPU.label_, TestCUDAProducerGPUtoCPU.label_, SiStripLorentzAngleReader.label_, edm::eventsetup::ComponentDescription.label_, TestCUDAProducerGPUEW.label_, pat::TriggerFilter.label_, XMLIdealMagneticFieldGeometryESProducer.label_, ESDigiToRaw.label_, PythiaFilterHT.label_, TestCUDAProducerGPUEWTask.label_, CTPPSPixelRawToDigi.label_, RetrieveCTPPSBeamParameters.label_, WriteCTPPSPixelAnalysisMask.label_, VertexCompositeCandidateCollectionSelector.label_, WriteCTPPSPixelDAQMapping.label_, HistoProviderDQM.label_, SiStripDelayESProducer::TokenSign.label_, RandomEngineState.label_, PythiaMomDauFilter.label_, StripSubClusterShapeFilterBase.label_, VertexMonitor.label_, edm::ConsumesInfo.label_, edm::test::ProcessBlock.label_, SiPixelStatusManager.label_, edm::SecSourceAnalyzer.label_, edm::InputTag.label_, SiPixelStatusHarvester.label_, TPGCheck.label_, reco::Centrality.label_, DDDetectorESProducer.label_, L1TkEmParticleProducer.label_, edm::test::Run.label_, PPSPixelDigiAnalyzer.label_, edm::test::LuminosityBlock.label_, pat::TauJetCorrFactors.label_, EcalTrigPrimAnalyzer.label_, edm::test::Event.label_, EffPurFromHistos2D.label_, edm::DataMixingSiStripWorker.label_, StallStatistics.label_, edm::DataMixingSiPixelWorker.label_, edm::DataMixingPileupCopy.label_, SiPixelCalibDigiProducer.label_, EffPurFromHistos.label_, edm::DataMixingSiStripRawWorker.label_, edm::HiMixingWorkerBase.label_, SingleTopTChannelLepton_miniAOD::MonitorEnsemble.label_, TopSingleLepton_miniAOD::MonitorEnsemble.label_, npstat::UniformAxis.label_, edm::ParameterDescriptionBase.label_, PileupJetIdAlgo::AlgoGBRForestsAndConstants.label_, edm::messagedrop::StringProducerWithPhase.label_, edm::DataMixingEMWorker.label_, fwlite::ObjectCountSelector< Collection >.label_, edm::DataMixingHcalWorker.label_, pat::JetCorrFactors.label_, edm::DataMixingHcalDigiWorkerProd.label_, pat::JetCorrFactorsProducer.label_, TopSingleLepton::MonitorEnsemble.label_, edm::DataMixingMuonWorker.label_, npstat::NUHistoAxis.label_, pat::helper::AnyNumberAssociationAdaptor.label_, edm::DataMixingEMDigiWorker.label_, SingleTopTChannelLepton::MonitorEnsemble.label_, TopDiLeptonOffline::MonitorEnsemble.label_, edm::DataMixingHcalDigiWorker.label_, HLTObjectsMonitor.label_, npstat::GridAxis.label_, SummaryGenerator.label_, npstat::HistoAxis.label_, edm::service::RandomNumberGeneratorService::LabelAndEngine.label_, templateHelper::SiPixelTitles_Display< PayloadType, StoreType, TransientType >.label_, edm::MixingWorker< T >.label_, edm::DataMixingModule.label_, templateHelper::SiPixelHeaderTable< PayloadType, StoreType, TransientType >.label_, gainCalibHelper::SiPixelGainCalibrationValues< myType, PayloadType >.label_, templateHelper::SiPixelIDs< PayloadType, myType >.label_, templateHelper::SiPixelFullPixelIDMap< PayloadType, StoreType, TransientType >.label_, Mixins._Labelable.label_(), gainCalibHelper::SiPixelGainCalibrationValuesPerRegion< isBarrel, myType, PayloadType >.label_, fwlite::Scanner< Collection >.label_, gainCalibHelper::SiPixelGainCalibrationValuesComparisonPerRegion< isBarrel, myType, nIOVs, ntags, PayloadType >.label_, gainCalibHelper::SiPixelGainCalibrationCorrelations< PayloadType >.label_, SiPixelLorentzAngleFullPixelMap.label_, gainCalibHelper::SiPixelGainCalibrationValuesByPart< myType, PayloadType >.label_, gainCalibHelper::SiPixelGainCalibrationValueComparisonBase< myType, PayloadType >.label_, gainCalibHelper::SiPixelGainCalibDiffAndRatioBase< myType, nIOVs, ntags, PayloadType >.label_, gainCalibHelper::SiPixelGainCalibrationMap< myType, PayloadType, myDetType >.label_, gainCalibHelper::SiPixelGainCalibrationByRegionComparisonBase< myType, PayloadType, nIOVs, ntags >.label_, and str.

Referenced by SequenceTypes.DummyModule.__init__(), and SequenceTypes.DummyBooleanModule.__init__().

526  def setLabel(self,label):
527  if self.hasLabel_() :
528  if self.label_() != label and label is not None :
529  msg100 = "Attempting to change the label of a Labelable object, possibly an attribute of the Process\n"
530  msg101 = "Old label = "+self.label_()+" New label = "+label+"\n"
531  msg102 = "Type = "+str(type(self))+"\n"
532  msg103 = "Some possible solutions:\n"
533  msg104 = " 1. Clone modules instead of using simple assignment. Cloning is\n"
534  msg105 = " also preferred for other types when possible.\n"
535  msg106 = " 2. Declare new names starting with an underscore if they are\n"
536  msg107 = " for temporaries you do not want propagated into the Process. The\n"
537  msg108 = " underscore tells \"from x import *\" and process.load not to import\n"
538  msg109 = " the name.\n"
539  msg110 = " 3. Reorganize so the assigment is not necessary. Giving a second\n"
540  msg111 = " name to the same object usually causes confusion and problems.\n"
541  msg112 = " 4. Compose Sequences: newName = cms.Sequence(oldName)\n"
542  raise ValueError(msg100+msg101+msg102+msg103+msg104+msg105+msg106+msg107+msg108+msg109+msg110+msg111+msg112)
self.__label = label
#define str(s)

Member Data Documentation

Mixins._Labelable.__label
private

Definition at line 542 of file Mixins.py.

Referenced by Mixins._Labelable.__str__(), Mixins._ValidatingListBase._labelIfAny(), Mixins._Labelable.dumpSequenceConfig(), Mixins._Labelable.dumpSequencePython(), SequenceVisitors.PathValidator.enter(), SequenceVisitors.EndPathValidator.enter(), SequenceVisitors.FinalPathValidator.enter(), Mixins._Labelable.hasLabel_(), Mixins._Labelable.label(), Mixins._Labelable.label_(), SequenceVisitors.PathValidator.setLabel(), SequenceVisitors.EndPathValidator.setLabel(), and SequenceVisitors.FinalPathValidator.setLabel().