CMS 3D CMS Logo

Classes | Functions | Variables
getBeamSpotDB Namespace Reference

Classes

class  ParsingError
 

Functions

def exit (msg="")
 
def nonzero (self)
 
def pack (high, low)
 
def parse (docstring, arglist=None)
 
def unpack (i)
 
def unpackLumiid (i)
 

Variables

 args
 
 atag
 
 auth
 
 cmd
 
 destDB
 
 globaltag
 
 iov_since
 
 iov_till
 
 lumi
 
 option
 
 optionstring
 
 outcmd
 
 outtext
 
 readdb_out
 READ. More...
 
 rnewfile
 
 run
 
 status_rDB
 
 tagname
 
 USAGE
 

Function Documentation

def getBeamSpotDB.exit (   msg = "")

Definition at line 54 of file getBeamSpotDB.py.

54 def exit(msg=""):
55  raise SystemExit(msg or optionstring.replace("%prog",sys.argv[0]))
56 
def exit(msg="")
def getBeamSpotDB.nonzero (   self)

Definition at line 42 of file getBeamSpotDB.py.

42 def nonzero(self): # will become the nonzero method of optparse.Values
43  "True if options were given"
44  for v in six.itervalues(self.__dict__):
45  if v is not None: return True
46  return False
47 
48 optparse.Values.__nonzero__ = nonzero # dynamically fix optparse.Values
49 
def nonzero(self)
def getBeamSpotDB.pack (   high,
  low 
)
pack high,low 32bit unsigned int to one unsigned 64bit long long
   Note:the print value of result number may appear signed, if the sign bit is used.

Definition at line 82 of file getBeamSpotDB.py.

82 def pack(high,low):
83  """pack high,low 32bit unsigned int to one unsigned 64bit long long
84  Note:the print value of result number may appear signed, if the sign bit is used.
85  """
86  h=high<<32
87  return (h|low)
88 
def pack(high, low)
def getBeamSpotDB.parse (   docstring,
  arglist = None 
)

Definition at line 57 of file getBeamSpotDB.py.

57 def parse(docstring, arglist=None):
58  global optionstring
59  optionstring = docstring
60  match = USAGE.search(optionstring)
61  if not match: raise ParsingError("Cannot find the option string")
62  optlines = match.group(1).splitlines()
63  try:
64  p = optparse.OptionParser(optlines[0])
65  for line in optlines[1:]:
66  opt, help=line.split(':')[:2]
67  short,long=opt.split(',')[:2]
68  if '=' in opt:
69  action='store'
70  long=long.split('=')[0]
71  else:
72  action='store_true'
73  p.add_option(short.strip(),long.strip(),
74  action = action, help = help.strip())
75  except (IndexError,ValueError):
76  raise ParsingError("Cannot parse the option string correctly")
77  return p.parse_args(arglist)
78 
79 
80 
81 # lumi tools CondCore/Utilities/python/timeUnitHelper.py
def parse(docstring, arglist=None)
def getBeamSpotDB.unpack (   i)
unpack 64bit unsigned long long into 2 32bit unsigned int, return tuple (high,low)

Definition at line 89 of file getBeamSpotDB.py.

References mathSSE.return().

Referenced by unpackLumiid().

89 def unpack(i):
90  """unpack 64bit unsigned long long into 2 32bit unsigned int, return tuple (high,low)
91  """
92  high=i>>32
93  low=i&0xFFFFFFFF
94  return(high,low)
95 
return((rh^lh)&mask)
def getBeamSpotDB.unpackLumiid (   i)
unpack 64bit lumiid to dictionary {'run','lumisection'}

Definition at line 96 of file getBeamSpotDB.py.

References unpack().

96 def unpackLumiid(i):
97  """unpack 64bit lumiid to dictionary {'run','lumisection'}
98  """
99  j=unpack(i)
100  return {'run':j[0],'lumisection':j[1]}
101 
102 
def unpackLumiid(i)

Variable Documentation

getBeamSpotDB.args

Definition at line 108 of file getBeamSpotDB.py.

getBeamSpotDB.atag
getBeamSpotDB.auth

Definition at line 134 of file getBeamSpotDB.py.

getBeamSpotDB.cmd

Definition at line 121 of file getBeamSpotDB.py.

getBeamSpotDB.destDB

Definition at line 130 of file getBeamSpotDB.py.

getBeamSpotDB.globaltag

Definition at line 112 of file getBeamSpotDB.py.

getBeamSpotDB.iov_since

Definition at line 128 of file getBeamSpotDB.py.

getBeamSpotDB.iov_till

Definition at line 129 of file getBeamSpotDB.py.

getBeamSpotDB.lumi

Definition at line 141 of file getBeamSpotDB.py.

getBeamSpotDB.option

Definition at line 108 of file getBeamSpotDB.py.

getBeamSpotDB.optionstring

Definition at line 52 of file getBeamSpotDB.py.

getBeamSpotDB.outcmd

Definition at line 122 of file getBeamSpotDB.py.

getBeamSpotDB.outtext

Definition at line 205 of file getBeamSpotDB.py.

getBeamSpotDB.readdb_out

READ.

Definition at line 152 of file getBeamSpotDB.py.

getBeamSpotDB.rnewfile

Definition at line 154 of file getBeamSpotDB.py.

getBeamSpotDB.run

Definition at line 138 of file getBeamSpotDB.py.

getBeamSpotDB.status_rDB

Definition at line 203 of file getBeamSpotDB.py.

getBeamSpotDB.tagname

Definition at line 111 of file getBeamSpotDB.py.

getBeamSpotDB.USAGE

Definition at line 40 of file getBeamSpotDB.py.