ATLAS Offline Software
Public Member Functions | Public Attributes | List of all members
python.utils.AtlRunQueryIOV.IOVRange Class Reference
Collaboration diagram for python.utils.AtlRunQueryIOV.IOVRange:

Public Member Functions

def __init__ (self, obj=None, starttime=None, endtime=None, runStart=None, lbStart=None, runEnd=None, lbEnd=None, timebased=False)
 
def truncateToSingleRun (self, runnr)
 
def __str__ (self)
 
def __repr__ (self)
 
def __eq__ (self, other)
 
def __lt__ (self, other)
 
def length (self)
 
def isInRange (self, iovtime)
 
def overlaps (self, o)
 

Public Attributes

 startTime
 
 endTime
 

Detailed Description

Definition at line 68 of file AtlRunQueryIOV.py.

Constructor & Destructor Documentation

◆ __init__()

def python.utils.AtlRunQueryIOV.IOVRange.__init__ (   self,
  obj = None,
  starttime = None,
  endtime = None,
  runStart = None,
  lbStart = None,
  runEnd = None,
  lbEnd = None,
  timebased = False 
)

Definition at line 69 of file AtlRunQueryIOV.py.

69  def __init__(self, obj=None, starttime=None, endtime=None, runStart=None, lbStart=None, runEnd=None, lbEnd=None, timebased=False):
70  if isinstance(obj, cool.IObject):
71  self.startTime = IOVTime(timerunlb=obj.since(), timebased=timebased)
72  self.endTime = IOVTime(timerunlb=obj.until(), timebased=timebased)
73  elif isinstance(obj, IOVRange):
74  self.startTime = obj.startTime
75  self.endTime = obj.endTime
76  elif isinstance(starttime, IOVTime) and isinstance(endtime, IOVTime):
77  self.startTime = starttime
78  self.endTime = endtime
79  elif isinstance(starttime,int) and isinstance(endtime,int):
80  self.startTime = IOVTime(timerunlb=starttime,timebased=timebased)
81  self.endTime = IOVTime(timerunlb=endtime,timebased=timebased)
82  elif runStart is not None and lbStart is not None and runEnd is not None and lbEnd is not None:
83  self.startTime = IOVTime(runStart, lbStart, timebased=False)
84  self.endTime = IOVTime(runEnd, lbEnd, timebased=False)
85  else:
86  print ("IOVRange.__init__: Can't interpret arguments")
87 

Member Function Documentation

◆ __eq__()

def python.utils.AtlRunQueryIOV.IOVRange.__eq__ (   self,
  other 
)

Definition at line 103 of file AtlRunQueryIOV.py.

103  def __eq__(self, other):
104  return (self.startTime == other.startTime)
105 

◆ __lt__()

def python.utils.AtlRunQueryIOV.IOVRange.__lt__ (   self,
  other 
)

Definition at line 106 of file AtlRunQueryIOV.py.

106  def __lt__(self, other):
107  return (self.startTime < other.startTime)
108 

◆ __repr__()

def python.utils.AtlRunQueryIOV.IOVRange.__repr__ (   self)

Definition at line 100 of file AtlRunQueryIOV.py.

100  def __repr__(self):
101  return str(self)
102 

◆ __str__()

def python.utils.AtlRunQueryIOV.IOVRange.__str__ (   self)

Definition at line 97 of file AtlRunQueryIOV.py.

97  def __str__(self):
98  return "[%s, %s)" % (self.startTime,self.endTime)
99 

◆ isInRange()

def python.utils.AtlRunQueryIOV.IOVRange.isInRange (   self,
  iovtime 
)

Definition at line 112 of file AtlRunQueryIOV.py.

112  def isInRange(self, iovtime):
113  return self.startTime<=iovtime and iovtime<self.endTime
114 

◆ length()

def python.utils.AtlRunQueryIOV.IOVRange.length (   self)

Definition at line 109 of file AtlRunQueryIOV.py.

109  def length(self):
110  return "%2.1f" % ((self.endTime-self.startTime)/1.E9)
111 

◆ overlaps()

def python.utils.AtlRunQueryIOV.IOVRange.overlaps (   self,
  o 
)

Definition at line 115 of file AtlRunQueryIOV.py.

115  def overlaps(self, o):
116  if o.startTime>=self.endTime or o.endTime<=self.startTime:
117  return False
118  return True
119 
120 

◆ truncateToSingleRun()

def python.utils.AtlRunQueryIOV.IOVRange.truncateToSingleRun (   self,
  runnr 
)

Definition at line 89 of file AtlRunQueryIOV.py.

89  def truncateToSingleRun(self,runnr):
90  if self.startTime.run<runnr:
91  self.startTime.run=runnr
92  self.startTime.lb=1
93  if self.endTime.run>runnr:
94  self.endTime.run=runnr+1
95  self.endTime.lb=0
96 

Member Data Documentation

◆ endTime

python.utils.AtlRunQueryIOV.IOVRange.endTime

Definition at line 72 of file AtlRunQueryIOV.py.

◆ startTime

python.utils.AtlRunQueryIOV.IOVRange.startTime

Definition at line 71 of file AtlRunQueryIOV.py.


The documentation for this class was generated from the following file:
IOVTime
Basic time unit for IOVSvc. Hold time as a combination of run and event numbers.
Definition: IOVTime.h:33
python.processes.powheg.ZZ.ZZ.__init__
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Definition: ZZ.py:18
str
Definition: BTagTrackIpAccessor.cxx:11
length
double length(const pvec &v)
Definition: FPGATrackSimLLPDoubletHoughTransformTool.cxx:26