Belle II Software light-2406-ragdoll
CheckPayloadMetadata Class Reference
Inheritance diagram for CheckPayloadMetadata:
Collaboration 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 19 of file check_payload_metadata.py.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  use_testing_payloads,
  md5_revision 
)
Consructor.

Definition at line 24 of file check_payload_metadata.py.

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

Member Function Documentation

◆ beginRun()

def beginRun (   self)
Begin run.

Definition at line 34 of file check_payload_metadata.py.

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

Member Data Documentation

◆ beam_parameters

beam_parameters

BeamParameters database object.

Definition at line 28 of file check_payload_metadata.py.

◆ md5_revision

md5_revision

md5 revision hash of the payload.

Definition at line 32 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 30 of file check_payload_metadata.py.


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