CMS 3D CMS Logo

Functions | Variables

mergeJSON Namespace Reference

Functions

def filterRuns

Variables

tuple filename = match.group(1)
tuple finalList = LumiList()
string help = 'Save output to file OUTPUT'
tuple localList = LumiList(filename = filename)
tuple match = minMaxRE.search(filename)
tuple maxRun = int( match.group(3) )
tuple minMaxRE = re.compile(r'(\S+):(\d+)-(\d*)')
int minRun = 0
tuple parser = optparse.OptionParser("Usage: %prog alpha1.json [alpha2.json:142300-145900]")

Function Documentation

def mergeJSON::filterRuns (   lumiList,
  minRun,
  maxRun 
)

Definition at line 9 of file mergeJSON.py.

00010                                          :
00011     allRuns = lumiList.getRuns()
00012     runsToRemove = []
00013     for run in allRuns:
00014         if minRun and int(run) < minRun:
00015             runsToRemove.append (run)
00016         if maxRun and int(run) > maxRun:
00017             runsToRemove.append (run)
00018     lumiList.removeRuns (runsToRemove)
00019     
00020 


Variable Documentation

tuple mergeJSON::filename = match.group(1)

Definition at line 38 of file mergeJSON.py.

mergeJSON::finalList = LumiList()

Definition at line 33 of file mergeJSON.py.

string mergeJSON::help = 'Save output to file OUTPUT'

Definition at line 25 of file mergeJSON.py.

tuple mergeJSON::localList = LumiList(filename = filename)

Definition at line 46 of file mergeJSON.py.

tuple mergeJSON::match = minMaxRE.search(filename)

Definition at line 36 of file mergeJSON.py.

tuple mergeJSON::maxRun = int( match.group(3) )

Definition at line 41 of file mergeJSON.py.

tuple mergeJSON::minMaxRE = re.compile(r'(\S+):(\d+)-(\d*)')

Definition at line 31 of file mergeJSON.py.

tuple mergeJSON::minRun = 0

Definition at line 35 of file mergeJSON.py.

tuple mergeJSON::parser = optparse.OptionParser("Usage: %prog alpha1.json [alpha2.json:142300-145900]")

Definition at line 23 of file mergeJSON.py.