9#include <framework/database/LocalMetadataProvider.h>
11#include <framework/logging/Logger.h>
13namespace Belle2::Conditions {
16 MetadataProvider(usableTagStates), m_filename{
std::move(filename)}, m_connection{m_filename},
17 m_globaltagStatus{m_connection,
"SELECT globalTagStatus FROM globaltags WHERE globalTagName=:globaltag", true},
18 m_selectPayloads{m_connection, R
"SQL(
20 payloadName, globalTagName, payloadUrl, baseUrl, checksum,
21 firstExp, firstRun, finalExp, finalRun, revision
23 WHERE globalTagName=:globaltag AND
24 ((firstExp==:exp AND firstRun<=:run) OR firstExp<:exp) AND
25 (finalExp<0 OR (finalRun<0 AND finalExp>=:exp) OR finalExp>:exp OR (finalExp==:exp AND finalRun>=:run));
37 B2ERROR(
"Local Database: Global tag does not exist"
39 }
catch (std::exception& e) {
40 B2ERROR(
"Local Database: Error checking globaltag"
52 }
catch (std::exception& e) {
53 B2ERROR(
"Local Database: Error obtaining payloads"
Class to store variables with their name which were sent to the logging service.