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(), candidate_functions::CandidateCut.name(), cond::persistency::TAG::TIME_TYPE.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, cond::persistency::GTEditorData.name, edm::ModuleTime.name(), nanoaod::MergeableCounterTable::SingleColumn< T >.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(), SummaryTableOutputBranches::NamedBranchPtr.name, edm::BaseWithDict.name(), personalPlayback.Applet.name, HistoDef.name(), production_tasks.Task.name, edm::MemberWithDict.name(), fit::RootMinuitCommand.name, ExpressionEvaluatorCutWithEventContent.name(), EventSelector.name(), ParameterSet.name, FileData.name(), PacketData.name(), PixelDCSObject< T >::Item.name, analyzer.Analyzer.name, DDAxesNames.name(), pos::PixelConfigAlias.name(), DQMRivetClient::LumiOption.name, MagCylinder.name, rpcrawtodigi::ReadoutError.name(), CharmTagger::MVAVar.name, emtf::LossFunction.name(), HcalForwardLibWriter::FileHandle.name, RPCLinkSynchroStat::LinkBoard.name(), TriggerOutputBranches::NamedBranchPtr.name, PFTauMVAInputDiscriminantTranslator::DiscriminantInfo.name, HGCalTriggerGeometryBase.name(), PrintSensitive.name, JetResolution.name(), ALIFileOut.name(), PixelBarrelNameUpgrade.name(), DDI::rep_type< N, I >.name(), DCCTBDataField.name(), ParSet.name, TableOutputBranches::NamedBranchPtr.name, MuonSubDetector.name(), HGCalTriggerFECodecBase.name(), citk::IsolationConeDefinitionBase.name(), CSCChannelMapperPostls1.name(), rpcrawtodigi::DataRecord.name(), PixelEndcapNameUpgrade.name(), pat::helper::OverlapTest.name(), edm::FunctionWithDict.name(), runEdmFileComparison.EdmObject.name, DQMRivetClient::ScaleFactorOption.name, HLTPerformanceInfo::Module.name(), L1GctEtHad.name(), L1GctEtTotal.name(), BeamSpotOnline.name(), RHStopTracer::StopPoint.name, EgHLTOfflineSummaryClient::SumHistBinData.name, CSCChannelMapperStartup.name(), SingleObjectCondition.name, cond::persistency::GTProxyData.name, PhysicsTools::Source.name, OmtfName.name(), pos::PixelDACScanRange.name(), core.autovars.NTupleObjectType.name, PixelEndcapName.name(), SummaryGenerator.name(), Mapper::definition< ScannerT >.name, MyWatcher.name, L1GctInternEmCand.name(), FWParameterBase.name(), edm::eventsetup::ModuleMakerTraits.name(), HGCalTriggerBackendAlgorithmBase.name(), edm::PathTimingSummary.name, OpticalAlignParam.name(), nanoaod::FlatTable.name(), PixelBarrelName.name(), CSCIndexerStartup.name(), reco::CompositeCandidate.name(), alignment.Alignment.name, nanoaod::MergeableCounterTable::VectorColumn< T >.name, dirstructure.Weighted.name, BinomialInterval.name(), LumiScalers.name(), cond::TimeTypeSpecs.name, lumi::TriggerInfo.name, CSCChannelMapperBase.name(), L1TriggerScalers.name(), DDName.name(), PrintMaterialBudgetInfo.name, edm::PathSummary.name, ALIFileIn.name(), CSCIndexerPostls1.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(), FWPhysicsObjectDesc.name(), Level1TriggerScalers.name(), EcalLogicID.name, edm::EventTime.name(), GlobalVariablesTableProducer::Variable.name(), cond::persistency::GLOBAL_TAG_MAP::LABEL.name, pos::PixelROCTrimBits.name(), L1GctEtMiss.name(), L1GctJetCounts.name(), cond::persistency::GLOBAL_TAG_MAP::TAG_NAME.name, MEtoEDM< T >::MEtoEDMObject.name, BPhysicsSpectrum.name, cond::persistency::GTEditor.name(), ExpressionHisto< T >.name, python.rootplot.utilities.Hist2D.name, XMLProcessor::_loaderBaseConfig.name, edm::eventsetup::heterocontainer::HCTypeTag.name(), L1GctHtMiss.name(), DCCTBBlockPrototype.name(), edm::eventsetup::EventSetupRecordKey.name(), edm::TypeIDBase.name(), Entry.name(), cond::persistency::PAYLOAD::HASH.name, TreeCrawler.Package.name, L1GctEmCand.name(), CaloTrkProcessing::Detector.name, genericValidation.GenericValidation.name, L1TriggerRates.name(), cond::persistency::PAYLOAD::OBJECT_TYPE.name, fwlite::Record.name(), DDValue.name(), cond::persistency::PAYLOAD::DATA.name, NanoAODDQM::Plot.name(), FWViewEnergyScale.name(), cond::persistency::PAYLOAD::STREAMER_INFO.name, PrintGeomInfoAction.name, MagGeoBuilderFromDDD::volumeHandle.name, cond::persistency::PAYLOAD::VERSION.name, options.ConnectionHLTMenu.name, edm::eventsetup::SourceMakerTraits.name(), L1GtPatternLine.name(), cond::persistency::PAYLOAD::INSERTION_TIME.name, SimpleL1MuGMTCand.name(), Level1TriggerRates.name(), DisplayManager.DisplayManager.name, edm::TRandomAdaptor.name(), DQMGenericClient::ProfileOption.name, OpticalObject.name(), egHLT::MonElemContainer< T >.name(), L1AcceptBunchCrossing.name(), DeepFlavourJetTagsProducer::MVAVar.name, DQMGenericClient::NormOption.name, emtf::LeastSquares.name(), edm::eventsetup::DataKey.name(), BTagProbabilityToDiscriminator::Discriminator.name, emtf::Node.name, core.TriggerMatchAnalyzer.TriggerMatchAnalyzer.name, SimpleFlatTableProducerBase< T, TProd >::VariableBase.name(), h4DSegm.name, PhysicsTools::Variable::Value.name, FastHFShowerLibrary.name, L1MuDTTrack.name(), PhysicsTools::Calibration::Variable.name, CSCIndexerBase.name(), L1MuGMTCand.name(), FWGeometryTableManagerBase::NodeInfo.name(), DQMGenericClient::CDOption.name, DcsStatus.name(), ModifyObjectValueBase.name(), TriggerObjectTableProducer::SelectedObject.name, CounterChecker.name, MillePedeVariables.name(), L1MuBMTrack.name(), edm::Path.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, python.rootplot.tree2hists.Plot.name, Vispa.Gui.PortWidget.PortWidget.name(), DDBase< N, C >.name(), DDNameInterface.name(), cond::persistency::IOV::TAG_NAME.name, cond::persistency::IOV::SINCE.name, TrackerSectorStruct.name, cond::persistency::IOV::PAYLOAD_HASH.name, classes.MonitorData.name, PhysicsTools::TreeReader::Value.name, cond::persistency::IOV::INSERTION_TIME.name, HistogramManager.name, BPhysicsValidation.name, edm::eventsetup::LooperMakerTraits.name(), cond::persistency::GTProxy.name(), PhysicsTools::TrainProcessor.name, edm::TriggerResults.name(), MuonGeometrySanityCheckPoint.name, DetGeomDesc.name(), pat::TriggerCondition.name(), FastTimerSD.name, CutApplicatorBase.name(), Measurement.name(), L1GObject.name(), edm::TypeWithDict.name(), classes.OutputData.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, VIDSelectorBase.VIDSelectorBase.name(), config.Analyzer.name, nanoaod::FlatTable::Column.name, emtf::AbsoluteDeviation.name(), geometry.Structure.name, IntegratedCalibrationBase.name(), core.autovars.NTupleSubObject.name, cuy.divideElement.name, DQMNet::WaitObject.name, AlpgenParameterName.name, cscdqm::Address.name(), Folder.name(), cuy.plotElement.name, NanoAODDQM::SelGroupConfig.name, SiStripMonitorDigi.name, core.autovars.NTupleObject.name, cuy.additionElement.name, VersionedSelector< T >.name(), GeometricDet.name(), config.Service.name, public_plots_tools.ColorScheme.name, cuy.superimposeElement.name, PhysicsTools::Variable.name, BasicHepMCValidation::ParticleMonitor.name, cond::persistency::TAG_LOG::TAG_NAME.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, cond::persistency::TAG_LOG::USER_TEXT.name, PhysicsTools::TrainerMonitoring::Object.name, HRes1DHit.name, core.autovars.NTupleCollection.name, cuy.graphElement.name, emtf::Huber.name(), BPHRecoBuilder::BPHRecoSource.name, BPHRecoBuilder::BPHCompSource.name, utils.KS.name, cuy.FindIssue.name, emtf::PercentErrorSquared.name(), utils.Chi2.name, personalPlayback.FrameworkJob.name, pos::PixelAliasList.name(), utils_v2.StatisticalTest.name, utils.BinToBin.name, HEff1DHit.name, hcaldqm::quantity::FlagQuantity.name(), plotscripts.SawTeethFunction.name, utils_v2.KolmogorovTest.name, dirstructure.Comparison.name, utils_v2.Chi2Test.name, dqm_interfaces.DirID.name, hcaldqm::quantity::LumiSection.name(), utils.BinToBin1percent.name, hcaldqm::quantity::RunNumber.name(), python.rootplot.utilities.RootFile.name, crabFunctions.CrabTask.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().