CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Public Attributes | Static Public Attributes
generateEDF.LumiInfo Class Reference

LumiInfo Class

More...

Inheritance diagram for generateEDF.LumiInfo:

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
 

Detailed Description

LumiInfo Class

Definition at line 20 of file generateEDF.py.

Constructor & Destructor Documentation

def generateEDF.LumiInfo.__init__ (   self,
  line 
)

Definition at line 25 of file generateEDF.py.

25 
26  def __init__ (self, line):
27  self.totInstLum = 0.
28  self.aveInstLum = 0.
29  self.numXings = 0
30  self.instLums = []
31  self.events = []
32  self.xingInfo = False
33  self.badXingInfo = False
34  pieces = sepRE.split (line.strip())
35  size = len (pieces)
36  if size % 2:
37  raise RuntimeError, "Odd number of pieces"
38  if size < 4:
39  raise RuntimeError, "Not enough pieces"
40  try:
41  self.run = int (pieces[0])
42  self.lumi = int (pieces[1])
43  self.delivered = float (pieces[2])
44  self.recorded = float (pieces[3])
45  except:
46  raise RuntimeError, "Pieces not right format"
47  if size > 4:
48  try:
49  for xing, lum in zip (pieces[4::2],pieces[5::2]):
50  xing = int (xing)
51  lum = float (lum)
52  self.instLums.append( (xing, lum) )
53  self.totInstLum += lum
54  self.numXings += 1
55  except:
56  raise RuntimeError, "Inst Lumi Info malformed"
57  self.aveInstLum = self.totInstLum / (self.numXings)
58  self.xingInfo = True
59  self.key = (self.run, self.lumi)
60  self.keyString = self.key.__str__()
61 

Member Function Documentation

def generateEDF.LumiInfo.__str__ (   self)

Definition at line 88 of file generateEDF.py.

References generateEDF.LumiInfo.deadtime(), Level1TriggerScalers.deadtime(), TriggerScalersRaw_v3.deadtime, HCAL_HLX::TRIGGER_LUMI_SEGMENT.deadtime, generateEDF.LumiInfo.delivered, generateEDF.LumiInfo.lumi, DQMNet::CoreObject.lumi, conddblib.TimeType.lumi, ScalersEventRecordRaw_v1.lumi, ScalersEventRecordRaw_v2.lumi, ScalersEventRecordRaw_v3.lumi, ScalersEventRecordRaw_v4.lumi, ScalersEventRecordRaw_v5.lumi, ScalersEventRecordRaw_v6.lumi, generateEDF.LumiInfo.numXings, RPCRunIOV::RunIOV_Item.run, TB06Reco.run, TB06RecoH2.run, RPCDQMObject.run, generateEDF.LumiInfo.run, relval_steps.InputInfo.run, EfficiencyPlotter.run, WZInterestingEventSelector::event.run, MuonRecoTest.run, DTResolutionAnalysisTest.run, DTBlockedROChannelsTest.run, MatacqProducer::MatacqEventId.run, DTDataIntegrityTest.run, DTDeadChannelTest.run, DTResolutionTest.run, HitEff.run, DTChamberEfficiencyTest.run, ME::Header.run, DTEfficiencyTest.run, DTtTrigCalibrationTest.run, DTNoiseTest.run, cms::GammaJetAnalysis.run, DQMNet::CoreObject.run, DTLocalTriggerBaseTest.run, conddblib.TimeType.run, SiPixelErrorEstimation.run, and generateEDF.LumiInfo.totInstLum.

88 
89  def __str__ (self):
90  return "%6d, %4d: %6.1f (%4.1f%%) %4.2f (%3d)" % \
91  (self.run,
92  self.lumi,
93  self.delivered,
94  self.deadtime(),
95  self.totInstLum,
96  self.numXings)
97 
def generateEDF.LumiInfo.deadtime (   self)

Definition at line 82 of file generateEDF.py.

References generateEDF.LumiInfo.delivered, and generateEDF.LumiInfo.recorded.

Referenced by generateEDF.LumiInfo.__str__().

82 
83  def deadtime (self):
84  if not self.delivered:
85  return 1
86  return 1 - (self.recorded / self.delivered)
87 
def generateEDF.LumiInfo.fixXingInfo (   self)

Definition at line 62 of file generateEDF.py.

References generateEDF.LumiInfo.aveInstLum, generateEDF.LumiInfo.badXingInfo, generateEDF.LumiInfo.delivered, generateEDF.LumiInfo.keyString, generateEDF.LumiInfo.numXings, RPCRunIOV::RunIOV_Item.run, TB06Reco.run, TB06RecoH2.run, RPCDQMObject.run, generateEDF.LumiInfo.run, EfficiencyPlotter.run, relval_steps.InputInfo.run, WZInterestingEventSelector::event.run, MuonRecoTest.run, DTResolutionAnalysisTest.run, DTBlockedROChannelsTest.run, DTDataIntegrityTest.run, MatacqProducer::MatacqEventId.run, DTDeadChannelTest.run, HitEff.run, DTResolutionTest.run, DTChamberEfficiencyTest.run, ME::Header.run, DTEfficiencyTest.run, DTtTrigCalibrationTest.run, DTNoiseTest.run, cms::GammaJetAnalysis.run, DQMNet::CoreObject.run, DTLocalTriggerBaseTest.run, conddblib.TimeType.run, SiPixelErrorEstimation.run, generateEDF.LumiInfo.totInstLum, and generateEDF.LumiInfo.xingInfo.

62 
63  def fixXingInfo (self):
64  if self.numXings:
65  # You shouldn't try and fix an event if it already has
66  # xing information.
67  raise RuntimeError, "This event %s already has Xing information" \
68  % self.keyString
69  if self.run > LumiInfo.lastSingleXingRun:
70  # this run may have more than one crossing. I don't know
71  # how to fix this.
72  self.badXingInfo = True
73  return False
74  self.numXings = 1
75  xing = 1
76  self.aveInstLum = self.totInstLum = lum = \
77  self.delivered / LumiInfo.lumiSectionLength
78  self.instLums.append( (xing, lum) )
79  self.xingInfo = True
80  return True
81 

Member Data Documentation

generateEDF.LumiInfo.aveInstLum

Definition at line 27 of file generateEDF.py.

Referenced by generateEDF.LumiInfo.fixXingInfo().

generateEDF.LumiInfo.badXingInfo

Definition at line 32 of file generateEDF.py.

Referenced by generateEDF.LumiInfo.fixXingInfo().

generateEDF.LumiInfo.delivered

Definition at line 42 of file generateEDF.py.

Referenced by generateEDF.LumiInfo.__str__(), generateEDF.LumiInfo.deadtime(), and generateEDF.LumiInfo.fixXingInfo().

generateEDF.LumiInfo.events

Definition at line 30 of file generateEDF.py.

Referenced by eventsfwlite.Events.__getattr__(), eventsfwlite.Events.__init__(), looper.Looper.loop(), and looper.Looper.process().

generateEDF.LumiInfo.instLums

Definition at line 29 of file generateEDF.py.

generateEDF.LumiInfo.key

Definition at line 58 of file generateEDF.py.

Referenced by ws_sso_content_reader.HTTPSClientAuthHandler.getConnection().

generateEDF.LumiInfo.keyString

Definition at line 59 of file generateEDF.py.

Referenced by generateEDF.LumiInfo.fixXingInfo().

int generateEDF.LumiInfo.lastSingleXingRun = 136175
static

Definition at line 22 of file generateEDF.py.

generateEDF.LumiInfo.lumi

Definition at line 41 of file generateEDF.py.

Referenced by generateEDF.LumiInfo.__str__().

float generateEDF.LumiInfo.lumiSectionLength = 23.310779
static

Definition at line 23 of file generateEDF.py.

generateEDF.LumiInfo.numXings

Definition at line 28 of file generateEDF.py.

Referenced by generateEDF.LumiInfo.__str__(), and generateEDF.LumiInfo.fixXingInfo().

generateEDF.LumiInfo.recorded

Definition at line 43 of file generateEDF.py.

Referenced by generateEDF.LumiInfo.deadtime().

generateEDF.LumiInfo.run

Definition at line 40 of file generateEDF.py.

Referenced by generateEDF.LumiInfo.__str__(), Types.EventID.cppID(), Types.LuminosityBlockID.cppID(), generateEDF.LumiInfo.fixXingInfo(), and dqm_interfaces.DirWalkerFile.walk().

generateEDF.LumiInfo.totInstLum

Definition at line 26 of file generateEDF.py.

Referenced by generateEDF.LumiInfo.__str__(), and generateEDF.LumiInfo.fixXingInfo().

generateEDF.LumiInfo.xingInfo

Definition at line 31 of file generateEDF.py.

Referenced by generateEDF.LumiInfoCont._integrateContainer(), and generateEDF.LumiInfo.fixXingInfo().