Belle II Software development
PayloadMetadata Struct Reference

Simple struct to group all information necessary for a single payload. More...

#include <PayloadMetadata.h>

Public Member Functions

 PayloadMetadata (const std::string &_name, bool _required=true)
 Constructor to request a payload with a given name and indicate whether non-existence is ok.
 
 PayloadMetadata (const std::string &_name, const std::string &_globaltag, const std::string &_payloadUrl, const std::string &_baseUrl, const std::string &_checksum, int firstExp, int firstRun, int finalExp, int finalRun, int _revision)
 Constructor for all the information which is usually obtained from providers.
 
void update (const PayloadMetadata &other)
 Update information from another instance but keep the "required" flag untouched.
 

Public Attributes

std::string name
 Name of the Payload.
 
std::string globaltag {""}
 Name of the globaltag this payload was taken from.
 
std::string filename {""}
 full filename to the payload file
 
std::string payloadUrl {""}
 logical filename to the payload
 
std::string baseUrl {""}
 base url if download is necessary
 
std::string checksum {""}
 digest (checksum) of the payload
 
IntervalOfValidity iov
 the interval of validity
 
size_t revision {0}
 the revision of the payload
 
bool required {true}
 if true a missing payload will not trigger an error
 

Detailed Description

Simple struct to group all information necessary for a single payload.

Definition at line 15 of file PayloadMetadata.h.

Constructor & Destructor Documentation

◆ PayloadMetadata() [1/2]

PayloadMetadata ( const std::string &  _name,
bool  _required = true 
)
inlineexplicit

Constructor to request a payload with a given name and indicate whether non-existence is ok.

Definition at line 17 of file PayloadMetadata.h.

17: name{_name}, required{_required} {}
bool required
if true a missing payload will not trigger an error
std::string name
Name of the Payload.

◆ PayloadMetadata() [2/2]

PayloadMetadata ( const std::string &  _name,
const std::string &  _globaltag,
const std::string &  _payloadUrl,
const std::string &  _baseUrl,
const std::string &  _checksum,
int  firstExp,
int  firstRun,
int  finalExp,
int  finalRun,
int  _revision 
)
inline

Constructor for all the information which is usually obtained from providers.

"required" and "filename" are not part of this as they get filled in later steps or from other parties

Definition at line 19 of file PayloadMetadata.h.

21 : name(_name), globaltag(_globaltag), payloadUrl(_payloadUrl), baseUrl(_baseUrl), checksum(_checksum),
22 iov{firstExp, firstRun, finalExp, finalRun}, revision(_revision) {}
IntervalOfValidity iov
the interval of validity
std::string baseUrl
base url if download is necessary
std::string globaltag
Name of the globaltag this payload was taken from.
std::string checksum
digest (checksum) of the payload
std::string payloadUrl
logical filename to the payload
size_t revision
the revision of the payload

Member Function Documentation

◆ update()

void update ( const PayloadMetadata other)
inline

Update information from another instance but keep the "required" flag untouched.

Definition at line 24 of file PayloadMetadata.h.

25 {
26 bool r{required};
27 (*this) = other;
28 required = r;
29 }

Member Data Documentation

◆ baseUrl

std::string baseUrl {""}

base url if download is necessary

Definition at line 39 of file PayloadMetadata.h.

◆ checksum

std::string checksum {""}

digest (checksum) of the payload

Definition at line 41 of file PayloadMetadata.h.

◆ filename

std::string filename {""}

full filename to the payload file

Definition at line 35 of file PayloadMetadata.h.

◆ globaltag

std::string globaltag {""}

Name of the globaltag this payload was taken from.

Definition at line 33 of file PayloadMetadata.h.

◆ iov

the interval of validity

Definition at line 43 of file PayloadMetadata.h.

◆ name

std::string name

Name of the Payload.

Definition at line 31 of file PayloadMetadata.h.

◆ payloadUrl

std::string payloadUrl {""}

logical filename to the payload

Definition at line 37 of file PayloadMetadata.h.

◆ required

bool required {true}

if true a missing payload will not trigger an error

Definition at line 47 of file PayloadMetadata.h.

◆ revision

size_t revision {0}

the revision of the payload

Definition at line 45 of file PayloadMetadata.h.


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