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

Public Member Functions

def __init__ (self, run=None, lb=None, timerunlb=None, timebased=False)
 
def __str__ (self)
 
def __lt__ (self, other)
 
def __eq__ (self, other)
 
def __sub__ (self, other)
 
def timerunlb (self)
 
def inRange (self, iovrange)
 

Public Attributes

 timebased
 
 run
 
 lb
 
 time
 

Detailed Description

Definition at line 9 of file AtlRunQueryIOV.py.

Constructor & Destructor Documentation

◆ __init__()

def python.utils.AtlRunQueryIOV.IOVTime.__init__ (   self,
  run = None,
  lb = None,
  timerunlb = None,
  timebased = False 
)

Definition at line 10 of file AtlRunQueryIOV.py.

10  def __init__(self, run=None, lb=None, timerunlb=None,timebased=False):
11  if isinstance(run,IOVTime):
12  self.timebased = run.timebased
13  self.run = run.run
14  self.lb = run.lb
15  self.time = run.time
16  else:
17  self.timebased=timebased
18  self.run = self.lb = self.time = None
19  if timebased:
20  self.time=timerunlb
21  else:
22  if timerunlb is not None:
23  self.run = timerunlb>>32
24  self.lb = timerunlb&0xFFFFFFFF
25  else:
26  self.run = run
27  self.lb = lb
28 

Member Function Documentation

◆ __eq__()

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

Definition at line 44 of file AtlRunQueryIOV.py.

44  def __eq__(self, other):
45  if self.timebased:
46  return self.time==other.time
47  else:
48  return self.run==other.run and self.lb==other.lb
49 

◆ __lt__()

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

Definition at line 38 of file AtlRunQueryIOV.py.

38  def __lt__(self, other):
39  if self.timebased:
40  return self.time<other.time
41  else:
42  return self.run<other.run or self.run==other.run and self.lb<other.lb
43 

◆ __str__()

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

Definition at line 29 of file AtlRunQueryIOV.py.

29  def __str__(self):
30  if self.timebased:
31  try:
32  return "%s" % time.strftime("%a %b %d %Y %X",time.gmtime(self.time/1E9))
33  except ValueError:
34  return "infinity"
35  else:
36  return "%i/%i" % (self.run,self.lb)
37 

◆ __sub__()

def python.utils.AtlRunQueryIOV.IOVTime.__sub__ (   self,
  other 
)

Definition at line 50 of file AtlRunQueryIOV.py.

50  def __sub__(self, other):
51  if isinstance(other, int):
52  return IOVTime(timerunlb=self.timerunlb()-1)
53  elif isinstance(other, IOVTime):
54  return self.timerunlb()-other.timerunlb()
55 
56 

◆ inRange()

def python.utils.AtlRunQueryIOV.IOVTime.inRange (   self,
  iovrange 
)

Definition at line 64 of file AtlRunQueryIOV.py.

64  def inRange(self,iovrange):
65  return iovrange.isInRange(self)
66 

◆ timerunlb()

def python.utils.AtlRunQueryIOV.IOVTime.timerunlb (   self)

Definition at line 57 of file AtlRunQueryIOV.py.

57  def timerunlb(self):
58  if self.timebased:
59  return self.time
60  res = self.run<<32
61  res += self.lb
62  return res
63 

Member Data Documentation

◆ lb

python.utils.AtlRunQueryIOV.IOVTime.lb

Definition at line 14 of file AtlRunQueryIOV.py.

◆ run

python.utils.AtlRunQueryIOV.IOVTime.run

Definition at line 13 of file AtlRunQueryIOV.py.

◆ time

python.utils.AtlRunQueryIOV.IOVTime.time

Definition at line 15 of file AtlRunQueryIOV.py.

◆ timebased

python.utils.AtlRunQueryIOV.IOVTime.timebased

Definition at line 12 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
inRange
bool inRange(const double *boundaries, const double value, const double tolerance=0.02)
Definition: LArSCIdVsIdTest.cxx:5
python.processes.powheg.ZZ.ZZ.__init__
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Definition: ZZ.py:18