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 36 of file VIDSelectorBase.py.

Constructor & Destructor Documentation

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

Definition at line 37 of file VIDSelectorBase.py.

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

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

68  def __call__(self,*args):
69  if( len(args) == 1 ):
70  return self.__instance(*args)
71  if( len(args) == 2 and isinstance(args[1],DataFormats.FWLite.Events) ):
72  return self.__instance(args[0],args[1].object().event())
73  elif( len(args) == 2 and isinstance(args[1], int) ):
74  temp = self.__ptrMaker(args[0],args[1])
75  newargs = [temp]
76  return self.__instance(*newargs)
77  if( len(args) == 3 and isinstance(args[1], int) and isinstance(args[2], DataFormats.FWLite.Events) ):
78  temp = self.__ptrMaker(args[0],args[1])
79  newargs = [temp]
80  newargs += [args[2].object().event()]
81  return self.__instance(*newargs)
82  raise ValueError('VIDSelectorBase __call__ with args: "%s" is not a valid call pattern'%(','.join([repr(arg) for arg in args])))
83 
84 
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 123 of file VIDSelectorBase.py.

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

Definition at line 114 of file VIDSelectorBase.py.

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

Definition at line 111 of file VIDSelectorBase.py.

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

Definition at line 117 of file VIDSelectorBase.py.

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

Definition at line 85 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(), average.Average.name, counter.Counter.name, histograms.Histograms.name, AlignableObjectId::entry.name, RPCGeomServ.name(), FWLite.ElectronMVAID.name, SymmetryFit.name(), cond::persistency::GLOBAL_TAG::NAME.name, cond::persistency::RUN_INFO::RUN_NUMBER.name, cond::persistency::TAG::NAME.name, TmModule.name, cond::persistency::GLOBAL_TAG::VALIDITY.name, cond::persistency::RUN_INFO::START_TIME.name, CmsMTDStringToEnum.name(), CmsTrackerStringToEnum.name(), cond::persistency::TAG::TIME_TYPE.name, listHistos.plotInfo.name, core.autovars.NTupleVariable.name, cond::persistency::GLOBAL_TAG::DESCRIPTION.name, cond::persistency::RUN_INFO::END_TIME.name, HGCalProcessorBaseT< InputCollection, OutputCollection >.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, candidate_functions::CandidateCut.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, cond::persistency::TAG::INSERTION_TIME.name, DDSolidShapesName.name(), nanoaod::MergeableCounterTable::SingleColumn< T >.name, cond::persistency::TAG::MODIFICATION_TIME.name, FWTGeoRecoGeometry::Info.name, preexistingValidation.PreexistingValidation.name, ClopperPearsonBinomialInterval.name(), PixelModuleName.name(), OutputMEPSet.name, EventStringOutputBranches::NamedBranchPtr.name, SummaryTableOutputBranches::NamedBranchPtr.name, edm::BaseWithDict.name(), HistoDef.name(), dataset.BaseDataset.name, edm::MemberWithDict.name(), fit::RootMinuitCommand.name, PrintSensitive.name, ExpressionEvaluatorCutWithEventContent.name(), personalPlayback.Applet.name, Types._Untracked.name, EventSelector.name(), ParameterSet.name, FileData.name(), PacketData.name(), PixelDCSObject< T >::Item.name, DDAxesNames.name(), HGCalTriggerGeometryBase.name(), PFTauMVAInputDiscriminantTranslator::DiscriminantInfo.name, pos::PixelConfigAlias.name(), analyzer.Analyzer.name, DQMRivetClient::LumiOption.name, MagCylinder.name, rpcrawtodigi::ReadoutError.name(), PixelBarrelNameUpgrade.name(), HcalForwardLibWriter::FileHandle.name, production_tasks.Task.name, CharmTagger::MVAVar.name, emtf::LossFunction.name(), RPCLinkSynchroStat::LinkBoard.name(), JetResolution.name(), PixelEndcapNameUpgrade.name(), TriggerOutputBranches::NamedBranchPtr.name, ALIFileOut.name(), hcaldqm::quantity::Quantity.name(), DCCTBDataField.name(), HGCalTriggerFECodecBase.name(), ParSet.name, DDName.name(), TableOutputBranches::NamedBranchPtr.name, MuonSubDetector.name(), citk::IsolationConeDefinitionBase.name(), rpcrawtodigi::DataRecord.name(), edm::FunctionWithDict.name(), pat::helper::OverlapTest.name(), edm::PathTimingSummary.name, DQMRivetClient::ScaleFactorOption.name, HLTPerformanceInfo::Module.name(), L1GctEtHad.name(), L1GctEtTotal.name(), BeamSpotOnline.name(), RHStopTracer::StopPoint.name, EgHLTOfflineSummaryClient::SumHistBinData.name, CSCChannelMapperPostls1.name(), PixelBarrelName.name(), PhysicsTools::Source.name, HGCalTriggerBackendAlgorithmBase.name(), OmtfName.name(), SingleObjectCondition.name, runEdmFileComparison.EdmObject.name, pos::PixelDACScanRange.name(), cond::persistency::GTProxyData.name, SummaryGenerator.name(), MyWatcher.name, CSCChannelMapperStartup.name(), L1GctInternEmCand.name(), core.autovars.NTupleObjectType.name, PixelEndcapName.name(), FWParameterBase.name(), edm::eventsetup::ModuleMakerTraits.name(), edm::PathSummary.name, OpticalAlignParam.name(), nanoaod::FlatTable.name(), DDI::rep_type< N, I >.name(), reco::CompositeCandidate.name(), BinomialInterval.name(), CSCIndexerStartup.name(), LumiScalers.name(), cond::TimeTypeSpecs.name, lumi::TriggerInfo.name, L1TriggerScalers.name(), alignment.Alignment.name, edm::TypeIDBase.name(), ALIFileIn.name(), L1GctJetCand.name(), cond::persistency::GLOBAL_TAG_MAP::GLOBAL_TAG_NAME.name, dirstructure.Weighted.name, PixelEndcapLinkMaker::Item.name, perftools::EdmEventSize::BranchRecord.name, edm::eventsetup::EventSetupRecordKey.name(), edm::eventsetup::heterocontainer::HCTypeTag.name(), DQMGenericClient::EfficOption.name, FWTableViewManager::TableEntry.name, CSCIndexerPostls1.name(), cond::persistency::GLOBAL_TAG_MAP::RECORD.name, PixelBarrelLinkMaker::Item.name, pos::PixelROCMaskBits.name(), CSCChannelMapperBase.name(), reco::NamedCompositeCandidate.name(), FWPhysicsObjectDesc.name(), Level1TriggerScalers.name(), edm::EventTime.name(), EcalLogicID.name, cond::persistency::GLOBAL_TAG_MAP::LABEL.name, pos::PixelROCTrimBits.name(), L1GctEtMiss.name(), L1GctJetCounts.name(), CaloTrkProcessing::Detector.name, MEtoEDM< T >::MEtoEDMObject.name, cms::DDAlgoArguments.name, cond::persistency::GLOBAL_TAG_MAP::TAG_NAME.name, PrintMaterialBudgetInfo.name, BPhysicsSpectrum.name, cond::persistency::GTEditor.name(), ExpressionHisto< T >.name, XMLProcessor::_loaderBaseConfig.name, GlobalVariablesTableProducer::Variable.name(), L1GctHtMiss.name(), DCCTBBlockPrototype.name(), Entry.name(), cond::persistency::PAYLOAD::HASH.name, L1GctEmCand.name(), L1TriggerRates.name(), edm::eventsetup::DataKey.name(), python.rootplot.utilities.Hist2D.name, cond::persistency::PAYLOAD::OBJECT_TYPE.name, fwlite::Record.name(), DDValue.name(), cond::persistency::PAYLOAD::DATA.name, PrintGeomInfoAction.name, FWViewEnergyScale.name(), edm::eventsetup::SourceMakerTraits.name(), NanoAODDQM::Plot.name(), TreeCrawler.Package.name, cond::persistency::PAYLOAD::STREAMER_INFO.name, genericValidation.GenericValidation.name, cond::persistency::PAYLOAD::VERSION.name, options.ConnectionHLTMenu.name, MagGeoBuilderFromDDD::volumeHandle.name, L1GtPatternLine.name(), cond::persistency::PAYLOAD::INSERTION_TIME.name, SimpleL1MuGMTCand.name(), Level1TriggerRates.name(), edm::TRandomAdaptor.name(), MVAVar.name, DisplayManager.DisplayManager.name, DQMGenericClient::ProfileOption.name, OpticalObject.name(), edm::ESGetToken< ESProduct, ESRecord >.name(), egHLT::MonElemContainer< T >.name(), L1AcceptBunchCrossing.name(), dqmoffline::l1t::HistDefinition.name, nanoaod::MergeableCounterTable::VectorColumn< T >.name, cms::DDNamespace.name(), emtf::LeastSquares.name(), DQMGenericClient::NormOption.name, FWLite.WorkingPoints.name, BTagProbabilityToDiscriminator::Discriminator.name, DetGeomDesc.name(), emtf::Node.name, L1MuDTTrack.name(), h4DSegm.name, FastHFShowerLibrary.name, PhysicsTools::Calibration::Variable.name, PhysicsTools::Variable::Value.name, core.TriggerMatchAnalyzer.TriggerMatchAnalyzer.name, SimpleFlatTableProducerBase< T, TProd >::VariableBase.name(), ModifyObjectValueBase.name(), FWGeometryTableManagerBase::NodeInfo.name(), L1MuGMTCand.name(), DcsStatus.name(), DQMGenericClient::CDOption.name, L1MuBMTrack.name(), TriggerObjectTableProducer::SelectedObject.name, CounterChecker.name, MillePedeVariables.name(), FWViewType.name(), reco::ElectronSeed.name(), DDBase< N, C >.name(), HLTPerformanceInfo::Path.name(), TrackerSectorStruct.name, cond::TagInfo_t.name, ProcTMVA::Method.name, TreeSaver::Var.name, GeometricTimingDetExtra.name(), DQMGenericClient::NoFlowOption.name, BPhysicsValidation::ParticleMonitor.name, looper.Looper.name, Vispa.Gui.PortWidget.PortWidget.name(), python.rootplot.tree2hists.Plot.name, edm::Path.name(), cond::persistency::IOV::TAG_NAME.name, EDMtoMEConverter.name, CSCIndexerBase.name(), cond::persistency::IOV::SINCE.name, cond::persistency::IOV::PAYLOAD_HASH.name, Mapper::definition< ScannerT >.name, edm::eventsetup::LooperMakerTraits.name(), cond::persistency::IOV::INSERTION_TIME.name, PhysicsTools::TreeReader::Value.name, classes.MonitorData.name, cond::persistency::GTProxy.name(), BPhysicsValidation.name, HistogramManager.name, PhysicsTools::TrainProcessor.name, MuonGeometrySanityCheckPoint.name, edm::TriggerResults.name(), pat::TriggerCondition.name(), CutApplicatorBase.name(), Measurement.name(), L1GObject.name(), classes.OutputData.name, PhysicsTools::MVAModuleHelper< Record, Object, Filler >::Value.name, edm::TypeWithDict.name(), PhysicsTools::ProcessRegistry< Base_t, CalibBase_t, Parent_t >.name, pat::TriggerAlgorithm.name(), FWEventItem.name(), HistoData.name, GeometricDetExtra.name(), options.HLTProcessOptions.name, PhysicsTools::MVATrainer.name, utils.StatisticalTest.name, pat::TriggerPath.name(), h2DSegm.name, core.TriggerBitAnalyzer.TriggerBitAnalyzer.name, VIDSelectorBase.VIDSelectorBase.name(), nanoaod::FlatTable::Column.name, python.rootplot.utilities.Hist.name, config.Analyzer.name, geometry.Structure.name, GeometricTimingDet.name(), emtf::AbsoluteDeviation.name(), IntegratedCalibrationBase.name(), core.autovars.NTupleSubObject.name, DQMNet::WaitObject.name, cuy.divideElement.name, AlpgenParameterName.name, cscdqm::Address.name(), Folder.name(), SiStripMonitorDigi.name, NanoAODDQM::SelGroupConfig.name, cuy.plotElement.name, core.autovars.NTupleObject.name, cuy.additionElement.name, VersionedSelector< T >.name(), GeometricDet.name(), public_plots_tools.ColorScheme.name, PhysicsTools::Variable.name, config.Service.name, cond::persistency::TAG_LOG::TAG_NAME.name, BasicHepMCValidation::ParticleMonitor.name, cuy.superimposeElement.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, cond::persistency::TAG_LOG::USER_TEXT.name, core.autovars.NTupleCollection.name, cuy.graphElement.name, emtf::Huber.name(), BPHRecoBuilder::BPHRecoSource.name, BPHRecoBuilder::BPHCompSource.name, utils.KS.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, hcaldqm::quantity::FlagQuantity.name(), utils.BinToBin1percent.name, python.rootplot.utilities.RootFile.name, crabFunctions.CrabTask.name, hcaldqm::quantity::LumiSection.name(), hcaldqm::quantity::LumiSectionCoarse.name(), Vispa.Views.PropertyView.Property.name(), hTMaxCell.name, hcaldqm::quantity::RunNumber.name(), cscdqm::ParHistoDef.name, hcaldqm::quantity::EventNumber.name(), hcaldqm::quantity::EventType.name(), BeautifulSoup.Tag.name, dqm_interfaces.DirWalkerFile.name, Id.name, genericValidation.ValidationWithPlotsSummaryBase.SummaryItem.name(), SummaryOutputProducer::GenericSummary.name, BeautifulSoup.SoupStrainer.name, dataset.Dataset.name(), edm.print(), and VIDSelectorBase.process_pset().

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

Definition at line 129 of file VIDSelectorBase.py.

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

Definition at line 126 of file VIDSelectorBase.py.

Referenced by VIDSelectorBase.VIDSelectorBase.initialize().

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

Definition at line 120 of file VIDSelectorBase.py.

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

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

Member Data Documentation

VIDSelectorBase.VIDSelectorBase.__initialized
private

Definition at line 38 of file VIDSelectorBase.py.

Referenced by VIDSelectorBase.VIDSelectorBase.initialize().

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

Definition at line 40 of file VIDSelectorBase.py.

Referenced by VIDSelectorBase.VIDSelectorBase.__repr__().

VIDSelectorBase.VIDSelectorBase.__ptrMaker
private

Definition at line 41 of file VIDSelectorBase.py.

Referenced by VIDSelectorBase.VIDSelectorBase.__call__().

VIDSelectorBase.VIDSelectorBase.__selectorBuilder
private

Definition at line 42 of file VIDSelectorBase.py.

Referenced by VIDSelectorBase.VIDSelectorBase.initialize().

VIDSelectorBase.VIDSelectorBase.__suffix
private

Definition at line 39 of file VIDSelectorBase.py.

Referenced by VIDSelectorBase.VIDSelectorBase.initialize().