Belle II Software development
CheckPayloadMetadata Class Reference
Inheritance diagram for CheckPayloadMetadata:

Public Member Functions

def __init__ (self, use_testing_payloads, md5_revision)
 
def beginRun (self)
 

Public Attributes

 beam_parameters
 BeamParameters database object.
 
 use_testing_payloads
 Flag to mark if testing payloads are used or not.
 
 md5_revision
 md5 revision hash of the payload.
 

Detailed Description

Small module for checking some payload metadata.

Definition at line 20 of file check_payload_metadata.py.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  use_testing_payloads,
  md5_revision 
)
Consructor.

Definition at line 25 of file check_payload_metadata.py.

25 def __init__(self, use_testing_payloads, md5_revision):
26 '''Consructor.'''
27 super().__init__()
28
29 self.beam_parameters = B2.PyDBObj('BeamParameters')
30
31 self.use_testing_payloads = use_testing_payloads
32
33 self.md5_revision = md5_revision
34

Member Function Documentation

◆ beginRun()

def beginRun (   self)
Begin run.

Definition at line 35 of file check_payload_metadata.py.

35 def beginRun(self):
36 '''Begin run.'''
37 assert (self.beam_parameters.isValid())
38 if self.use_testing_payloads:
39 assert ('testingdb/testingdb.txt' in self.beam_parameters.getGlobaltag())
40 assert (self.beam_parameters.getRevision() == 0)
41 assert (os.path.basename(self.beam_parameters.getFilename()).startswith('dbstore'))
42 assert (os.path.basename(self.beam_parameters.getFilename()).index(self.md5_revision) != -1)
43 assert (self.beam_parameters.getIoV() == B2.IntervalOfValidity(0, 1, 2, 3))
44 else:
45 assert (self.beam_parameters.getGlobaltag() == b2.conditions.default_globaltags[0])
46 assert (self.beam_parameters.getRevision() > 0)
47 assert (self.beam_parameters.getFilename().startswith('/cvmfs'))
48 assert (self.beam_parameters.getIoV() == B2.IntervalOfValidity(0, 0, 0, -1))
49
50

Member Data Documentation

◆ beam_parameters

beam_parameters

BeamParameters database object.

Definition at line 29 of file check_payload_metadata.py.

◆ md5_revision

md5_revision

md5 revision hash of the payload.

Definition at line 33 of file check_payload_metadata.py.

◆ use_testing_payloads

use_testing_payloads

Flag to mark if testing payloads are used or not.

Definition at line 31 of file check_payload_metadata.py.


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