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

Public Member Functions

def __init__ (self, iov, value, reject=False, valueForStorage=None)
 
def __str__ (self)
 
def __repr__ (self)
 
def __len__ (self)
 
def startlb (self)
 
def endlb (self)
 
def lastlb (self)
 
def __getitem__ (self, k)
 
def contains (self, lb)
 
def intersects (self, lbrange)
 
def pickled (self)
 
def json (self)
 

Public Attributes

 iov
 
 lbrange
 
 value
 
 rejected
 
 valueForStorage
 

Detailed Description

Definition at line 34 of file AtlRunQueryRun.py.

Constructor & Destructor Documentation

◆ __init__()

def python.AtlRunQueryRun.DataEntry.__init__ (   self,
  iov,
  value,
  reject = False,
  valueForStorage = None 
)

Definition at line 35 of file AtlRunQueryRun.py.

35  def __init__(self, iov, value, reject=False, valueForStorage=None):
36  self.iov = iov
37  self.lbrange = (self.iov.startTime.lb, self.iov.endTime.lb) # note that the end lb is not part of the iov
38  self.value = value
39  self.rejected = reject
40  self.valueForStorage = valueForStorage
41 

Member Function Documentation

◆ __getitem__()

def python.AtlRunQueryRun.DataEntry.__getitem__ (   self,
  k 
)

Definition at line 66 of file AtlRunQueryRun.py.

66  def __getitem__(self,k):
67  return self.valueForStorage[k]
68 

◆ __len__()

def python.AtlRunQueryRun.DataEntry.__len__ (   self)

Definition at line 48 of file AtlRunQueryRun.py.

48  def __len__(self):
49  length_L = self.lastlb-self.startlb+1
50  if length_L>0x7FFFFFFF:
51  length_L = 0x7FFFFFFF
52  return int(length_L)
53 

◆ __repr__()

def python.AtlRunQueryRun.DataEntry.__repr__ (   self)

Definition at line 45 of file AtlRunQueryRun.py.

45  def __repr__(self):
46  return "<DataEntry %s>" % self
47 

◆ __str__()

def python.AtlRunQueryRun.DataEntry.__str__ (   self)

Definition at line 42 of file AtlRunQueryRun.py.

42  def __str__(self):
43  return "[%i-%i) %s %r" % (self.lbrange[0], self.lbrange[1], "r" if self.rejected else "a", self.value)
44 

◆ contains()

def python.AtlRunQueryRun.DataEntry.contains (   self,
  lb 
)

Definition at line 69 of file AtlRunQueryRun.py.

69  def contains(self, lb):
70  return self.lbrange[0]<=lb and lb<self.lbrange[1]
71 

◆ endlb()

def python.AtlRunQueryRun.DataEntry.endlb (   self)

Definition at line 59 of file AtlRunQueryRun.py.

59  def endlb(self):
60  return self.lbrange[1]
61 

◆ intersects()

def python.AtlRunQueryRun.DataEntry.intersects (   self,
  lbrange 
)

Definition at line 72 of file AtlRunQueryRun.py.

72  def intersects(self,lbrange):
73  lbstart, lbend = lbrange
74  return self.contains(lbstart) or self.contains(lbend-1) or (lbstart<=self.lbrange[0] and self.lbrange[1]<lbend)
75 

◆ json()

def python.AtlRunQueryRun.DataEntry.json (   self)

Definition at line 80 of file AtlRunQueryRun.py.

80  def json(self):
81  retDict = { 'lbrange' : [self.startlb, self.lastlb] }
82  if self.valueForStorage is None:
83  v = self.value.pickled() if hasattr(self.value,'pickled') else self.value
84  retDict["value"] = v
85  else:
86  retDict.update(self.valueForStorage)
87  return retDict
88 
89 

◆ lastlb()

def python.AtlRunQueryRun.DataEntry.lastlb (   self)

Definition at line 63 of file AtlRunQueryRun.py.

63  def lastlb(self):
64  return ((0x100000000 + self.endlb)-1) & 0xFFFFFFFF
65 

◆ pickled()

def python.AtlRunQueryRun.DataEntry.pickled (   self)

Definition at line 76 of file AtlRunQueryRun.py.

76  def pickled(self):
77  v = self.value.pickled() if hasattr(self.value,'pickled') else self.value
78  return { 'firstlb' : self.startlb, 'lastlb' : self.lastlb, 'value' : v, 'accepted' : not self.rejected }
79 

◆ startlb()

def python.AtlRunQueryRun.DataEntry.startlb (   self)

Definition at line 55 of file AtlRunQueryRun.py.

55  def startlb(self):
56  return self.lbrange[0]
57 

Member Data Documentation

◆ iov

python.AtlRunQueryRun.DataEntry.iov

Definition at line 36 of file AtlRunQueryRun.py.

◆ lbrange

python.AtlRunQueryRun.DataEntry.lbrange

Definition at line 37 of file AtlRunQueryRun.py.

◆ rejected

python.AtlRunQueryRun.DataEntry.rejected

Definition at line 39 of file AtlRunQueryRun.py.

◆ value

python.AtlRunQueryRun.DataEntry.value

Definition at line 38 of file AtlRunQueryRun.py.

◆ valueForStorage

python.AtlRunQueryRun.DataEntry.valueForStorage

Definition at line 40 of file AtlRunQueryRun.py.


The documentation for this class was generated from the following file:
json
nlohmann::json json
Definition: HistogramDef.cxx:9
contains
bool contains(const std::string &s, const std::string &regx)
does a string contain the substring
Definition: hcg.cxx:111
python.selector.AtlRunQuerySelectorDQ.pickled
pickled
Definition: AtlRunQuerySelectorDQ.py:12
python.processes.powheg.ZZ.ZZ.__init__
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Definition: ZZ.py:18
python.CaloAddPedShiftConfig.int
int
Definition: CaloAddPedShiftConfig.py:45
python.Bindings.__getitem__
__getitem__
Definition: Control/AthenaPython/python/Bindings.py:782