CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
VIDSelectorBase.VIDSelectorBase Class Reference

Public Member Functions

def __call__ (self, args)
 
def __init__ (self, vidSelectorBuilder, ptrMaker, printer, pythonpset=None)
 
def __repr__ (self)
 
def bitMap (self)
 
def cutFlowResult (self)
 
def cutFlowSize (self)
 
def howFarInCutFlow (self)
 
def initialize (self, pythonpset)
 
def md55Raw (self)
 
def md5String (self)
 
def name (self)
 

Private Attributes

 __initialized
 
 __instance
 
 __printer
 
 __ptrMaker
 
 __selectorBuilder
 
 __suffix
 

Detailed Description

Definition at line 35 of file VIDSelectorBase.py.

Constructor & Destructor Documentation

def VIDSelectorBase.VIDSelectorBase.__init__ (   self,
  vidSelectorBuilder,
  ptrMaker,
  printer,
  pythonpset = None 
)

Definition at line 36 of file VIDSelectorBase.py.

36  def __init__(self, vidSelectorBuilder, ptrMaker, printer, pythonpset = None):
37  self.__initialized = False
39  self.__printer = printer()
40  self.__ptrMaker = ptrMaker()
41  self.__selectorBuilder = vidSelectorBuilder()
42  self.__instance = None
43  if pythonpset is not None:
44  if hasattr(pythonpset,'isPOGApproved'):
45  approved = pythonpset.isPOGApproved.value()
46  if not approved:
47  sys.stderr.write('This ID is not POG approved and likely under development!!!!\n')
48  sys.stderr.write('Please make sure to report your progress with this ID'\
49  ' at the next relevant POG meeting.\n')
50  del pythonpset.isPOGApproved
51  else:
52  sys.stderr.write('This ID is not POG approved and likely under development!!!!\n')
53  sys.stderr.write('Please make sure to report your progress with this ID'\
54  ' at the next relevant POG meeting.\n')
55  self.__instance = process_pset( self.__selectorBuilder, pythonpset, self.__suffix )
56  expectedmd5 = central_id_registry.getMD5FromName(pythonpset.idName)
57  if expectedmd5 != self.md5String():
58  sys.stderr.write("ID: %s\n"%self.name())
59  sys.stderr.write("The expected md5: %s does not match the md5\n"%expectedmd5)
60  sys.stderr.write("calculated by the ID: %s please\n"%self.md5String())
61  sys.stderr.write("update your python configuration or determine the source\n")
62  sys.stderr.write("of transcription error!\n")
63  self.__initialized = True
64  else:
65  self.__instance = self.__selectorBuilder()
66 
def process_pset(builder, pythonpset, suffix)
def id_generator(size=6, chars=string.ascii_uppercase+string.digits)
def __init__(self, vidSelectorBuilder, ptrMaker, printer, pythonpset=None)

Member Function Documentation

def VIDSelectorBase.VIDSelectorBase.__call__ (   self,
  args 
)

Definition at line 67 of file VIDSelectorBase.py.

References VIDCutFlowResult.VIDCutFlowResult.__instance, VIDSelectorBase.VIDSelectorBase.__instance, VIDSelectorBase.VIDSelectorBase.__ptrMaker, reco.if(), join(), and resolutioncreator_cfi.object.

67  def __call__(self,*args):
68  if( len(args) == 1 ):
69  return self.__instance(*args)
70  if( len(args) == 2 and isinstance(args[1],DataFormats.FWLite.Events) ):
71  return self.__instance(args[0],args[1].object().event())
72  elif( len(args) == 2 and type(args[1]) is int ):
73  temp = self.__ptrMaker(args[0],args[1])
74  newargs = [temp]
75  return self.__instance(*newargs)
76  if( len(args) == 3 and type(args[1]) is int and isinstance(args[2], DataFormats.FWLite.Events) ):
77  temp = self.__ptrMaker(args[0],args[1])
78  newargs = [temp]
79  newargs += [args[2].object().event()]
80  return self.__instance(*newargs)
81  raise ValueError('VIDSelectorBase __call__ with args: "%s" is not a valid call pattern'%(','.join([repr(arg) for arg in args])))
82 
83 
static std::string join(char **cmd)
Definition: RemoteFile.cc:18
if(dp >Float(M_PI)) dp-
Definition: event.py:1
def VIDSelectorBase.VIDSelectorBase.__repr__ (   self)
def VIDSelectorBase.VIDSelectorBase.bitMap (   self)

Definition at line 122 of file VIDSelectorBase.py.

122  def bitMap(self):
123  return self.__instance.bitMap()
124 
def VIDSelectorBase.VIDSelectorBase.cutFlowResult (   self)

Definition at line 113 of file VIDSelectorBase.py.

113  def cutFlowResult(self):
114  return VIDCutFlowResult(self.__instance.cutFlowResult())
115 
def VIDSelectorBase.VIDSelectorBase.cutFlowSize (   self)

Definition at line 110 of file VIDSelectorBase.py.

110  def cutFlowSize(self):
111  return self.__instance.cutFlowSize()
112 
def VIDSelectorBase.VIDSelectorBase.howFarInCutFlow (   self)

Definition at line 116 of file VIDSelectorBase.py.

116  def howFarInCutFlow(self):
117  return self.__instance.howFarInCutFlow()
118 
def VIDSelectorBase.VIDSelectorBase.initialize (   self,
  pythonpset 
)

Definition at line 84 of file VIDSelectorBase.py.

References VIDSelectorBase.VIDSelectorBase.__initialized, VIDCutFlowResult.VIDCutFlowResult.__instance, VIDSelectorBase.VIDSelectorBase.__instance, VIDSelectorBase.VIDSelectorBase.__selectorBuilder, VIDSelectorBase.VIDSelectorBase.__suffix, reco.if(), VIDSelectorBase.VIDSelectorBase.md5String(), VersionedSelector< T >.md5String(), ElectronMVAID.ElectronMVAID.name, OAQualityTranslator.name(), counter.Counter.name, average.Average.name, histograms.Histograms.name, AlignableObjectId::entry.name, RPCGeomServ.name(), SymmetryFit.name(), cond::persistency::GLOBAL_TAG::NAME.name, cond::persistency::RUN_INFO::RUN_NUMBER.name, cond::persistency::TAG::NAME.name, TmModule.name, core.autovars.NTupleVariable.name, cond::persistency::GLOBAL_TAG::VALIDITY.name, cond::persistency::RUN_INFO::START_TIME.name, CmsTrackerStringToEnum.name(), cond::persistency::TAG::TIME_TYPE.name, candidate_functions::CandidateCut.name(), listHistos.plotInfo.name, cond::persistency::GLOBAL_TAG::DESCRIPTION.name, cond::persistency::RUN_INFO::END_TIME.name, FeldmanCousinsBinomialInterval.name(), SterneBinomialInterval.name(), cond::persistency::TAG::OBJECT_TYPE.name, cond::persistency::GLOBAL_TAG::RELEASE.name, cond::persistency::TAG::SYNCHRONIZATION.name, AxesNames.name(), cond::persistency::GLOBAL_TAG::SNAPSHOT_TIME.name, MEPSet.name, ExpressionEvaluatorCut.name(), cond::persistency::TAG::END_OF_VALIDITY.name, cond::persistency::GLOBAL_TAG::INSERTION_TIME.name, GeomDetType.name(), cond::persistency::TAG::DESCRIPTION.name, edm::ModuleTime.name(), cond::persistency::GTEditorData.name, cond::persistency::TAG::LAST_VALIDATED_TIME.name, FWTGeoRecoGeometry::Info.name, Types._Untracked.name, DDSolidShapesName.name(), preexistingValidation.PreexistingValidation.name, cond::persistency::TAG::INSERTION_TIME.name, dataset.BaseDataset.name, cond::persistency::TAG::MODIFICATION_TIME.name, ClopperPearsonBinomialInterval.name(), OutputMEPSet.name, PixelModuleName.name(), edm::BaseWithDict.name(), personalPlayback.Applet.name, HistoDef.name(), production_tasks.Task.name, fit::RootMinuitCommand.name, edm::MemberWithDict.name(), ExpressionEvaluatorCutWithEventContent.name(), EventSelector.name(), ParameterSet.name, FileData.name(), PacketData.name(), PixelDCSObject< T >::Item.name, PreliminaryFit.name(), DDAxesNames.name(), L1TLossFunction.name(), pos::PixelConfigAlias.name(), analyzer.Analyzer.name, DQMRivetClient::LumiOption.name, MagCylinder.name, CharmTagger::MVAVar.name, HcalForwardLibWriter::FileHandle.name, rpcrawtodigi::ReadoutError.name(), RPCLinkSynchroStat::LinkBoard.name(), PFTauMVAInputDiscriminantTranslator::DiscriminantInfo.name, HGCalTriggerGeometryBase.name(), PrintSensitive.name, JetResolution.name(), ALIFileOut.name(), PixelBarrelNameUpgrade.name(), DDI::rep_type< N, I >.name(), DCCTBDataField.name(), ParSet.name, MuonSubDetector.name(), HGCalTriggerFECodecBase.name(), citk::IsolationConeDefinitionBase.name(), CSCChannelMapperPostls1.name(), PixelEndcapNameUpgrade.name(), pat::helper::OverlapTest.name(), edm::FunctionWithDict.name(), runEdmFileComparison.EdmObject.name, DQMRivetClient::ScaleFactorOption.name, HLTPerformanceInfo::Module.name(), L1GctEtHad.name(), L1GctEtTotal.name(), rpcrawtodigi::DataRecord.name(), SingleObjectCondition.name, RHStopTracer::StopPoint.name, EgHLTOfflineSummaryClient::SumHistBinData.name, CSCChannelMapperStartup.name(), BeamSpotOnline.name(), PhysicsTools::Source.name, OmtfName.name(), pos::PixelDACScanRange.name(), core.autovars.NTupleObjectType.name, cond::persistency::GTProxyData.name, PixelEndcapName.name(), SummaryGenerator.name(), Mapper::definition< ScannerT >.name, MyWatcher.name, L1GctInternEmCand.name(), FWParameterBase.name(), HGCalTriggerBackendAlgorithmBase.name(), edm::eventsetup::ModuleMakerTraits.name(), edm::PathTimingSummary.name, OpticalAlignParam.name(), PixelBarrelName.name(), CSCIndexerStartup.name(), reco::CompositeCandidate.name(), dirstructure.Weighted.name, alignment.Alignment.name, BinomialInterval.name(), LumiScalers.name(), cond::TimeTypeSpecs.name, lumi::TriggerInfo.name, CSCChannelMapperBase.name(), L1TriggerScalers.name(), PrintMaterialBudgetInfo.name, DDName.name(), edm::PathSummary.name, ALIFileIn.name(), CSCIndexerPostls1.name(), TransformFunction.name(), L1GctJetCand.name(), cond::persistency::GLOBAL_TAG_MAP::GLOBAL_TAG_NAME.name, DQMGenericClient::EfficOption.name, PixelEndcapLinkMaker::Item.name, perftools::EdmEventSize::BranchRecord.name, FWTableViewManager::TableEntry.name, hcaldqm::quantity::Quantity.name(), cond::persistency::GLOBAL_TAG_MAP::RECORD.name, validateAlignments.ParallelMergeJob.name, PixelBarrelLinkMaker::Item.name, pos::PixelROCMaskBits.name(), reco::NamedCompositeCandidate.name(), Level1TriggerScalers.name(), FWPhysicsObjectDesc.name(), EcalLogicID.name, edm::EventTime.name(), cond::persistency::GLOBAL_TAG_MAP::LABEL.name, pos::PixelROCTrimBits.name(), L1GctEtMiss.name(), L1GctJetCounts.name(), MEtoEDM< T >::MEtoEDMObject.name, cond::persistency::GLOBAL_TAG_MAP::TAG_NAME.name, BPhysicsSpectrum.name, cond::persistency::GTEditor.name(), ExpressionHisto< T >.name, SensitiveDetector.name, python.rootplot.utilities.Hist2D.name, edm::eventsetup::heterocontainer::HCTypeTag.name(), XMLProcessor::_loaderBaseConfig.name, L1GctHtMiss.name(), edm::eventsetup::EventSetupRecordKey.name(), DCCTBBlockPrototype.name(), edm::TypeIDBase.name(), Entry.name(), TreeCrawler.Package.name, cond::persistency::PAYLOAD::HASH.name, L1GctEmCand.name(), L1TriggerRates.name(), genericValidation.GenericValidation.name, CaloTrkProcessing::Detector.name, cond::persistency::PAYLOAD::OBJECT_TYPE.name, fwlite::Record.name(), DDValue.name(), cond::persistency::PAYLOAD::DATA.name, PrintGeomInfoAction.name, FWViewEnergyScale.name(), cond::persistency::PAYLOAD::STREAMER_INFO.name, cond::persistency::PAYLOAD::VERSION.name, MagGeoBuilderFromDDD::volumeHandle.name, L1GtPatternLine.name(), edm::eventsetup::SourceMakerTraits.name(), cond::persistency::PAYLOAD::INSERTION_TIME.name, SimpleL1MuGMTCand.name(), Level1TriggerRates.name(), DisplayManager.DisplayManager.name, edm::TRandomAdaptor.name(), DQMGenericClient::ProfileOption.name, options.ConnectionHLTMenu.name, OpticalObject.name(), egHLT::MonElemContainer< T >.name(), emtf::Node.name, LeastSquares.name(), L1AcceptBunchCrossing.name(), DeepFlavourJetTagsProducer::MVAVar.name, DQMGenericClient::NormOption.name, edm::eventsetup::DataKey.name(), FastHFShowerLibrary.name, h4DSegm.name, core.TriggerMatchAnalyzer.TriggerMatchAnalyzer.name, L1MuDTTrack.name(), PhysicsTools::Variable::Value.name, PhysicsTools::Calibration::Variable.name, CSCIndexerBase.name(), FWGeometryTableManagerBase::NodeInfo.name(), DQMGenericClient::CDOption.name, L1MuGMTCand.name(), ModifyObjectValueBase.name(), DcsStatus.name(), CounterChecker.name, MillePedeVariables.name(), L1MuBMTrack.name(), EDMtoMEConverter.name, FWViewType.name(), cond::TagInfo_t.name, looper.Looper.name, reco::ElectronSeed.name(), HLTPerformanceInfo::Path.name(), ProcTMVA::Method.name, TreeSaver::Var.name, BPhysicsValidation::ParticleMonitor.name, edm::Path.name(), DDNameInterface.name(), Vispa.Gui.PortWidget.PortWidget.name(), DDBase< N, C >.name(), python.rootplot.tree2hists.Plot.name, cond::persistency::IOV::TAG_NAME.name, cond::persistency::IOV::SINCE.name, TrackerSectorStruct.name, classes.MonitorData.name, cond::persistency::IOV::PAYLOAD_HASH.name, PhysicsTools::TreeReader::Value.name, cond::persistency::IOV::INSERTION_TIME.name, HistogramManager.name, edm::eventsetup::LooperMakerTraits.name(), BPhysicsValidation.name, cond::persistency::GTProxy.name(), MuonGeometrySanityCheckPoint.name, PhysicsTools::TrainProcessor.name, edm::TriggerResults.name(), DetGeomDesc.name(), pat::TriggerCondition.name(), CutApplicatorBase.name(), Measurement.name(), edm::TypeWithDict.name(), BHMSD.name, FastTimerSD.name, L1GObject.name(), classes.OutputData.name, TotemSD.name, PhysicsTools::MVAModuleHelper< Record, Object, Filler >::Value.name, HistoData.name, PhysicsTools::ProcessRegistry< Base_t, CalibBase_t, Parent_t >.name, utils.StatisticalTest.name, pat::TriggerAlgorithm.name(), FWEventItem.name(), GeometricDetExtra.name(), PhysicsTools::MVATrainer.name, options.HLTProcessOptions.name, pat::TriggerPath.name(), h2DSegm.name, core.TriggerBitAnalyzer.TriggerBitAnalyzer.name, python.rootplot.utilities.Hist.name, AbsoluteDeviation.name(), VIDSelectorBase.VIDSelectorBase.name(), config.Analyzer.name, BscSD.name, geometry.Structure.name, IntegratedCalibrationBase.name(), core.autovars.NTupleSubObject.name, cuy.divideElement.name, DQMNet::WaitObject.name, AlpgenParameterName.name, Folder.name(), cscdqm::Address.name(), cuy.plotElement.name, SiStripMonitorDigi.name, core.autovars.NTupleObject.name, FP420SD.name, cuy.additionElement.name, VersionedSelector< T >.name(), GeometricDet.name(), config.Service.name, public_plots_tools.ColorScheme.name, cuy.superimposeElement.name, PhysicsTools::Variable.name, cond::persistency::TAG_LOG::TAG_NAME.name, BasicHepMCValidation::ParticleMonitor.name, cond::persistency::TAG_LOG::EVENT_TIME.name, cond::persistency::TAG_LOG::USER_NAME.name, cond::persistency::TAG_LOG::HOST_NAME.name, cond::persistency::TAG_LOG::COMMAND.name, cond::persistency::TAG_LOG::ACTION.name, PhysicsTools::TrainerMonitoring::Object.name, HRes1DHit.name, cond::persistency::TAG_LOG::USER_TEXT.name, core.autovars.NTupleCollection.name, cuy.graphElement.name, Huber.name(), BPHRecoBuilder::BPHRecoSource.name, BPHRecoBuilder::BPHCompSource.name, utils.KS.name, cuy.FindIssue.name, PercentErrorSquared.name(), utils.Chi2.name, personalPlayback.FrameworkJob.name, pos::PixelAliasList.name(), utils_v2.StatisticalTest.name, utils.BinToBin.name, hcaldqm::quantity::FlagQuantity.name(), HEff1DHit.name, plotscripts.SawTeethFunction.name, utils_v2.KolmogorovTest.name, dirstructure.Comparison.name, utils_v2.Chi2Test.name, hcaldqm::quantity::LumiSection.name(), dqm_interfaces.DirID.name, utils.BinToBin1percent.name, hcaldqm::quantity::RunNumber.name(), python.rootplot.utilities.RootFile.name, Vispa.Views.PropertyView.Property.name(), hcaldqm::quantity::EventNumber.name(), hTMaxCell.name, HRes2DHit.name, cscdqm::ParHistoDef.name, hcaldqm::quantity::EventType.name(), dqm_interfaces.DirWalkerFile.name, BeautifulSoup.Tag.name, Id.name, genericValidation.ValidationWithPlotsSummaryBase.SummaryItem.name(), HEff2DHit.name, SummaryOutputProducer::GenericSummary.name, BeautifulSoup.SoupStrainer.name, dataset.Dataset.name(), HRes4DHit.name, HEff4DHit.name, and VIDSelectorBase.process_pset().

84  def initialize(self,pythonpset):
85  if( self.__initialized ):
86  print 'VID Selector is already initialized, doing nothing!'
87  return
88  del process.__instance
89  if hasattr(pythonpset,'isPOGApproved'):
90  approved = pythonpset.isPOGApproved.value()
91  if not approved:
92  sys.stderr.write('This ID is not POG approved and likely under development!!!!\n')
93  sys.stderr.write('Please make sure to report your progress with this ID'\
94  ' at the next relevant POG meeting.\n')
95  del pythonpset.isPOGApproved
96  else:
97  sys.stderr.write('This ID is not POG approved and likely under development!!!!\n')
98  sys.stderr.write('Please make sure to report your progress with this ID'\
99  ' at the next relevant POG meeting.\n')
100  self.__instance = process_pset( self.__selectorBuilder, pythonpset, self.__suffix )
101  expectedmd5 = central_id_registry.getMD5FromName(pythonpset.idName)
102  if expectedmd5 != self.md5String():
103  sys.stderr.write("ID: %s\n"%self.name())
104  sys.stderr.write("The expected md5: %s does not match the md5\n"%expectedmd5)
105  sys.stderr.write("calculated by the ID: %s please\n"%self.md5String())
106  sys.stderr.write("update your python configuration or determine the source\n")
107  sys.stderr.write("of transcription error!\n")
108  self.__initialized = True
109 
def process_pset(builder, pythonpset, suffix)
def initialize(self, pythonpset)
if(dp >Float(M_PI)) dp-
def VIDSelectorBase.VIDSelectorBase.md55Raw (   self)

Definition at line 128 of file VIDSelectorBase.py.

128  def md55Raw(self):
129  return self.__instance.md55Raw()
130 
def VIDSelectorBase.VIDSelectorBase.md5String (   self)

Definition at line 125 of file VIDSelectorBase.py.

Referenced by VIDSelectorBase.VIDSelectorBase.initialize().

125  def md5String(self):
126  return self.__instance.md5String()
127 
def VIDSelectorBase.VIDSelectorBase.name (   self)

Definition at line 119 of file VIDSelectorBase.py.

Referenced by config.CFG.__str__(), validation.Sample.digest(), and VIDSelectorBase.VIDSelectorBase.initialize().

119  def name(self):
120  return self.__instance.name()
121 

Member Data Documentation

VIDSelectorBase.VIDSelectorBase.__initialized
private

Definition at line 37 of file VIDSelectorBase.py.

Referenced by VIDSelectorBase.VIDSelectorBase.initialize().

VIDSelectorBase.VIDSelectorBase.__instance
private
VIDSelectorBase.VIDSelectorBase.__printer
private

Definition at line 39 of file VIDSelectorBase.py.

Referenced by VIDSelectorBase.VIDSelectorBase.__repr__().

VIDSelectorBase.VIDSelectorBase.__ptrMaker
private

Definition at line 40 of file VIDSelectorBase.py.

Referenced by VIDSelectorBase.VIDSelectorBase.__call__().

VIDSelectorBase.VIDSelectorBase.__selectorBuilder
private

Definition at line 41 of file VIDSelectorBase.py.

Referenced by VIDSelectorBase.VIDSelectorBase.initialize().

VIDSelectorBase.VIDSelectorBase.__suffix
private

Definition at line 38 of file VIDSelectorBase.py.

Referenced by VIDSelectorBase.VIDSelectorBase.initialize().