Belle II Software light-2406-ragdoll
LocalMetadataProvider.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8#pragma once
9
10#include <string>
11
12#include <framework/database/MetadataProvider.h>
13#include <framework/utilities/sqlite.h>
14
15namespace Belle2::Conditions {
47 public:
49 LocalMetadataProvider(std::string filename, const std::set<std::string>& usableTagStates);
59 virtual ~LocalMetadataProvider() = default;
60
67 std::string getGlobaltagStatus(const std::string& globaltag) override;
68
73 bool updatePayloads(const std::string& globaltag, int exp, int run) override;
74 private:
76 std::string m_filename;
83 std::string, std::string, std::string, std::string, std::string,
84 int, int, int, int, int> m_selectPayloads;
85 };
86
87} // namespace Belle2::Conditions
Class to obtain metadata of all valid payloads from a local SQLite file instead of the central server...
virtual ~LocalMetadataProvider()=default
default destructor
sqlite::Connection m_connection
SQLite connection object.
bool updatePayloads(const std::string &globaltag, int exp, int run) override
Update the list of existing payloads from a given globaltag, exp and run combination.
sqlite::ObjectStatement< PayloadMetadata, std::string, std::string, std::string, std::string, std::string, int, int, int, int, int > m_selectPayloads
SQLite statement to return all payloads for a given globaltag, exp, run.
std::string getGlobaltagStatus(const std::string &globaltag) override
Return the status of the given globaltag.
LocalMetadataProvider & operator=(LocalMetadataProvider &&)=delete
move assignment operator
LocalMetadataProvider & operator=(const LocalMetadataProvider &)=delete
assignment operator
sqlite::SimpleStatement< std::string > m_globaltagStatus
SQLite statement to return the status of a global tag.
LocalMetadataProvider(const LocalMetadataProvider &)=delete
copy constructor
LocalMetadataProvider(LocalMetadataProvider &&)=delete
move constructor
std::string m_filename
Filename for the sqlite database file.
Base class for a payload metadata provider.
Simple wrapper for a SQLite database connection.
Definition: sqlite.h:294
SQLite prepared statement wrapper.
Definition: sqlite.h:194
Simple struct to group all information necessary for a single payload.