Classes | |
class | ParsingError |
Functions | |
def | exit |
def | nonzero |
def | pack |
def | parse |
def | unpack |
def | unpackLumiid |
Variables | |
list | atag = outcmd[1] |
string | auth = '/afs/cern.ch/cms/DB/conddb' |
string | cmd = 'cmscond_tagtree_list -c frontier://cmsfrontier.cern.ch:8000/Frontier/CMS_COND_31X_GLOBALTAG -P /afs/cern.ch/cms/DB/conddb -T ' |
string | destDB = 'frontier://PromptProd/CMS_COND_31X_BEAMSPOT' |
string | globaltag = '' |
string | iov_since = '' |
string | iov_till = '' |
string | lumi = '1' |
string | optionstring = "" |
tuple | outcmd = commands.getstatusoutput( cmd ) |
list | outtext = status_rDB[1] |
string | readdb_out = "readDB_" |
READ. | |
tuple | rnewfile = open(readdb_out,'w') |
string | run = '1' |
tuple | status_rDB = commands.getstatusoutput('cmsRun '+ readdb_out) |
string | tagname = '' |
tuple | USAGE = re.compile(r'(?s)\s*usage: (.*?)(\n[ \t]*\n|$)') |
def getBeamSpotDB::exit | ( | msg = "" | ) |
Definition at line 53 of file getBeamSpotDB.py.
def getBeamSpotDB::nonzero | ( | self | ) |
Definition at line 41 of file getBeamSpotDB.py.
00041 : # will become the nonzero method of optparse.Values 00042 "True if options were given" 00043 for v in self.__dict__.itervalues(): 00044 if v is not None: return True 00045 return False 00046 00047 optparse.Values.__nonzero__ = nonzero # dynamically fix optparse.Values 00048
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 81 of file getBeamSpotDB.py.
def getBeamSpotDB::parse | ( | docstring, | |
arglist = None |
|||
) |
Definition at line 56 of file getBeamSpotDB.py.
00057 : 00058 global optionstring 00059 optionstring = docstring 00060 match = USAGE.search(optionstring) 00061 if not match: raise ParsingError("Cannot find the option string") 00062 optlines = match.group(1).splitlines() 00063 try: 00064 p = optparse.OptionParser(optlines[0]) 00065 for line in optlines[1:]: 00066 opt, help=line.split(':')[:2] 00067 short,long=opt.split(',')[:2] 00068 if '=' in opt: 00069 action='store' 00070 long=long.split('=')[0] 00071 else: 00072 action='store_true' 00073 p.add_option(short.strip(),long.strip(), 00074 action = action, help = help.strip()) 00075 except (IndexError,ValueError): 00076 raise ParsingError("Cannot parse the option string correctly") 00077 return p.parse_args(arglist) 00078 00079 00080 # lumi tools CondCore/Utilities/python/timeUnitHelper.py
def getBeamSpotDB::unpack | ( | i | ) |
unpack 64bit unsigned long long into 2 32bit unsigned int, return tuple (high,low)
Definition at line 88 of file getBeamSpotDB.py.
def getBeamSpotDB::unpackLumiid | ( | i | ) |
unpack 64bit lumiid to dictionary {'run','lumisection'}
Definition at line 95 of file getBeamSpotDB.py.
list getBeamSpotDB::atag = outcmd[1] |
Definition at line 122 of file getBeamSpotDB.py.
Referenced by RunList::fetchGlobalRunsByLocation(), and RunList::fetchRunsByLocation().
getBeamSpotDB::auth = '/afs/cern.ch/cms/DB/conddb' |
Definition at line 133 of file getBeamSpotDB.py.
string getBeamSpotDB::cmd = 'cmscond_tagtree_list -c frontier://cmsfrontier.cern.ch:8000/Frontier/CMS_COND_31X_GLOBALTAG -P /afs/cern.ch/cms/DB/conddb -T ' |
Definition at line 120 of file getBeamSpotDB.py.
getBeamSpotDB::destDB = 'frontier://PromptProd/CMS_COND_31X_BEAMSPOT' |
Definition at line 129 of file getBeamSpotDB.py.
Definition at line 111 of file getBeamSpotDB.py.
string getBeamSpotDB::iov_since = '' |
Definition at line 127 of file getBeamSpotDB.py.
string getBeamSpotDB::iov_till = '' |
Definition at line 128 of file getBeamSpotDB.py.
getBeamSpotDB::lumi = '1' |
Definition at line 140 of file getBeamSpotDB.py.
string getBeamSpotDB::optionstring = "" |
Definition at line 51 of file getBeamSpotDB.py.
tuple getBeamSpotDB::outcmd = commands.getstatusoutput( cmd ) |
Definition at line 121 of file getBeamSpotDB.py.
list getBeamSpotDB::outtext = status_rDB[1] |
Definition at line 204 of file getBeamSpotDB.py.
string getBeamSpotDB::readdb_out = "readDB_" |
READ.
Definition at line 151 of file getBeamSpotDB.py.
tuple getBeamSpotDB::rnewfile = open(readdb_out,'w') |
Definition at line 153 of file getBeamSpotDB.py.
getBeamSpotDB::run = '1' |
Definition at line 137 of file getBeamSpotDB.py.
tuple getBeamSpotDB::status_rDB = commands.getstatusoutput('cmsRun '+ readdb_out) |
Definition at line 202 of file getBeamSpotDB.py.
tuple getBeamSpotDB::tagname = '' |
Definition at line 110 of file getBeamSpotDB.py.
tuple getBeamSpotDB::USAGE = re.compile(r'(?s)\s*usage: (.*?)(\n[ \t]*\n|$)') |
Definition at line 39 of file getBeamSpotDB.py.