Functions | |
def | invert_intervals |
def | merge_intervals |
def | remove_extra_spaces |
def | remove_html_tags |
def | searchrun |
Variables | |
tuple | ADDRESS = CONFIG.get('Common','RunReg') |
tuple | BFIELD = CONFIG.get('Common','BField_thr') |
tuple | BFIELD_float = float(BFIELD) |
list | blocks = selected_dcs[run] |
tuple | CFGLIST = CONFIG.items('Common') |
list | combined = [] |
dictionary | compactList = {} |
tuple | CONFIG = ConfigParser.ConfigParser() |
string | CONFIGFILE = 'runreg.cfg' |
tuple | DATASET = CONFIG.get('Common','Dataset') |
list | DCS_ALL = ['Bpix','Fpix','Tibtid','TecM','TecP','Tob','Ebminus','Ebplus','EeMinus','EePlus','EsMinus','EsPlus','HbheA','HbheB','HbheC','H0','Hf','Dtminus','Dtplus','Dt0','CscMinus','CscPlus','Rpc','Castor',"NONE"] |
tuple | dcs_data = server.DataExporter.export('RUNLUMISECTION', 'GLOBAL', 'json', sel_dcstable) |
tuple | dcsbad_int = invert_intervals(jsonlist[element]) |
tuple | DCSLIST = string.split(DCSSTAT,',') |
tuple | DCSSTAT = CONFIG.get('Common','DCS') |
EXCEPTION = False | |
int | EXRUN = 1 |
string | FULLADDRESS = "/xmlrpc" |
tuple | GROUP = CONFIG.get('Common','Group') |
tuple | hlt = line.split(',') |
tuple | HLTNAMEFILTER = CONFIG.get('Common','HLTnameFilter') |
tuple | JSONFILE = CONFIG.get('Common','JSONFILE') |
tuple | jsonlist = json.loads(dcs_data) |
list | LISTOFRUN = [] |
tuple | ls_temp_data = server.DataExporter.export('RUN', 'GLOBAL', 'csv_datasets', sel_dstable) |
LSCOMMENT = True | |
tuple | LSPARSE = CONFIG.get('Common','LSCOMMENT') |
tuple | lumiSummary = open(JSONFILE, 'w') |
tuple | manualbad_int = searchrun(element) |
tuple | OUTPUTFILENAME = CONFIG.get('Common',"OutputFileName") |
list | prevblock = [-2,-2] |
list | QF_ALL_STAT = ["GOOD","BAD","EXCL","NONE"] |
list | QF_ALL_SYS = ["Hcal","Track","Strip","Egam","Es","Dt","Csc","Pix","Muon","Rpc","Castor","Jmet","Ecal","L1t","Hlt","NONE"] |
tuple | QFLAGS = CONFIG.get('Common','QFLAGS') |
tuple | QFlist = string.split(QFLAGS,',') |
list | ranges = [] |
tuple | run = line.split(',') |
tuple | run_data = server.DataExporter.export('RUN', 'GLOBAL', 'csv_runs', sel_runtable) |
tuple | RUNMAX = CONFIG.get('Common','Runmax') |
tuple | RUNMIN = CONFIG.get('Common','Runmin') |
tuple | runs_to_print = selected_dcs.keys() |
string | sel_dcstable = "{groupName} ='" |
string | sel_dstable = "{groupName} ='" |
string | sel_runtable = "{groupName} ='" |
dictionary | selected_dcs = {} |
tuple | selectedRuns = open(OUTPUTFILENAME, 'w') |
string | selectlumi = "process.source.lumisToProcess = cms.untracked.VLuminosityBlockRange(\n" |
tuple | server = xmlrpclib.ServerProxy(FULLADDRESS) |
tuple | syst = string.split(QF,":") |
int | Tries = 0 |
tuple | value = string.split(QF,":") |
def runregparse::invert_intervals | ( | intervals, | |
min_val = 1 , |
|||
max_val = 9999 |
|||
) |
Definition at line 24 of file runregparse.py.
00025 : 00026 # first order and merge in case 00027 if not intervals: 00028 return [] 00029 intervals=merge_intervals(intervals) 00030 intervals = sorted(intervals, key = lambda x: x[0]) 00031 result = [] 00032 if min_val==-1: 00033 # defin min and max 00034 (a,b)=intervals[0] 00035 min_val=a 00036 if max_val==-1: 00037 (a,b)=intervals[len(intervals)-1] 00038 max_val=b 00039 00040 curr_min=min_val 00041 for (x,y) in intervals: 00042 if x>curr_min: 00043 result.append((curr_min,x-1)) 00044 curr_min=y+1 00045 if curr_min<max_val: 00046 result.append((curr_min,max_val)) 00047 00048 # print min_val,max_val 00049 return result
def runregparse::merge_intervals | ( | intervals | ) |
Definition at line 50 of file runregparse.py.
00051 : 00052 if not intervals: 00053 return [] 00054 intervals = sorted(intervals, key = lambda x: x[0]) 00055 result = [] 00056 (a, b) = intervals[0] 00057 for (x, y) in intervals[1:]: 00058 if x <= b: 00059 b = max(b, y) 00060 else: 00061 result.append((a, b)) 00062 (a, b) = (x, y) 00063 result.append((a, b)) 00064 return result
def runregparse::remove_extra_spaces | ( | data | ) |
Definition at line 71 of file runregparse.py.
def runregparse::remove_html_tags | ( | data | ) |
Definition at line 65 of file runregparse.py.
def runregparse::searchrun | ( | runno | ) |
Definition at line 75 of file runregparse.py.
00076 : 00077 global QF_Req,ls_temp_data,QF_ALL_SYS,EXCEPTION,EXRUN 00078 intervallist=[] 00079 selectls="" 00080 00081 for line in ls_temp_data.split("\n"): 00082 if runno in line: 00083 # print line 00084 try: 00085 if "%%%BAD LS INFO BEGIN%%%" in line: 00086 selectls=line.split("%%%BAD LS INFO BEGIN%%%")[1] 00087 selectls=selectls.split("%%%BAD LS INFO END%%%")[0] 00088 selectls=remove_html_tags(selectls) 00089 selectls=remove_extra_spaces(selectls) 00090 # print selectls 00091 for tag in QF_ALL_SYS: 00092 selectls=selectls.replace(tag+":","\n"+tag+":") 00093 # print selectls 00094 00095 for line in selectls.split("\n"): 00096 try: 00097 tag=line.split(":")[0] 00098 intervals=line.split(":")[1] 00099 except: 00100 continue 00101 if tag in QF_Req.keys(): 00102 if QF_Req[tag]=="GOOD": 00103 for interval in intervals.split(","): 00104 if "ALL" in interval: 00105 lmin=1 00106 lmax=9999 00107 else: 00108 strmin=interval.split('-')[0] 00109 strmax=interval.split('-')[1] 00110 lmin=int(strmin) 00111 if "END" in strmax: 00112 lmax=9999 00113 else: 00114 lmax=int(strmax) 00115 intervallist.append((lmin,lmax)) 00116 except: 00117 EXCEPTION=True 00118 EXRUN=int(runno) 00119 intervallist=merge_intervals(intervallist) 00120 # print runno, intervallist 00121 return intervallist 00122 00123 00124 00125 #main starts here# 00126 00127 QF_Req={} GOODRUN={}
tuple runregparse::ADDRESS = CONFIG.get('Common','RunReg') |
Definition at line 143 of file runregparse.py.
tuple runregparse::BFIELD = CONFIG.get('Common','BField_thr') |
Definition at line 147 of file runregparse.py.
tuple runregparse::BFIELD_float = float(BFIELD) |
Definition at line 182 of file runregparse.py.
list runregparse::blocks = selected_dcs[run] |
Definition at line 304 of file runregparse.py.
Referenced by operator<<(), PFProducer::produce(), gen::Pythia6Service::setSLHAFromHeader(), and Herwig6Hadronizer::setSLHAFromHeader().
tuple runregparse::CFGLIST = CONFIG.items('Common') |
Definition at line 178 of file runregparse.py.
tuple runregparse::combined = [] |
Definition at line 274 of file runregparse.py.
Referenced by MuonRoadTrajectoryBuilder::GatherHits(), TrajectoryFactoryBase::materialEffects(), PFMuonAlgo::printMuonProperties(), and SymmetryFit::symmetryChi2().
dictionary runregparse::compactList = {} |
Definition at line 128 of file runregparse.py.
tuple runregparse::CONFIG = ConfigParser.ConfigParser() |
Definition at line 136 of file runregparse.py.
string runregparse::CONFIGFILE = 'runreg.cfg' |
Definition at line 135 of file runregparse.py.
tuple runregparse::DATASET = CONFIG.get('Common','Dataset') |
Definition at line 140 of file runregparse.py.
list runregparse::DCS_ALL = ['Bpix','Fpix','Tibtid','TecM','TecP','Tob','Ebminus','Ebplus','EeMinus','EePlus','EsMinus','EsPlus','HbheA','HbheB','HbheC','H0','Hf','Dtminus','Dtplus','Dt0','CscMinus','CscPlus','Rpc','Castor',"NONE"] |
Definition at line 132 of file runregparse.py.
tuple runregparse::dcs_data = server.DataExporter.export('RUNLUMISECTION', 'GLOBAL', 'json', sel_dcstable) |
Definition at line 230 of file runregparse.py.
tuple runregparse::dcsbad_int = invert_intervals(jsonlist[element]) |
Definition at line 273 of file runregparse.py.
tuple runregparse::DCSLIST = string.split(DCSSTAT,',') |
Definition at line 150 of file runregparse.py.
tuple runregparse::DCSSTAT = CONFIG.get('Common','DCS') |
Definition at line 149 of file runregparse.py.
runregparse::EXCEPTION = False |
Definition at line 21 of file runregparse.py.
int runregparse::EXRUN = 1 |
Definition at line 22 of file runregparse.py.
string runregparse::FULLADDRESS = "/xmlrpc" |
Definition at line 201 of file runregparse.py.
tuple runregparse::GROUP = CONFIG.get('Common','Group') |
Definition at line 141 of file runregparse.py.
tuple runregparse::hlt = line.split(',') |
Definition at line 255 of file runregparse.py.
Referenced by CSCValidation::analyze(), and LumiCalculator::beginRun().
tuple runregparse::HLTNAMEFILTER = CONFIG.get('Common','HLTnameFilter') |
Definition at line 142 of file runregparse.py.
tuple runregparse::JSONFILE = CONFIG.get('Common','JSONFILE') |
Definition at line 179 of file runregparse.py.
tuple runregparse::jsonlist = json.loads(dcs_data) |
Definition at line 263 of file runregparse.py.
list runregparse::LISTOFRUN = [] |
Definition at line 249 of file runregparse.py.
tuple runregparse::ls_temp_data = server.DataExporter.export('RUN', 'GLOBAL', 'csv_datasets', sel_dstable) |
Definition at line 232 of file runregparse.py.
runregparse::LSCOMMENT = True |
Definition at line 154 of file runregparse.py.
tuple runregparse::LSPARSE = CONFIG.get('Common','LSCOMMENT') |
Definition at line 148 of file runregparse.py.
tuple runregparse::lumiSummary = open(JSONFILE, 'w') |
Definition at line 290 of file runregparse.py.
Referenced by EventHeader::analyze(), LumiCalculator::endLuminosityBlock(), and BPhysicsOniaDQM::endLuminosityBlock().
tuple runregparse::manualbad_int = searchrun(element) |
Definition at line 271 of file runregparse.py.
tuple runregparse::OUTPUTFILENAME = CONFIG.get('Common',"OutputFileName") |
Definition at line 152 of file runregparse.py.
runregparse::prevblock = [-2,-2] |
Definition at line 306 of file runregparse.py.
list runregparse::QF_ALL_STAT = ["GOOD","BAD","EXCL","NONE"] |
Definition at line 131 of file runregparse.py.
list runregparse::QF_ALL_SYS = ["Hcal","Track","Strip","Egam","Es","Dt","Csc","Pix","Muon","Rpc","Castor","Jmet","Ecal","L1t","Hlt","NONE"] |
Definition at line 130 of file runregparse.py.
tuple runregparse::QFLAGS = CONFIG.get('Common','QFLAGS') |
Definition at line 146 of file runregparse.py.
tuple runregparse::QFlist = string.split(QFLAGS,',') |
Definition at line 163 of file runregparse.py.
list runregparse::ranges = [] |
Definition at line 300 of file runregparse.py.
Referenced by SymmetryFit::continuousRanges(), EcalTBDigiProducer::EcalTBDigiProducer(), EcalTBH2TDCRecInfoProducer::EcalTBH2TDCRecInfoProducer(), EcalTBTDCRecInfoProducer::EcalTBTDCRecInfoProducer(), FWPSetTableManager::handleEntry(), HLTMuonL1RegionalFilter::HLTMuonL1RegionalFilter(), and AlignmentParameterSelector::insideRanges().
tuple runregparse::run = line.split(',') |
Definition at line 253 of file runregparse.py.
tuple runregparse::run_data = server.DataExporter.export('RUN', 'GLOBAL', 'csv_runs', sel_runtable) |
Definition at line 231 of file runregparse.py.
tuple runregparse::RUNMAX = CONFIG.get('Common','Runmax') |
Definition at line 145 of file runregparse.py.
tuple runregparse::RUNMIN = CONFIG.get('Common','Runmin') |
Definition at line 144 of file runregparse.py.
tuple runregparse::runs_to_print = selected_dcs.keys() |
Definition at line 301 of file runregparse.py.
string runregparse::sel_dcstable = "{groupName} ='" |
Definition at line 218 of file runregparse.py.
string runregparse::sel_dstable = "{groupName} ='" |
Definition at line 209 of file runregparse.py.
string runregparse::sel_runtable = "{groupName} ='" |
Definition at line 206 of file runregparse.py.
dictionary runregparse::selected_dcs = {} |
Definition at line 262 of file runregparse.py.
tuple runregparse::selectedRuns = open(OUTPUTFILENAME, 'w') |
Definition at line 250 of file runregparse.py.
string runregparse::selectlumi = "process.source.lumisToProcess = cms.untracked.VLuminosityBlockRange(\n" |
Definition at line 299 of file runregparse.py.
tuple runregparse::server = xmlrpclib.ServerProxy(FULLADDRESS) |
Definition at line 203 of file runregparse.py.
tuple runregparse::syst = string.split(QF,":") |
Definition at line 165 of file runregparse.py.
int runregparse::Tries = 0 |
Definition at line 225 of file runregparse.py.
tuple runregparse::value = string.split(QF,":") |
Definition at line 166 of file runregparse.py.