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, 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 isinstance(args[1], int) ):
73  temp = self.__ptrMaker(args[0],args[1])
74  newargs = [temp]
75  return self.__instance(*newargs)
76  if( len(args) == 3 and isinstance(args[1], 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
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, 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, DDSolidShapesName.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, cond::persistency::TAG::INSERTION_TIME.name, preexistingValidation.PreexistingValidation.name, nanoaod::MergeableCounterTable::SingleColumn< T >.name, cond::persistency::TAG::MODIFICATION_TIME.name, Types._Untracked.name, dataset.BaseDataset.name, ClopperPearsonBinomialInterval.name(), OutputMEPSet.name, PixelModuleName.name(), EventStringOutputBranches::NamedBranchPtr.name, SummaryTableOutputBranches::NamedBranchPtr.name, edm::BaseWithDict.name(), personalPlayback.Applet.name, HistoDef.name(), edm::MemberWithDict.name(), fit::RootMinuitCommand.name, ExpressionEvaluatorCutWithEventContent.name(), EventSelector.name(), ParameterSet.name, production_tasks.Task.name, FileData.name(), PacketData.name(), PixelDCSObject< T >::Item.name, analyzer.Analyzer.name, DDAxesNames.name(), pos::PixelConfigAlias.name(), DQMRivetClient::LumiOption.name, MagCylinder.name, HcalForwardLibWriter::FileHandle.name, CharmTagger::MVAVar.name, rpcrawtodigi::ReadoutError.name(), RPCLinkSynchroStat::LinkBoard.name(), HGCalTriggerGeometryBase.name(), emtf::LossFunction.name(), PFTauMVAInputDiscriminantTranslator::DiscriminantInfo.name, PrintSensitive.name, JetResolution.name(), TriggerOutputBranches::NamedBranchPtr.name, ALIFileOut.name(), PixelBarrelNameUpgrade.name(), DDI::rep_type< N, I >.name(), DCCTBDataField.name(), ParSet.name, MuonSubDetector.name(), TableOutputBranches::NamedBranchPtr.name, HGCalTriggerFECodecBase.name(), citk::IsolationConeDefinitionBase.name(), CSCChannelMapperPostls1.name(), PixelEndcapNameUpgrade.name(), edm::FunctionWithDict.name(), pat::helper::OverlapTest.name(), DQMRivetClient::ScaleFactorOption.name, HLTPerformanceInfo::Module.name(), L1GctEtHad.name(), L1GctEtTotal.name(), rpcrawtodigi::DataRecord.name(), EgHLTOfflineSummaryClient::SumHistBinData.name, runEdmFileComparison.EdmObject.name, CSCChannelMapperStartup.name(), RHStopTracer::StopPoint.name, BeamSpotOnline.name(), PhysicsTools::Source.name, OmtfName.name(), SingleObjectCondition.name, pos::PixelDACScanRange.name(), cond::persistency::GTProxyData.name, core.autovars.NTupleObjectType.name, PixelEndcapName.name(), SummaryGenerator.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(), cms::DDAlgoArguments.name, BinomialInterval.name(), dirstructure.Weighted.name, LumiScalers.name(), alignment.Alignment.name, cond::TimeTypeSpecs.name, lumi::TriggerInfo.name, CSCChannelMapperBase.name(), L1TriggerScalers.name(), DDName.name(), PrintMaterialBudgetInfo.name, ALIFileIn.name(), edm::PathSummary.name, CSCIndexerPostls1.name(), L1GctJetCand.name(), cond::persistency::GLOBAL_TAG_MAP::GLOBAL_TAG_NAME.name, PixelEndcapLinkMaker::Item.name, perftools::EdmEventSize::BranchRecord.name, DQMGenericClient::EfficOption.name, FWTableViewManager::TableEntry.name, hcaldqm::quantity::Quantity.name(), cond::persistency::GLOBAL_TAG_MAP::RECORD.name, PixelBarrelLinkMaker::Item.name, pos::PixelROCMaskBits.name(), reco::NamedCompositeCandidate.name(), Level1TriggerScalers.name(), FWPhysicsObjectDesc.name(), validateAlignments.ParallelMergeJob.name, edm::EventTime.name(), EcalLogicID.name, cond::persistency::GLOBAL_TAG_MAP::LABEL.name, L1GctJetCounts.name(), pos::PixelROCTrimBits.name(), L1GctEtMiss.name(), MEtoEDM< T >::MEtoEDMObject.name, cond::persistency::GLOBAL_TAG_MAP::TAG_NAME.name, GlobalVariablesTableProducer::Variable.name(), BPhysicsSpectrum.name, cond::persistency::GTEditor.name(), ExpressionHisto< T >.name, edm::eventsetup::heterocontainer::HCTypeTag.name(), python.rootplot.utilities.Hist2D.name, XMLProcessor::_loaderBaseConfig.name, L1GctHtMiss.name(), DCCTBBlockPrototype.name(), edm::eventsetup::EventSetupRecordKey.name(), edm::TypeIDBase.name(), Entry.name(), cond::persistency::PAYLOAD::HASH.name, L1GctEmCand.name(), L1TriggerRates.name(), genericValidation.GenericValidation.name, TreeCrawler.Package.name, cond::persistency::PAYLOAD::OBJECT_TYPE.name, fwlite::Record.name(), DDValue.name(), CaloTrkProcessing::Detector.name, cond::persistency::PAYLOAD::DATA.name, NanoAODDQM::Plot.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, options.ConnectionHLTMenu.name, SimpleL1MuGMTCand.name(), Level1TriggerRates.name(), edm::TRandomAdaptor.name(), DisplayManager.DisplayManager.name, MVAVar.name, DQMGenericClient::ProfileOption.name, OpticalObject.name(), egHLT::MonElemContainer< T >.name(), L1AcceptBunchCrossing.name(), dqmoffline::l1t::HistDefinition.name, nanoaod::MergeableCounterTable::VectorColumn< T >.name, cms::DDNamespace.name(), edm::eventsetup::DataKey.name(), emtf::LeastSquares.name(), DQMGenericClient::NormOption.name, BTagProbabilityToDiscriminator::Discriminator.name, emtf::Node.name, h4DSegm.name, SimpleFlatTableProducerBase< T, TProd >::VariableBase.name(), core.TriggerMatchAnalyzer.TriggerMatchAnalyzer.name, PhysicsTools::Variable::Value.name, L1MuDTTrack.name(), PhysicsTools::Calibration::Variable.name, CSCIndexerBase.name(), FastHFShowerLibrary.name, L1MuGMTCand.name(), FWGeometryTableManagerBase::NodeInfo.name(), DcsStatus.name(), DQMGenericClient::CDOption.name, ModifyObjectValueBase.name(), TriggerObjectTableProducer::SelectedObject.name, CounterChecker.name, MillePedeVariables.name(), L1MuBMTrack.name(), cond::TagInfo_t.name, FWViewType.name(), HLTPerformanceInfo::Path.name(), reco::ElectronSeed.name(), edm::Path.name(), looper.Looper.name, ProcTMVA::Method.name, TreeSaver::Var.name, DQMGenericClient::NoFlowOption.name, BPhysicsValidation::ParticleMonitor.name, DDBase< N, C >.name(), python.rootplot.tree2hists.Plot.name, DDNameInterface.name(), Vispa.Gui.PortWidget.PortWidget.name(), cond::persistency::IOV::TAG_NAME.name, TrackerSectorStruct.name, EDMtoMEConverter.name, cond::persistency::IOV::SINCE.name, cond::persistency::IOV::PAYLOAD_HASH.name, Mapper::definition< ScannerT >.name, classes.MonitorData.name, cond::persistency::IOV::INSERTION_TIME.name, PhysicsTools::TreeReader::Value.name, edm::eventsetup::LooperMakerTraits.name(), cond::persistency::GTProxy.name(), HistogramManager.name, BPhysicsValidation.name, edm::TriggerResults.name(), PhysicsTools::TrainProcessor.name, MuonGeometrySanityCheckPoint.name, DetGeomDesc.name(), pat::TriggerCondition.name(), CutApplicatorBase.name(), Measurement.name(), L1GObject.name(), classes.OutputData.name, edm::TypeWithDict.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, python.rootplot.utilities.Hist.name, core.TriggerBitAnalyzer.TriggerBitAnalyzer.name, VIDSelectorBase.VIDSelectorBase.name(), nanoaod::FlatTable::Column.name, config.Analyzer.name, geometry.Structure.name, emtf::AbsoluteDeviation.name(), core.autovars.NTupleSubObject.name, IntegratedCalibrationBase.name(), DQMNet::WaitObject.name, cuy.divideElement.name, AlpgenParameterName.name, cscdqm::Address.name(), Folder.name(), SiStripMonitorDigi.name, cuy.plotElement.name, NanoAODDQM::SelGroupConfig.name, core.autovars.NTupleObject.name, cuy.additionElement.name, VersionedSelector< T >.name(), GeometricDet.name(), public_plots_tools.ColorScheme.name, config.Service.name, PhysicsTools::Variable.name, cuy.superimposeElement.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, 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, plotscripts.SawTeethFunction.name, utils_v2.KolmogorovTest.name, dirstructure.Comparison.name, utils_v2.Chi2Test.name, dqm_interfaces.DirID.name, utils.BinToBin1percent.name, hcaldqm::quantity::FlagQuantity.name(), python.rootplot.utilities.RootFile.name, crabFunctions.CrabTask.name, hcaldqm::quantity::LumiSection.name(), Vispa.Views.PropertyView.Property.name(), hcaldqm::quantity::LumiSectionCoarse.name(), hTMaxCell.name, cscdqm::ParHistoDef.name, hcaldqm::quantity::RunNumber.name(), hcaldqm::quantity::EventNumber.name(), dqm_interfaces.DirWalkerFile.name, hcaldqm::quantity::EventType.name(), BeautifulSoup.Tag.name, Id.name, genericValidation.ValidationWithPlotsSummaryBase.SummaryItem.name(), SummaryOutputProducer::GenericSummary.name, BeautifulSoup.SoupStrainer.name, dataset.Dataset.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)
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().