Belle II Software  light-2212-foldex
PayloadInformation Class Reference

Public Member Functions

def from_json (cls, payload, iov=None)
 
def __init__ (self, payload_id, name, revision, checksum, payload_url, base_url, iov_id=None, iov=None)
 
def url (self)
 
def __hash__ (self)
 
def __eq__ (self, other)
 
def __lt__ (self, other)
 
def readable_iov (self)
 

Public Attributes

 name
 name of the payload
 
 checksum
 checksum of the payload
 
 iov
 interval of validity
 
 revision
 revision, not used for comparisons
 
 payload_id
 payload id in CDB, not used for comparisons
 
 iov_id
 iov id in CDB, not used for comparisons
 
 base_url
 base url
 
 payload_url
 payload url
 

Detailed Description

Small container class to help compare payload information for efficient
comparison between globaltags

Definition at line 57 of file __init__.py.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  payload_id,
  name,
  revision,
  checksum,
  payload_url,
  base_url,
  iov_id = None,
  iov = None 
)
Create a new object from the given information

Definition at line 83 of file __init__.py.

83  def __init__(self, payload_id, name, revision, checksum, payload_url, base_url, iov_id=None, iov=None):
84  """
85  Create a new object from the given information
86  """
87 
88  self.name = name
89 
90  self.checksum = checksum
91 
92  self.iov = iov
93 
94  self.revision = revision
95 
96  self.payload_id = payload_id
97 
98  self.iov_id = iov_id
99 
100  self.base_url = base_url
101 
102  self.payload_url = payload_url
103 

Member Function Documentation

◆ __eq__()

def __eq__ (   self,
  other 
)
Check if two payloads are equal

Definition at line 113 of file __init__.py.

◆ __hash__()

def __hash__ (   self)
Make object hashable

Definition at line 109 of file __init__.py.

◆ __lt__()

def __lt__ (   self,
  other 
)
Sort payloads by name, iov, revision

Definition at line 117 of file __init__.py.

◆ from_json()

def from_json (   cls,
  payload,
  iov = None 
)
Set all internal members from the json information of the payload and the iov.

Arguments:
    payload (dict): json information of the payload as returned by REST api
    iov (dict): json information of the iov as returned by REST api

Definition at line 62 of file __init__.py.

◆ readable_iov()

def readable_iov (   self)
return a human readable name for the IoV

Definition at line 121 of file __init__.py.

◆ url()

def url (   self)
Return the full url to the payload on the server

Definition at line 105 of file __init__.py.


The documentation for this class was generated from the following file: