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 10 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 11 of file AtlRunQueryIOV.py.

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

Member Function Documentation

◆ __eq__()

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

Definition at line 45 of file AtlRunQueryIOV.py.

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

◆ __lt__()

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

Definition at line 39 of file AtlRunQueryIOV.py.

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

◆ __str__()

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

Definition at line 30 of file AtlRunQueryIOV.py.

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

◆ __sub__()

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

Definition at line 51 of file AtlRunQueryIOV.py.

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

◆ inRange()

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

Definition at line 65 of file AtlRunQueryIOV.py.

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

◆ timerunlb()

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

Definition at line 58 of file AtlRunQueryIOV.py.

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

Member Data Documentation

◆ lb

python.utils.AtlRunQueryIOV.IOVTime.lb

Definition at line 15 of file AtlRunQueryIOV.py.

◆ run

python.utils.AtlRunQueryIOV.IOVTime.run

Definition at line 14 of file AtlRunQueryIOV.py.

◆ time

python.utils.AtlRunQueryIOV.IOVTime.time

Definition at line 16 of file AtlRunQueryIOV.py.

◆ timebased

python.utils.AtlRunQueryIOV.IOVTime.timebased

Definition at line 13 of file AtlRunQueryIOV.py.


The documentation for this class was generated from the following file:
IOVDbNamespace::inRange
bool inRange(const NumericType &val, const std::pair< NumericType, NumericType > &range)
Function to check whether a number is in the inclusive range, given as a pair.
Definition: IOVDbCoolFunctions.h:42
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