Functions | |
def | getPrescaleTableFromProcessObject |
def | getProcessObjectFromConfDB |
def | queryRR |
Variables | |
string | action = "append" |
tuple | all_hlt_keys_seen = set(runKeys.values()) |
tuple | all_hlt_path_names_seen = set() |
tuple | all_path_names = set(process.paths.keys()) |
list | column_names = [ 'run','' ] |
list | csv_output_file = args[0] |
tuple | csv_writer = csv.writer(fout,delimiter=";") |
list | default = [] |
string | dest = "pathPatterns" |
tuple | fout = open(csv_output_file,"w") |
string | help = "restrict paths to PATTERN. Note that this can be a single path name or a pattern " |
list | hlt_key = runKeys[run] |
dictionary | hlt_path_names_table = {} |
int | index = 1 |
string | metavar = "PATTERN" |
tuple | parser |
list | prescales = prescaleTable[hlt_key] |
dictionary | prescaleTable = {} |
previous_hlt_key = None | |
tuple | process = getProcessObjectFromConfDB(hlt_key) |
tuple | runKeys = queryRR() |
tuple | runs = sorted(runKeys.keys()) |
list | tmp = [] |
list | values = [ run , '' ] |
def makeHLTPrescaleTable::getPrescaleTableFromProcessObject | ( | process | ) |
returns a dict of hlt key to vector of prescales mapping
Definition at line 55 of file makeHLTPrescaleTable.py.
00056 : 00057 """ returns a dict of hlt key to vector of prescales 00058 mapping """ 00059 00060 retval = {} 00061 for entry in process.PrescaleService.prescaleTable: 00062 retval[entry.pathName.value()] = entry.prescales.value() 00063 00064 return retval 00065 00066 #----------------------------------------------------------------------
def makeHLTPrescaleTable::getProcessObjectFromConfDB | ( | hlt_key | ) |
Definition at line 67 of file makeHLTPrescaleTable.py.
00068 : 00069 # print >> stderr,"\t%s ..." % hlt_key 00070 cmd = "edmConfigFromDB --orcoff --configName " + hlt_key 00071 # print >> stderr, "cmd=",cmd 00072 res = commands.getoutput(cmd) 00073 00074 # potentially dangerous: we're running python code here 00075 # which we get from an external process (confDB). 00076 # we trust that there are no file deletion commands 00077 # in the HLT configurations... 00078 00079 # for some keys, edmConfigFromDB seems to produce error messages. 00080 # just return None in this case 00081 try: 00082 exec(res) 00083 except: 00084 return None 00085 00086 return process 00087 #----------------------------------------------------------------------
def makeHLTPrescaleTable::queryRR | ( | ) |
returns a dict of run number mapping to the HLT key
Definition at line 88 of file makeHLTPrescaleTable.py.
00089 : 00090 """ returns a dict of run number mapping to the HLT key """ 00091 00092 stderr.write("Querying run registry for range [%d, %d], group name like %s ...\n" % (options.firstRun, options.lastRun, options.groupName)) 00093 import xmlrpclib 00094 import xml.dom.minidom 00095 server = xmlrpclib.ServerProxy(options.rrurl) 00096 run_data = server.DataExporter.export('RUN', 'GLOBAL', 'xml_datasets', "{runNumber} >= %d AND {runNumber} <= %d AND {groupName} like '%s' AND {datasetName} = '/Global/Online/ALL'" % (options.firstRun, options.lastRun, options.groupName)) 00097 ret = {} 00098 xml_data = xml.dom.minidom.parseString(run_data) 00099 xml_runs = xml_data.documentElement.getElementsByTagName("RUN_DATASET") 00100 for xml_run in xml_runs: 00101 ret[xml_run.getElementsByTagName("RUN_NUMBER")[0].firstChild.nodeValue] = xml_run.getElementsByTagName("RUN_HLTKEY")[0].firstChild.nodeValue 00102 return ret 00103 00104 #---------------------------------------------------------------------- 00105 # main 00106 #---------------------------------------------------------------------- 00107 # check whether we have a CMSSW environment initalized
string makeHLTPrescaleTable::action = "append" |
Definition at line 30 of file makeHLTPrescaleTable.py.
tuple makeHLTPrescaleTable::all_hlt_keys_seen = set(runKeys.values()) |
Definition at line 128 of file makeHLTPrescaleTable.py.
tuple makeHLTPrescaleTable::all_hlt_path_names_seen = set() |
Definition at line 122 of file makeHLTPrescaleTable.py.
tuple makeHLTPrescaleTable::all_path_names = set(process.paths.keys()) |
Definition at line 145 of file makeHLTPrescaleTable.py.
list makeHLTPrescaleTable::column_names = [ 'run','' ] |
Definition at line 206 of file makeHLTPrescaleTable.py.
list makeHLTPrescaleTable::csv_output_file = args[0] |
Definition at line 48 of file makeHLTPrescaleTable.py.
tuple makeHLTPrescaleTable::csv_writer = csv.writer(fout,delimiter=";") |
Definition at line 193 of file makeHLTPrescaleTable.py.
list makeHLTPrescaleTable::default = [] |
Definition at line 29 of file makeHLTPrescaleTable.py.
string makeHLTPrescaleTable::dest = "pathPatterns" |
Definition at line 28 of file makeHLTPrescaleTable.py.
tuple makeHLTPrescaleTable::fout = open(csv_output_file,"w") |
Definition at line 191 of file makeHLTPrescaleTable.py.
string makeHLTPrescaleTable::help = "restrict paths to PATTERN. Note that this can be a single path name or a pattern " |
Definition at line 32 of file makeHLTPrescaleTable.py.
list makeHLTPrescaleTable::hlt_key = runKeys[run] |
Definition at line 213 of file makeHLTPrescaleTable.py.
dictionary makeHLTPrescaleTable::hlt_path_names_table = {} |
Definition at line 119 of file makeHLTPrescaleTable.py.
int makeHLTPrescaleTable::index = 1 |
Definition at line 132 of file makeHLTPrescaleTable.py.
string makeHLTPrescaleTable::metavar = "PATTERN" |
Definition at line 31 of file makeHLTPrescaleTable.py.
00001 OptionParser(usage= 00002 """usage: %prog [options] csv_output_fileexamples: %prog out.csv produces a table of ALL runs and ALL paths (can take quite some time) %prog --path='*ele*' --path='*photon*' out.csv select only paths containing 'ele' and 'photon'""")
Definition at line 6 of file makeHLTPrescaleTable.py.
Definition at line 263 of file makeHLTPrescaleTable.py.
Referenced by HLTEventAnalyzerAOD::analyzeTrigger(), edm::service::PrescaleService::configure(), LumiProducer::fillLSCache(), CandidateTriggerObjectProducer::produce(), and lumi::HLTV32DB::writeHltDataToSchema2().
dictionary makeHLTPrescaleTable::prescaleTable = {} |
Definition at line 116 of file makeHLTPrescaleTable.py.
Definition at line 189 of file makeHLTPrescaleTable.py.
tuple makeHLTPrescaleTable::process = getProcessObjectFromConfDB(hlt_key) |
Definition at line 137 of file makeHLTPrescaleTable.py.
tuple makeHLTPrescaleTable::runKeys = queryRR() |
Definition at line 112 of file makeHLTPrescaleTable.py.
tuple makeHLTPrescaleTable::runs = sorted(runKeys.keys()) |
Definition at line 124 of file makeHLTPrescaleTable.py.
list makeHLTPrescaleTable::tmp = [] |
Definition at line 166 of file makeHLTPrescaleTable.py.
list makeHLTPrescaleTable::values = [ run , '' ] |
Definition at line 236 of file makeHLTPrescaleTable.py.
Referenced by edm::helper::Filler< Association< C > >::add(), TtSemiLepJetCombMVATrainer::analyze(), JetTagMVAExtractor::analyze(), HcalAutoPedestalValidator::analyze(), HcalPedestalsCheck::analyze(), SiStripCMMonitorPlugin::analyze(), JetTagMVATreeTrainer::analyze(), SiStripSummaryBuilder::analyze(), JetTagMVATrainer::analyze(), TaggingVariablePlotter::analyzeTag(), HDQMInspector::ApplyConditions(), pixeltemp::Cluster1DCleaner< reco::Track >::average(), WriteOneGeometryFromXML::beginRun(), cond::IOVEditor::bulkAppend(), SiStripUtility::checkME(), ErrorsPropagationAnalyzer::drawHistograms(), ErrorsAnalyzer::drawHistograms(), CastorDbASCIIIO::dumpCastorObject(), dumpHcalObject(), HcalDbXml::dumpObject(), CastorDbXml::dumpObject(), SimpleValueVectorVariable< TYPE >::eval(), evaluateTtFullHadSignalSel(), evaluateTtSemiLepSignalSel(), edm::helper::Filler< Association< C > >::fill(), PFElectronTranslator::fillMVAValueMap(), GoodSeedProducer::fillPreIdRefValueMap(), PFElectronTranslator::fillSCRefValueMap(), PFLinker::fillValueMap(), FsmwClusterizer1DNameSpace::fsmw(), L1TOccupancyClient::getAvrg(), MuonErrorMatrix::getFast(), metsig::SignAlgoResolutions::getfunc(), HcalDbOnline::getObject(), HcalDbPoolOCCI::getObjectGeneric(), PerformancePayloadFromBinnedTFormula::getResult(), PerformancePayloadFromTFormula::getResult(), edm::MultiAssociation< C >::getValues(), PhysicsTools::MVAModuleHelper< Record, Object, Filler >::init(), lhef::JetMatchingMadgraph::init(), gen::JetMatchingMadgraph::init(), edm::helper::Filler< Association< C > >::insert(), EnergyLossPlain::logTruncate(), MuonErrorMatrix::MuonErrorMatrix(), PhysicsTools::MVAModuleHelper< Record, Object, Filler >::operator()(), EnergyLossPlain::optimal(), pos::PixelCalibConfiguration::PixelCalibConfiguration(), DDLRotationByAxis::processElement(), CosmicsMuonIdProducer::produce(), DeltaRNearestObjectComputer< T >::produce(), ElectronConversionRejectionVars::produce(), EcalBasicClusterLocalContCorrectionsESProducer::produce(), TtSemiLepJetCombMVAComputer::produce(), SoftElectronCandProducer::produce(), AssociationVector2ValueMap< KeyRefProd, CVal >::produce(), OtherObjectVariableComputer< T >::produce(), ObjectMultiplicityCounter< T >::produce(), ColinsSoperVariablesComputer::produce(), magneticfield::VolumeBasedMagneticFieldESProducer::produce(), MuonSelectionTypeValueMapProducer::produce(), EcalGlobalShowerContainmentCorrectionsVsEtaESProducer::produce(), NearbyCandCountComputer::produce(), ElectronIDExternalProducer< algo >::produce(), EcalShowerContainmentCorrectionsESProducer::produce(), CocoaAnalyzer::ReadXMLFile(), DTOccupancyTest::runOccupancyTest(), FWTriggerTableView::saveImageTo(), DQMHistoryServiceBase::scanTreeAndFillSummary(), GenEventInfoProduct::setBinningValues(), sistrip::FEDStripData::ChannelData::setMedians(), DDLSolid::setReference(), DDLMaterial::setReference(), PhysicsTools::MVAModuleHelper< Record, Object, Filler >::train(), SiTrivialDigitalConverter::truncate(), and CombinedKinematicConstraint::value().