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

◆ exit()

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 

◆ nonzero()

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 

◆ pack()

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 

◆ parse()

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

◆ unpack()

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.

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 

References mathSSE.return().

Referenced by unpackLumiid().

◆ unpackLumiid()

def getBeamSpotDB.unpackLumiid (   i)
unpack 64bit lumiid to dictionary {'run','lumisection'}

Definition at line 97 of file getBeamSpotDB.py.

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 

References unpack().

Variable Documentation

◆ args

getBeamSpotDB.args

Definition at line 109 of file getBeamSpotDB.py.

◆ atag

getBeamSpotDB.atag

◆ auth

getBeamSpotDB.auth

Definition at line 135 of file getBeamSpotDB.py.

◆ cmd

getBeamSpotDB.cmd

Definition at line 122 of file getBeamSpotDB.py.

◆ destDB

getBeamSpotDB.destDB

Definition at line 131 of file getBeamSpotDB.py.

◆ globaltag

getBeamSpotDB.globaltag

Definition at line 113 of file getBeamSpotDB.py.

◆ iov_since

getBeamSpotDB.iov_since

Definition at line 129 of file getBeamSpotDB.py.

◆ iov_till

getBeamSpotDB.iov_till

Definition at line 130 of file getBeamSpotDB.py.

◆ lumi

getBeamSpotDB.lumi

Definition at line 142 of file getBeamSpotDB.py.

◆ option

getBeamSpotDB.option

Definition at line 109 of file getBeamSpotDB.py.

◆ optionstring

getBeamSpotDB.optionstring

Definition at line 53 of file getBeamSpotDB.py.

◆ outcmd

getBeamSpotDB.outcmd

Definition at line 123 of file getBeamSpotDB.py.

◆ outtext

getBeamSpotDB.outtext

Definition at line 206 of file getBeamSpotDB.py.

◆ readdb_out

getBeamSpotDB.readdb_out

READ.

Definition at line 153 of file getBeamSpotDB.py.

◆ rnewfile

getBeamSpotDB.rnewfile

Definition at line 155 of file getBeamSpotDB.py.

◆ run

getBeamSpotDB.run

Definition at line 139 of file getBeamSpotDB.py.

◆ status_rDB

getBeamSpotDB.status_rDB

Definition at line 204 of file getBeamSpotDB.py.

◆ tagname

getBeamSpotDB.tagname

Definition at line 112 of file getBeamSpotDB.py.

◆ USAGE

getBeamSpotDB.USAGE

Definition at line 41 of file getBeamSpotDB.py.

getBeamSpotDB.nonzero
def nonzero(self)
Definition: getBeamSpotDB.py:43
mathSSE::return
return((rh ^ lh) &mask)
getBeamSpotDB.unpackLumiid
def unpackLumiid(i)
Definition: getBeamSpotDB.py:97
getBeamSpotDB.exit
def exit(msg="")
Definition: getBeamSpotDB.py:55
getBeamSpotDB.pack
def pack(high, low)
Definition: getBeamSpotDB.py:83
getBeamSpotDB.parse
def parse(docstring, arglist=None)
Definition: getBeamSpotDB.py:58
getBeamSpotDB.unpack
def unpack(i)
Definition: getBeamSpotDB.py:90