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 35 of file AtlRunQueryRun.py.

Constructor & Destructor Documentation

◆ __init__()

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

Definition at line 36 of file AtlRunQueryRun.py.

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

Member Function Documentation

◆ __getitem__()

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

Definition at line 67 of file AtlRunQueryRun.py.

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

◆ __len__()

def python.AtlRunQueryRun.DataEntry.__len__ (   self)

Definition at line 49 of file AtlRunQueryRun.py.

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

◆ __repr__()

def python.AtlRunQueryRun.DataEntry.__repr__ (   self)

Definition at line 46 of file AtlRunQueryRun.py.

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

◆ __str__()

def python.AtlRunQueryRun.DataEntry.__str__ (   self)

Definition at line 43 of file AtlRunQueryRun.py.

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

◆ contains()

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

Definition at line 70 of file AtlRunQueryRun.py.

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

◆ endlb()

def python.AtlRunQueryRun.DataEntry.endlb (   self)

Definition at line 60 of file AtlRunQueryRun.py.

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

◆ intersects()

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

Definition at line 73 of file AtlRunQueryRun.py.

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

◆ json()

def python.AtlRunQueryRun.DataEntry.json (   self)

Definition at line 81 of file AtlRunQueryRun.py.

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

◆ lastlb()

def python.AtlRunQueryRun.DataEntry.lastlb (   self)

Definition at line 64 of file AtlRunQueryRun.py.

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

◆ pickled()

def python.AtlRunQueryRun.DataEntry.pickled (   self)

Definition at line 77 of file AtlRunQueryRun.py.

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

◆ startlb()

def python.AtlRunQueryRun.DataEntry.startlb (   self)

Definition at line 56 of file AtlRunQueryRun.py.

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

Member Data Documentation

◆ iov

python.AtlRunQueryRun.DataEntry.iov

Definition at line 37 of file AtlRunQueryRun.py.

◆ lbrange

python.AtlRunQueryRun.DataEntry.lbrange

Definition at line 38 of file AtlRunQueryRun.py.

◆ rejected

python.AtlRunQueryRun.DataEntry.rejected

Definition at line 40 of file AtlRunQueryRun.py.

◆ value

python.AtlRunQueryRun.DataEntry.value

Definition at line 39 of file AtlRunQueryRun.py.

◆ valueForStorage

python.AtlRunQueryRun.DataEntry.valueForStorage

Definition at line 41 of file AtlRunQueryRun.py.


The documentation for this class was generated from the following file:
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
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:13
python.processes.powheg.ZZ.ZZ.__init__
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Definition: ZZ.py:18
python.Bindings.__getitem__
__getitem__
Definition: Control/AthenaPython/python/Bindings.py:771