#################### ## ## LumiInfo Class ## ## #################### ## More...
Public Member Functions | |
def | __init__ |
def | __str__ |
def | deadtime |
def | fixXingInfo |
Public Attributes | |
aveInstLum | |
badXingInfo | |
delivered | |
events | |
instLums | |
key | |
keyString | |
lumi | |
numXings | |
recorded | |
run | |
totInstLum | |
xingInfo | |
Static Public Attributes | |
int | lastSingleXingRun = 136175 |
float | lumiSectionLength = 23.310779 |
#################### ## ## LumiInfo Class ## ## #################### ##
Definition at line 20 of file generateEDF.py.
def generateEDF::LumiInfo::__init__ | ( | self, | |
line | |||
) |
Definition at line 25 of file generateEDF.py.
00026 : 00027 self.totInstLum = 0. 00028 self.aveInstLum = 0. 00029 self.numXings = 0 00030 self.instLums = [] 00031 self.events = [] 00032 self.xingInfo = False 00033 self.badXingInfo = False 00034 pieces = sepRE.split (line.strip()) 00035 size = len (pieces) 00036 if size % 2: 00037 raise RuntimeError, "Odd number of pieces" 00038 if size < 4: 00039 raise RuntimeError, "Not enough pieces" 00040 try: 00041 self.run = int (pieces[0]) 00042 self.lumi = int (pieces[1]) 00043 self.delivered = float (pieces[2]) 00044 self.recorded = float (pieces[3]) 00045 except: 00046 raise RuntimeError, "Pieces not right format" 00047 if size > 4: 00048 try: 00049 for xing, lum in zip (pieces[4::2],pieces[5::2]): 00050 xing = int (xing) 00051 lum = float (lum) 00052 self.instLums.append( (xing, lum) ) 00053 self.totInstLum += lum 00054 self.numXings += 1 00055 except: 00056 raise RuntimeError, "Inst Lumi Info malformed" 00057 self.aveInstLum = self.totInstLum / (self.numXings) 00058 self.xingInfo = True 00059 self.key = (self.run, self.lumi) 00060 self.keyString = self.key.__str__() 00061
def generateEDF::LumiInfo::__str__ | ( | self | ) |
Definition at line 88 of file generateEDF.py.
def generateEDF::LumiInfo::deadtime | ( | self | ) |
Definition at line 82 of file generateEDF.py.
def generateEDF::LumiInfo::fixXingInfo | ( | self | ) |
Definition at line 62 of file generateEDF.py.
00063 : 00064 if self.numXings: 00065 # You shouldn't try and fix an event if it already has 00066 # xing information. 00067 raise RuntimeError, "This event %s already has Xing information" \ 00068 % self.keyString 00069 if self.run > LumiInfo.lastSingleXingRun: 00070 # this run may have more than one crossing. I don't know 00071 # how to fix this. 00072 self.badXingInfo = True 00073 return False 00074 self.numXings = 1 00075 xing = 1 00076 self.aveInstLum = self.totInstLum = lum = \ 00077 self.delivered / LumiInfo.lumiSectionLength 00078 self.instLums.append( (xing, lum) ) 00079 self.xingInfo = True 00080 return True 00081
Definition at line 25 of file generateEDF.py.
Definition at line 25 of file generateEDF.py.
Definition at line 25 of file generateEDF.py.
Definition at line 25 of file generateEDF.py.
Definition at line 25 of file generateEDF.py.
Definition at line 25 of file generateEDF.py.
Definition at line 25 of file generateEDF.py.
int generateEDF::LumiInfo::lastSingleXingRun = 136175 [static] |
Definition at line 22 of file generateEDF.py.
Definition at line 25 of file generateEDF.py.
float generateEDF::LumiInfo::lumiSectionLength = 23.310779 [static] |
Definition at line 23 of file generateEDF.py.
Definition at line 25 of file generateEDF.py.
Definition at line 25 of file generateEDF.py.
Definition at line 25 of file generateEDF.py.
Definition at line 25 of file generateEDF.py.
Definition at line 25 of file generateEDF.py.