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 55 of file getBeamSpotDB.py.

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

Definition at line 43 of file getBeamSpotDB.py.

43 def nonzero(self): # will become the nonzero method of optparse.Values
44  "True if options were given"
45  for v in six.itervalues(self.__dict__):
46  if v is not None: return True
47  return False
48 
49 optparse.Values.__nonzero__ = nonzero # dynamically fix optparse.Values
50 
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 83 of file getBeamSpotDB.py.

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

Definition at line 58 of file getBeamSpotDB.py.

58 def parse(docstring, arglist=None):
59  global optionstring
60  optionstring = docstring
61  match = USAGE.search(optionstring)
62  if not match: raise ParsingError("Cannot find the option string")
63  optlines = match.group(1).splitlines()
64  try:
65  p = optparse.OptionParser(optlines[0])
66  for line in optlines[1:]:
67  opt, help=line.split(':')[:2]
68  short,long=opt.split(',')[:2]
69  if '=' in opt:
70  action='store'
71  long=long.split('=')[0]
72  else:
73  action='store_true'
74  p.add_option(short.strip(),long.strip(),
75  action = action, help = help.strip())
76  except (IndexError,ValueError):
77  raise ParsingError("Cannot parse the option string correctly")
78  return p.parse_args(arglist)
79 
80 
81 
82 # 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 90 of file getBeamSpotDB.py.

References mathSSE.return().

Referenced by unpackLumiid().

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

Definition at line 97 of file getBeamSpotDB.py.

References unpack().

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

Variable Documentation

getBeamSpotDB.args

Definition at line 109 of file getBeamSpotDB.py.

getBeamSpotDB.atag
getBeamSpotDB.auth

Definition at line 135 of file getBeamSpotDB.py.

getBeamSpotDB.cmd

Definition at line 122 of file getBeamSpotDB.py.

getBeamSpotDB.destDB

Definition at line 131 of file getBeamSpotDB.py.

getBeamSpotDB.globaltag

Definition at line 113 of file getBeamSpotDB.py.

getBeamSpotDB.iov_since

Definition at line 129 of file getBeamSpotDB.py.

getBeamSpotDB.iov_till

Definition at line 130 of file getBeamSpotDB.py.

getBeamSpotDB.lumi

Definition at line 142 of file getBeamSpotDB.py.

getBeamSpotDB.option

Definition at line 109 of file getBeamSpotDB.py.

getBeamSpotDB.optionstring

Definition at line 53 of file getBeamSpotDB.py.

getBeamSpotDB.outcmd

Definition at line 123 of file getBeamSpotDB.py.

getBeamSpotDB.outtext

Definition at line 206 of file getBeamSpotDB.py.

getBeamSpotDB.readdb_out

READ.

Definition at line 153 of file getBeamSpotDB.py.

getBeamSpotDB.rnewfile

Definition at line 155 of file getBeamSpotDB.py.

getBeamSpotDB.run

Definition at line 139 of file getBeamSpotDB.py.

getBeamSpotDB.status_rDB

Definition at line 204 of file getBeamSpotDB.py.

getBeamSpotDB.tagname

Definition at line 112 of file getBeamSpotDB.py.

getBeamSpotDB.USAGE

Definition at line 41 of file getBeamSpotDB.py.